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
4f8267c0d3bc24c60c1236fda4dc83ee975361c8
us_ignite/events/tests/managers_tests.py
us_ignite/events/tests/managers_tests.py
from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tearDown(self): ...
from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tearDown(self): ...
Clean up model data after tests have been executed.
Clean up model data after tests have been executed.
Python
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tearDown(self): ...
from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tearDown(self): ...
<commit_before>from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tear...
from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tearDown(self): ...
from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tearDown(self): ...
<commit_before>from nose.tools import eq_ from django.contrib.auth.models import User from django.test import TestCase from us_ignite.events.tests import fixtures from us_ignite.events.models import Event from us_ignite.profiles.tests.fixtures import get_user class TestEventPublishedManager(TestCase): def tear...
5a9f027bb3e660cd0146c4483c70e54a76332048
makerscience_profile/api.py
makerscience_profile/api.py
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
Enable full location for profile
Enable full location for profile
Python
agpl-3.0
atiberghien/makerscience-server,atiberghien/makerscience-server
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
<commit_before>from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api i...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
<commit_before>from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api i...
58f982d01a7c47a12a7ae600c2ca17cb6c5c7ed9
monitor/runner.py
monitor/runner.py
from time import sleep from monitor.camera import Camera from monitor.plotter_pygame import PyGamePlotter def run(plotter, camera): while True: plotter.show(camera.get_image_data()) sleep(1.0) if __name__ == "main": cam_ioc = "X1-CAM" plo = PyGamePlotter() cam = Camera(cam_ioc) ...
import sys from time import sleep from camera import Camera from plotter_pygame import PyGamePlotter def run(plotter, camera): old_timestamp = -1 while True: data, timestamp = camera.get_image_data() if timestamp != old_timestamp: plotter.show(data) old_timestamp = time...
Update to set screensize and take camera IOC as arg
Update to set screensize and take camera IOC as arg
Python
apache-2.0
nickbattam/picamon,nickbattam/picamon,nickbattam/picamon,nickbattam/picamon
from time import sleep from monitor.camera import Camera from monitor.plotter_pygame import PyGamePlotter def run(plotter, camera): while True: plotter.show(camera.get_image_data()) sleep(1.0) if __name__ == "main": cam_ioc = "X1-CAM" plo = PyGamePlotter() cam = Camera(cam_ioc) ...
import sys from time import sleep from camera import Camera from plotter_pygame import PyGamePlotter def run(plotter, camera): old_timestamp = -1 while True: data, timestamp = camera.get_image_data() if timestamp != old_timestamp: plotter.show(data) old_timestamp = time...
<commit_before>from time import sleep from monitor.camera import Camera from monitor.plotter_pygame import PyGamePlotter def run(plotter, camera): while True: plotter.show(camera.get_image_data()) sleep(1.0) if __name__ == "main": cam_ioc = "X1-CAM" plo = PyGamePlotter() cam = Came...
import sys from time import sleep from camera import Camera from plotter_pygame import PyGamePlotter def run(plotter, camera): old_timestamp = -1 while True: data, timestamp = camera.get_image_data() if timestamp != old_timestamp: plotter.show(data) old_timestamp = time...
from time import sleep from monitor.camera import Camera from monitor.plotter_pygame import PyGamePlotter def run(plotter, camera): while True: plotter.show(camera.get_image_data()) sleep(1.0) if __name__ == "main": cam_ioc = "X1-CAM" plo = PyGamePlotter() cam = Camera(cam_ioc) ...
<commit_before>from time import sleep from monitor.camera import Camera from monitor.plotter_pygame import PyGamePlotter def run(plotter, camera): while True: plotter.show(camera.get_image_data()) sleep(1.0) if __name__ == "main": cam_ioc = "X1-CAM" plo = PyGamePlotter() cam = Came...
2917f396f52eb042f2354f0a7e1d05dd59b819e3
aids/strings/reverse_string.py
aids/strings/reverse_string.py
''' Reverse a string ''' def reverse_string_iterative(string): pass def reverse_string_recursive(string): pass def reverse_string_pythonic(string): return string[::-1]
''' Reverse a string ''' def reverse_string_iterative(string): result = '' for char in range(len(string) - 1, -1 , -1): result += char return result def reverse_string_recursive(string): if string: return reverse_string_recursive(string[1:]) + string[0] return '' def reverse_string_pythonic(string...
Add iterative and recursive solutions to reverse strings
Add iterative and recursive solutions to reverse strings
Python
mit
ueg1990/aids
''' Reverse a string ''' def reverse_string_iterative(string): pass def reverse_string_recursive(string): pass def reverse_string_pythonic(string): return string[::-1]Add iterative and recursive solutions to reverse strings
''' Reverse a string ''' def reverse_string_iterative(string): result = '' for char in range(len(string) - 1, -1 , -1): result += char return result def reverse_string_recursive(string): if string: return reverse_string_recursive(string[1:]) + string[0] return '' def reverse_string_pythonic(string...
<commit_before>''' Reverse a string ''' def reverse_string_iterative(string): pass def reverse_string_recursive(string): pass def reverse_string_pythonic(string): return string[::-1]<commit_msg>Add iterative and recursive solutions to reverse strings<commit_after>
''' Reverse a string ''' def reverse_string_iterative(string): result = '' for char in range(len(string) - 1, -1 , -1): result += char return result def reverse_string_recursive(string): if string: return reverse_string_recursive(string[1:]) + string[0] return '' def reverse_string_pythonic(string...
''' Reverse a string ''' def reverse_string_iterative(string): pass def reverse_string_recursive(string): pass def reverse_string_pythonic(string): return string[::-1]Add iterative and recursive solutions to reverse strings''' Reverse a string ''' def reverse_string_iterative(string): result = '' for char in...
<commit_before>''' Reverse a string ''' def reverse_string_iterative(string): pass def reverse_string_recursive(string): pass def reverse_string_pythonic(string): return string[::-1]<commit_msg>Add iterative and recursive solutions to reverse strings<commit_after>''' Reverse a string ''' def reverse_string_ite...
8af5aaee0aad575c9f1039a2943aff986a501747
tests/manage.py
tests/manage.py
#!/usr/bin/env python import channels.log import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) def get_channels_logger(*args, **kwargs): """Return logger for channels.""" return logging.getLogger("django.channels") #...
#!/usr/bin/env python import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") from django.core.management import execute_from_c...
Fix logging compatibility with the latest Channels
Fix logging compatibility with the latest Channels
Python
apache-2.0
genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio
#!/usr/bin/env python import channels.log import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) def get_channels_logger(*args, **kwargs): """Return logger for channels.""" return logging.getLogger("django.channels") #...
#!/usr/bin/env python import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") from django.core.management import execute_from_c...
<commit_before>#!/usr/bin/env python import channels.log import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) def get_channels_logger(*args, **kwargs): """Return logger for channels.""" return logging.getLogger("django...
#!/usr/bin/env python import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") from django.core.management import execute_from_c...
#!/usr/bin/env python import channels.log import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) def get_channels_logger(*args, **kwargs): """Return logger for channels.""" return logging.getLogger("django.channels") #...
<commit_before>#!/usr/bin/env python import channels.log import logging import os import sys PROJECT_ROOT = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, PROJECT_ROOT) def get_channels_logger(*args, **kwargs): """Return logger for channels.""" return logging.getLogger("django...
f4695f43e9eae5740efc303374c892850dfea1a2
trade_server.py
trade_server.py
import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) if data: res...
import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) response = '' if...
Fix bugs occuring when no response is given.
Fix bugs occuring when no response is given.
Python
mit
Tribler/decentral-market
import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) if data: res...
import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) response = '' if...
<commit_before>import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) if data: ...
import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) response = '' if...
import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) if data: res...
<commit_before>import json import threading import socket import SocketServer from orderbook import asks, bids class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): try: while True: data = self.request.recv(1024) if data: ...
e98eeadb9d5906bf65efc7a17658ae498cfcf27d
chainer/utils/__init__.py
chainer/utils/__init__.py
import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental # NOQA from c...
import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental # NOQA from c...
Make ignore_errors False by default
Make ignore_errors False by default
Python
mit
ronekko/chainer,chainer/chainer,okuta/chainer,wkentaro/chainer,ktnyt/chainer,chainer/chainer,okuta/chainer,niboshi/chainer,chainer/chainer,hvy/chainer,chainer/chainer,rezoo/chainer,keisuke-umezawa/chainer,anaruse/chainer,okuta/chainer,hvy/chainer,keisuke-umezawa/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,keis...
import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental # NOQA from c...
import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental # NOQA from c...
<commit_before>import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental...
import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental # NOQA from c...
import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental # NOQA from c...
<commit_before>import contextlib import shutil import tempfile import numpy from chainer.utils import walker_alias # NOQA # import class and function from chainer.utils.conv import get_conv_outsize # NOQA from chainer.utils.conv import get_deconv_outsize # NOQA from chainer.utils.experimental import experimental...
b423e73ec440d10ff80110c998d13ea8c2b5a764
stock_request_picking_type/models/stock_request_order.py
stock_request_picking_type/models/stock_request_order.py
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
Synchronize Picking Type and Warehouse
[IMP] Synchronize Picking Type and Warehouse [IMP] User write()
Python
agpl-3.0
OCA/stock-logistics-warehouse,OCA/stock-logistics-warehouse,OCA/stock-logistics-warehouse,OCA/stock-logistics-warehouse
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
<commit_before># Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.e...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
<commit_before># Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.e...
d5a2f336d0ea49d68268b355606f69aef8770b24
acute/__init__.py
acute/__init__.py
""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', 'js/opal/control...
""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', 'js/opal/control...
Rename clerking -> Book in
Rename clerking -> Book in
Python
agpl-3.0
openhealthcare/acute,openhealthcare/acute,openhealthcare/acute
""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', 'js/opal/control...
""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', 'js/opal/control...
<commit_before>""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', '...
""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', 'js/opal/control...
""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', 'js/opal/control...
<commit_before>""" acute - Our OPAL Application """ from opal.core import application class Application(application.OpalApplication): schema_module = 'acute.schema' flow_module = 'acute.flow' javascripts = [ 'js/acute/routes.js', 'js/acute/controllers/acute_take_discharge.js', '...
8fd395e1085f0508da401186b09f7487b3f9ae64
odbc2csv.py
odbc2csv.py
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.tables("%", "", "") for row in cur.fetchall(): tables.append(row[2]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: column_names.append(d...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
Fix to fetching tables from MS SQL Server.
Fix to fetching tables from MS SQL Server.
Python
isc
wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.tables("%", "", "") for row in cur.fetchall(): tables.append(row[2]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: column_names.append(d...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
<commit_before>import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.tables("%", "", "") for row in cur.fetchall(): tables.append(row[2]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: column...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.tables("%", "", "") for row in cur.fetchall(): tables.append(row[2]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: column_names.append(d...
<commit_before>import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.tables("%", "", "") for row in cur.fetchall(): tables.append(row[2]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: column...
6a8fadc2d607adaf89e6ea15fca65136fac651c6
src/auspex/instruments/utils.py
src/auspex/instruments/utils.py
from . import bbn import auspex.config from auspex.log import logger from QGL import * ChannelLibrary() def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_name as defined i...
from . import bbn import auspex.config from auspex.log import logger def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_name as defined in measure.yaml """ from QGL im...
Move QGL import inside function
Move QGL import inside function A channel library is not always available
Python
apache-2.0
BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex
from . import bbn import auspex.config from auspex.log import logger from QGL import * ChannelLibrary() def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_name as defined i...
from . import bbn import auspex.config from auspex.log import logger def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_name as defined in measure.yaml """ from QGL im...
<commit_before>from . import bbn import auspex.config from auspex.log import logger from QGL import * ChannelLibrary() def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_na...
from . import bbn import auspex.config from auspex.log import logger def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_name as defined in measure.yaml """ from QGL im...
from . import bbn import auspex.config from auspex.log import logger from QGL import * ChannelLibrary() def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_name as defined i...
<commit_before>from . import bbn import auspex.config from auspex.log import logger from QGL import * ChannelLibrary() def pulse_marker(marker_name, length = 100e-9): """ Utility to generate a square pulse on a APS2 marker. Used for instance to switch a signal between spectrum analyzer and input line marker_na...
89ee95bf33ce504377087de383f56e8582623738
pylab/website/tests/test_comments.py
pylab/website/tests/test_comments.py
import datetime from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1') self.project = Project.obje...
from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1', email='test@example.com') self.project = Pro...
Add email parameter for creating test user
Add email parameter for creating test user
Python
agpl-3.0
python-dirbtuves/website,python-dirbtuves/website,python-dirbtuves/website
import datetime from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1') self.project = Project.obje...
from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1', email='test@example.com') self.project = Pro...
<commit_before>import datetime from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1') self.project...
from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1', email='test@example.com') self.project = Pro...
import datetime from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1') self.project = Project.obje...
<commit_before>import datetime from django_webtest import WebTest from django.contrib.auth.models import User from django_comments.models import Comment from pylab.core.models import Project class CommentsTests(WebTest): def setUp(self): self.user = User.objects.create_user('u1') self.project...
11d9225871fa4980c7782a849c3ecd425edbe806
git_helper.py
git_helper.py
import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(directory): if os....
import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(directory): if os....
Fix error when there is no git
Fix error when there is no git
Python
mit
bradsokol/VcsGutter,biodamasceno/GitGutter,biodamasceno/GitGutter,bradsokol/VcsGutter,robfrawley/sublime-git-gutter,robfrawley/sublime-git-gutter,tushortz/GitGutter,akpersad/GitGutter,michaelhogg/GitGutter,robfrawley/sublime-git-gutter,biodamasceno/GitGutter,akpersad/GitGutter,biodamasceno/GitGutter,natecavanaugh/GitGu...
import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(directory): if os....
import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(directory): if os....
<commit_before>import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(direc...
import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(directory): if os....
import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(directory): if os....
<commit_before>import os def git_file_path(view, git_path): if not git_path: return False full_file_path = view.file_name() git_path_to_file = full_file_path.replace(git_path,'') if git_path_to_file[0] == "/": git_path_to_file = git_path_to_file[1:] return git_path_to_file def git_root(direc...
81880206be25cddc5d47a249eae3975e5070c3f0
haas/utils.py
haas/utils.py
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import importlib import logging import h...
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import haas import logging import sys L...
Revert "Use importlib instead of __import__"
Revert "Use importlib instead of __import__" This reverts commit 1c40e03b487ae3dcef9a683de960f9895936d370.
Python
bsd-3-clause
itziakos/haas,scalative/haas,sjagoe/haas,scalative/haas,sjagoe/haas,itziakos/haas
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import importlib import logging import h...
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import haas import logging import sys L...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import importlib import lo...
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import haas import logging import sys L...
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import importlib import logging import h...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import importlib import lo...
d7a77380ad95e316efb73a7be485d9b882fd64e9
Core/models.py
Core/models.py
from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Room(models.Model): name = models.CharField(max_...
from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Meta: db_table = u'Worlds' class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Meta: db_ta...
Add table names to core model items
Add table names to core model items
Python
mit
Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation
from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Room(models.Model): name = models.CharField(max_...
from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Meta: db_table = u'Worlds' class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Meta: db_ta...
<commit_before>from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Room(models.Model): name = models...
from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Meta: db_table = u'Worlds' class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Meta: db_ta...
from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Room(models.Model): name = models.CharField(max_...
<commit_before>from django.db import models ## # Location Types ## class World(models.Model): name = models.CharField(max_length=30) homes = models.ManyToManyField(Home) class Home(models.Model): name = models.CharField(max_length=30) rooms = models.ManyToManyField(Room) class Room(models.Model): name = models...
239f24cc5dc5c0f25436ca1bfcfc536e30d62587
menu_generator/templatetags/menu_generator.py
menu_generator/templatetags/menu_generator.py
from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.assignment_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable menu list for a gi...
from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.simple_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable menu list for a given ...
Use simple_tag instead of assignment_tag
Use simple_tag instead of assignment_tag The assignment_tag is depraceted and in django-2.0 removed. Signed-off-by: Frantisek Lachman <bae095a6f6bdabf882218c81fdc3947ea1c10590@gmail.com>
Python
mit
yamijuan/django-menu-generator,RADYConsultores/django-menu-generator
from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.assignment_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable menu list for a gi...
from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.simple_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable menu list for a given ...
<commit_before>from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.assignment_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable men...
from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.simple_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable menu list for a given ...
from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.assignment_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable menu list for a gi...
<commit_before>from django import template from django.conf import settings from .utils import get_menu_from_apps from .. import defaults from ..menu import generate_menu register = template.Library() @register.assignment_tag(takes_context=True) def get_menu(context, menu_name): """ Returns a consumable men...
3d0adce620606e4d997946f6ad886dee0403a7dd
pip_package/rlds_version.py
pip_package/rlds_version.py
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Update to version 0.1.1 (already in pypi).
Update to version 0.1.1 (already in pypi). PiperOrigin-RevId: 391948484 Change-Id: Idf5c7f00dbba8ffe2ca292961d4e0e0e26bcd1cb
Python
apache-2.0
google-research/rlds,google-research/rlds
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
6a856e613248e32bd7fc8027adfb9df4d74b2357
candidates/management/commands/candidates_make_party_sets_lookup.py
candidates/management/commands/candidates_make_party_sets_lookup.py
import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): repo_ro...
import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): repo_ro...
Make the party set JS generator output keys in a predictable order
Make the party set JS generator output keys in a predictable order This makes it easier to check with "git diff" if there have been any changes.
Python
agpl-3.0
neavouli/yournextrepresentative,neavouli/yournextrepresentative,mysociety/yournextmp-popit,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,mysociety/yournextrepresentative,mysociety/yournextmp-popit,mysociety/yournextrepresentative,mysociety/yournextmp-popit,datamade/yournextmp-popit,neavouli/yourn...
import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): repo_ro...
import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): repo_ro...
<commit_before>import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): ...
import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): repo_ro...
import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): repo_ro...
<commit_before>import json from os.path import dirname, join, realpath from django.conf import settings from django.core.management.base import BaseCommand from candidates.election_specific import AREA_POST_DATA from candidates.popit import get_all_posts class Command(BaseCommand): def handle(self, **options): ...
c126b7a6b060a30e5d5c698dfa3210786f169b92
camoco/cli/commands/remove.py
camoco/cli/commands/remove.py
import camoco as co def remove(args): print(co.del_dataset(args.type,args.name,safe=args.force))
import camoco as co def remove(args): co.del_dataset(args.type,args.name,safe=args.force) print('Done')
Make stderr messages more interpretable
Make stderr messages more interpretable
Python
mit
schae234/Camoco,schae234/Camoco
import camoco as co def remove(args): print(co.del_dataset(args.type,args.name,safe=args.force)) Make stderr messages more interpretable
import camoco as co def remove(args): co.del_dataset(args.type,args.name,safe=args.force) print('Done')
<commit_before>import camoco as co def remove(args): print(co.del_dataset(args.type,args.name,safe=args.force)) <commit_msg>Make stderr messages more interpretable<commit_after>
import camoco as co def remove(args): co.del_dataset(args.type,args.name,safe=args.force) print('Done')
import camoco as co def remove(args): print(co.del_dataset(args.type,args.name,safe=args.force)) Make stderr messages more interpretableimport camoco as co def remove(args): co.del_dataset(args.type,args.name,safe=args.force) print('Done')
<commit_before>import camoco as co def remove(args): print(co.del_dataset(args.type,args.name,safe=args.force)) <commit_msg>Make stderr messages more interpretable<commit_after>import camoco as co def remove(args): co.del_dataset(args.type,args.name,safe=args.force) print('Done')
fab561da9c54e278e7762380bf043a2fe03e39da
xerox/darwin.py
xerox/darwin.py
# -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess import commands from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError as why: ...
# -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError as why: raise XcodeNotFo...
Use `subprocess.check_output` rather than `commands.getoutput`.
Use `subprocess.check_output` rather than `commands.getoutput`. `commands` is deprecated.
Python
mit
solarce/xerox,kennethreitz/xerox
# -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess import commands from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError as why: ...
# -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError as why: raise XcodeNotFo...
<commit_before># -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess import commands from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError a...
# -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError as why: raise XcodeNotFo...
# -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess import commands from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError as why: ...
<commit_before># -*- coding: utf-8 -*- """ Copy + Paste in OS X """ import subprocess import commands from .base import * def copy(string): """Copy given string into system clipboard.""" try: subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string))) except OSError a...
7816cf0562435176a33add229942ac3ee8e7b94c
yolodex/urls.py
yolodex/urls.py
from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter, EntityView...
from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter, EntityViewSet, E...
Update urlpatterns and remove old patterns pattern
Update urlpatterns and remove old patterns pattern
Python
mit
correctiv/django-yolodex,correctiv/django-yolodex,correctiv/django-yolodex
from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter, EntityView...
from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter, EntityViewSet, E...
<commit_before>from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter,...
from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter, EntityViewSet, E...
from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter, EntityView...
<commit_before>from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from .views import ( RealmView, RealmCorrectionsView, EntitySearchView, EntityListView, EntityDetailView, EntityDetailNetworkEmbedView, ) from .api_views import ( YolodexRouter,...
57810d41ac50284341c42217cfa6ea0917d10f21
zephyr/forms.py
zephyr/forms.py
from django import forms class RegistrationForm(forms.Form): full_name = forms.CharField(max_length=100) email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput, max_length=100)
from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.contrib.auth.models import User def is_unique(value): try: print "foo + " + value User.objects.get(email=value) raise ValidationError(u'%s is already registered' % valu...
Add a custom validator to ensure email uniqueness, include ommitted fields.
Add a custom validator to ensure email uniqueness, include ommitted fields. Previously no check was performed to ensure that the same email wasn't used to register twice. Here we add a validator to perform that check. We also noted that the domain field was omitted, but checked by a client of this class. Therefore, w...
Python
apache-2.0
umkay/zulip,jeffcao/zulip,hafeez3000/zulip,dawran6/zulip,RobotCaleb/zulip,bastianh/zulip,brockwhittaker/zulip,hustlzp/zulip,littledogboy/zulip,aliceriot/zulip,MariaFaBella85/zulip,m1ssou/zulip,Gabriel0402/zulip,JanzTam/zulip,bitemyapp/zulip,amyliu345/zulip,alliejones/zulip,hayderimran7/zulip,dwrpayne/zulip,bastianh/zul...
from django import forms class RegistrationForm(forms.Form): full_name = forms.CharField(max_length=100) email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput, max_length=100) Add a custom validator to ensure email uniqueness, include ommitted fields. Previously no check was per...
from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.contrib.auth.models import User def is_unique(value): try: print "foo + " + value User.objects.get(email=value) raise ValidationError(u'%s is already registered' % valu...
<commit_before>from django import forms class RegistrationForm(forms.Form): full_name = forms.CharField(max_length=100) email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput, max_length=100) <commit_msg>Add a custom validator to ensure email uniqueness, include ommitted fields. ...
from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.contrib.auth.models import User def is_unique(value): try: print "foo + " + value User.objects.get(email=value) raise ValidationError(u'%s is already registered' % valu...
from django import forms class RegistrationForm(forms.Form): full_name = forms.CharField(max_length=100) email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput, max_length=100) Add a custom validator to ensure email uniqueness, include ommitted fields. Previously no check was per...
<commit_before>from django import forms class RegistrationForm(forms.Form): full_name = forms.CharField(max_length=100) email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput, max_length=100) <commit_msg>Add a custom validator to ensure email uniqueness, include ommitted fields. ...
325fed2ef774e708e96d1b123672e1be238d7d21
nailgun/nailgun/models.py
nailgun/nailgun/models.py
from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(max_length=30, pr...
from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(max_length=30, pr...
Allow nodes not to have related environment
Allow nodes not to have related environment
Python
apache-2.0
SmartInfrastructures/fuel-main-dev,nebril/fuel-web,dancn/fuel-main-dev,SergK/fuel-main,zhaochao/fuel-main,nebril/fuel-web,prmtl/fuel-web,zhaochao/fuel-main,eayunstack/fuel-web,nebril/fuel-web,SmartInfrastructures/fuel-main-dev,SmartInfrastructures/fuel-main-dev,teselkin/fuel-main,Fiware/ops.Fuel-main-dev,teselkin/fuel-...
from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(max_length=30, pr...
from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(max_length=30, pr...
<commit_before>from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(ma...
from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(max_length=30, pr...
from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(max_length=30, pr...
<commit_before>from django.db import models from django.contrib.auth.models import User from jsonfield import JSONField class Environment(models.Model): #user = models.ForeignKey(User, related_name='environments') name = models.CharField(max_length=100) class Role(models.Model): id = models.CharField(ma...
23456a32038f13c6219b6af5ff9fff7e1daae242
abusehelper/core/tests/test_utils.py
abusehelper/core/tests/test_utils.py
import pickle import unittest from .. import utils class TestCompressedCollection(unittest.TestCase): def test_collection_can_be_pickled_and_unpickled(self): original = utils.CompressedCollection() original.append("ab") original.append("cd") unpickled = pickle.loads(pickle.dumps(...
import socket import pickle import urllib2 import unittest import idiokit from .. import utils class TestFetchUrl(unittest.TestCase): def test_should_raise_TypeError_when_passing_in_an_opener(self): sock = socket.socket() try: sock.bind(("localhost", 0)) sock.listen(1) ...
Add a test for utils.fetch_url(..., opener=...)
Add a test for utils.fetch_url(..., opener=...) Signed-off-by: Ossi Herrala <37524b811d80bbe1732e3577b04d7a5fd222cfc5@gmail.com>
Python
mit
abusesa/abusehelper
import pickle import unittest from .. import utils class TestCompressedCollection(unittest.TestCase): def test_collection_can_be_pickled_and_unpickled(self): original = utils.CompressedCollection() original.append("ab") original.append("cd") unpickled = pickle.loads(pickle.dumps(...
import socket import pickle import urllib2 import unittest import idiokit from .. import utils class TestFetchUrl(unittest.TestCase): def test_should_raise_TypeError_when_passing_in_an_opener(self): sock = socket.socket() try: sock.bind(("localhost", 0)) sock.listen(1) ...
<commit_before>import pickle import unittest from .. import utils class TestCompressedCollection(unittest.TestCase): def test_collection_can_be_pickled_and_unpickled(self): original = utils.CompressedCollection() original.append("ab") original.append("cd") unpickled = pickle.load...
import socket import pickle import urllib2 import unittest import idiokit from .. import utils class TestFetchUrl(unittest.TestCase): def test_should_raise_TypeError_when_passing_in_an_opener(self): sock = socket.socket() try: sock.bind(("localhost", 0)) sock.listen(1) ...
import pickle import unittest from .. import utils class TestCompressedCollection(unittest.TestCase): def test_collection_can_be_pickled_and_unpickled(self): original = utils.CompressedCollection() original.append("ab") original.append("cd") unpickled = pickle.loads(pickle.dumps(...
<commit_before>import pickle import unittest from .. import utils class TestCompressedCollection(unittest.TestCase): def test_collection_can_be_pickled_and_unpickled(self): original = utils.CompressedCollection() original.append("ab") original.append("cd") unpickled = pickle.load...
567925c770f965c7440b13b63b11b5615bf3c141
src/connection.py
src/connection.py
from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' server = conf['dom...
from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' server = conf['dom...
Add a properly string for outputing
Add a properly string for outputing
Python
mit
manoelhc/restafari,manoelhc/restafari
from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' server = conf['dom...
from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' server = conf['dom...
<commit_before>from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' ser...
from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' server = conf['dom...
from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' server = conf['dom...
<commit_before>from . import output import json import sys import urllib.parse import http.client def getRequest(id, conf): db = conf['db'] headers = conf['headers'] test = db[id] method = test['method'].upper() fullpath = conf['path'] + test['path'] desc = test['desc'] params = '' ser...
a81f78385f8ec9a94d0d511805801d1f0a6f17ed
drogher/shippers/fedex.py
drogher/shippers/fedex.py
from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = self.tracking_number...
import itertools from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = se...
Use itertools.cycle for repeating digits
Use itertools.cycle for repeating digits
Python
bsd-3-clause
jbittel/drogher
from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = self.tracking_number...
import itertools from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = se...
<commit_before>from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = self....
import itertools from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = se...
from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = self.tracking_number...
<commit_before>from .base import Shipper class FedEx(Shipper): shipper = 'FedEx' class FedExExpress(FedEx): barcode_pattern = r'^\d{34}$' @property def tracking_number(self): return self.barcode[20:].lstrip('0') @property def valid_checksum(self): chars, check_digit = self....
b7fcbc3a2117f00177ddd7a353eb6a4dee5bc777
stat_retriever.py
stat_retriever.py
""" stat-retriever by Team-95 stat_retriever.py """ import requests def main(): url = "http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&LeagueID=00&Location=&Month=...
""" stat-retriever by Team-95 stat_retriever.py """ import requests import json def main(): season = "2014-15" url = ("http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&...
Fix formatting once more, added response parsing
Fix formatting once more, added response parsing
Python
mit
Team-95/stat-retriever
""" stat-retriever by Team-95 stat_retriever.py """ import requests def main(): url = "http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&LeagueID=00&Location=&Month=...
""" stat-retriever by Team-95 stat_retriever.py """ import requests import json def main(): season = "2014-15" url = ("http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&...
<commit_before>""" stat-retriever by Team-95 stat_retriever.py """ import requests def main(): url = "http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&LeagueID=00&L...
""" stat-retriever by Team-95 stat_retriever.py """ import requests import json def main(): season = "2014-15" url = ("http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&...
""" stat-retriever by Team-95 stat_retriever.py """ import requests def main(): url = "http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&LeagueID=00&Location=&Month=...
<commit_before>""" stat-retriever by Team-95 stat_retriever.py """ import requests def main(): url = "http://stats.nba.com/stats/leaguedashplayerbiostats?College=&Conference=" "&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=" "&Height=&LastNGames=0&LeagueID=00&L...
ce3249dea725d40d5e0916b344cdde53ab6d53dc
src/satosa/micro_services/processors/scope_extractor_processor.py
src/satosa/micro_services/processors/scope_extractor_processor.py
from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped attribute and ...
from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped attribute and ...
Make the ScopeExtractorProcessor usable for the Primary Identifier
Make the ScopeExtractorProcessor usable for the Primary Identifier This patch adds support to use the ScopeExtractorProcessor on the Primary Identifiert which is, in contrast to the other values, a string. Closes #348
Python
apache-2.0
SUNET/SATOSA,SUNET/SATOSA,its-dirg/SATOSA
from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped attribute and ...
from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped attribute and ...
<commit_before>from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped...
from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped attribute and ...
from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped attribute and ...
<commit_before>from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning from .base_processor import BaseProcessor CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute' CONFIG_DEFAULT_MAPPEDATTRIBUTE = '' class ScopeExtractorProcessor(BaseProcessor): """ Extracts the scope from a scoped...
8445d491030be7fb2fa1175140a4b022b2690425
conman/cms/tests/test_urls.py
conman/cms/tests/test_urls.py
from incuna_test_utils.testcases.urls import URLTestCase from .. import views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSIndex, '/cms/', 'cms:index', )
from unittest import mock from django.test import TestCase from incuna_test_utils.testcases.urls import URLTestCase from .. import urls, views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSI...
Add further tests of the cms urls
Add further tests of the cms urls
Python
bsd-2-clause
meshy/django-conman,Ian-Foote/django-conman,meshy/django-conman
from incuna_test_utils.testcases.urls import URLTestCase from .. import views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSIndex, '/cms/', 'cms:index', ) Add ...
from unittest import mock from django.test import TestCase from incuna_test_utils.testcases.urls import URLTestCase from .. import urls, views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSI...
<commit_before>from incuna_test_utils.testcases.urls import URLTestCase from .. import views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSIndex, '/cms/', 'cms:index',...
from unittest import mock from django.test import TestCase from incuna_test_utils.testcases.urls import URLTestCase from .. import urls, views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSI...
from incuna_test_utils.testcases.urls import URLTestCase from .. import views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSIndex, '/cms/', 'cms:index', ) Add ...
<commit_before>from incuna_test_utils.testcases.urls import URLTestCase from .. import views class TestCMSIndexURL(URLTestCase): """Make sure that the CMSIndex view has a URL""" def test_url(self): self.assert_url_matches_view( views.CMSIndex, '/cms/', 'cms:index',...
748c9728b4de0d19b4e18e3c0e0763dc8d20ba37
queue_job/tests/__init__.py
queue_job/tests/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
Remove deprecated fast_suite and check list for unit tests
Remove deprecated fast_suite and check list for unit tests
Python
agpl-3.0
leorochael/queue
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
3986476071b1c8d2808c02a6885643c509e64456
cymbology/identifiers/cusip.py
cymbology/identifiers/cusip.py
from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = set(chain((c[0] for c in CINS_CODES), string.dig...
from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = frozenset(chain((c[0] for c in CINS_CODES), stri...
Use a frozen set for constant.
Use a frozen set for constant.
Python
bsd-2-clause
pmart123/cymbology,pmart123/security_id
from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = set(chain((c[0] for c in CINS_CODES), string.dig...
from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = frozenset(chain((c[0] for c in CINS_CODES), stri...
<commit_before>from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = set(chain((c[0] for c in CINS_COD...
from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = frozenset(chain((c[0] for c in CINS_CODES), stri...
from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = set(chain((c[0] for c in CINS_CODES), string.dig...
<commit_before>from itertools import chain import string from cymbology.alphanum import CHAR_MAP from cymbology.codes import CINS_CODES from cymbology.exceptions import CountryCodeError from cymbology.luhn import _luhnify from cymbology.validation import SecurityId CUSIP_FIRST_CHAR = set(chain((c[0] for c in CINS_COD...
23fa1c55ec9fcbc595260be1039a4b8481cb4f13
api/comments/views.py
api/comments/views.py
from rest_framework import generics from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment from api.base.utils import get_object_or_error class CommentMixin(object): """Mixin with convenience methods for retrieving the current comment based on th...
from modularodm import Q from modularodm.exceptions import NoResultsFound from rest_framework import generics from rest_framework.exceptions import NotFound from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment class CommentMixin(object): """Mixi...
Return deleted comments instead of throwing error
Return deleted comments instead of throwing error
Python
apache-2.0
kch8qx/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io,kch8qx/osf.io,ZobairAlijan/osf.io,acshi/osf.io,DanielSBrown/osf.io,GageGaskins/osf.io,icereval/osf.io,wearpants/osf.io,mfraezz/osf.io,acshi/osf.io,jnayak1/osf.io,crcresearch/osf.io,danielneis/osf.io,brandonPurvis/osf.io,samanehsan/osf.io,samanehsan/osf.io,SS...
from rest_framework import generics from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment from api.base.utils import get_object_or_error class CommentMixin(object): """Mixin with convenience methods for retrieving the current comment based on th...
from modularodm import Q from modularodm.exceptions import NoResultsFound from rest_framework import generics from rest_framework.exceptions import NotFound from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment class CommentMixin(object): """Mixi...
<commit_before>from rest_framework import generics from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment from api.base.utils import get_object_or_error class CommentMixin(object): """Mixin with convenience methods for retrieving the current comme...
from modularodm import Q from modularodm.exceptions import NoResultsFound from rest_framework import generics from rest_framework.exceptions import NotFound from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment class CommentMixin(object): """Mixi...
from rest_framework import generics from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment from api.base.utils import get_object_or_error class CommentMixin(object): """Mixin with convenience methods for retrieving the current comment based on th...
<commit_before>from rest_framework import generics from api.comments.serializers import CommentSerializer, CommentDetailSerializer from website.project.model import Comment from api.base.utils import get_object_or_error class CommentMixin(object): """Mixin with convenience methods for retrieving the current comme...
f4b35615f772f695e5f87e11ecec7a07e751425d
bot/game/score.py
bot/game/score.py
import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], data["i"], score) ...
import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init__(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], data["i"], score...
Fix missing trailing __ in init function
Fix missing trailing __ in init function
Python
apache-2.0
alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games,alvarogzp/telegram-games
import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], data["i"], score) ...
import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init__(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], data["i"], score...
<commit_before>import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], dat...
import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init__(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], data["i"], score...
import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], data["i"], score) ...
<commit_before>import telegram from game.api import auth MAX_SCORE = 999999 class ScoreUpdater: def __init(self, bot: telegram.Bot): self.bot = bot def set_score(self, data, score): data = auth.decode(data) if data and score < MAX_SCORE: self._do_set_score(data["u"], dat...
10aab1c427a82b4cfef6b07ae1103260e14ca322
geotrek/feedback/admin.py
geotrek/feedback/admin.py
from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTranslationAdmin cla...
from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTranslationAdmin cla...
Fix deleted line during merge
Fix deleted line during merge
Python
bsd-2-clause
makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTranslationAdmin cla...
from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTranslationAdmin cla...
<commit_before>from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTransla...
from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTranslationAdmin cla...
from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTranslationAdmin cla...
<commit_before>from django.conf import settings from django.contrib import admin from geotrek.feedback import models as feedback_models if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.admin import TabbedTranslationAdmin else: from django.contrib.admin import ModelAdmin as TabbedTransla...
d7c4f0471271d104c0ff3500033e425547ca6c27
notification/context_processors.py
notification/context_processors.py
from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), } else: return {}
from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), "notifications": Notice.objects.filter(user=request.user.id) } else: ...
Add user notifications to context processor
Add user notifications to context processor
Python
mit
affan2/django-notification,affan2/django-notification
from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), } else: return {}Add user notifications to context processor
from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), "notifications": Notice.objects.filter(user=request.user.id) } else: ...
<commit_before>from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), } else: return {}<commit_msg>Add user notifications to context p...
from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), "notifications": Notice.objects.filter(user=request.user.id) } else: ...
from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), } else: return {}Add user notifications to context processorfrom notification.m...
<commit_before>from notification.models import Notice def notification(request): if request.user.is_authenticated(): return { "notice_unseen_count": Notice.objects.unseen_count_for(request.user, on_site=True), } else: return {}<commit_msg>Add user notifications to context p...
7b681bfd34a24dc15b219dd355db2557914b7b49
tests/conftest.py
tests/conftest.py
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
Revert previous commit due to arrayfire-python bug.
Revert previous commit due to arrayfire-python bug.
Python
bsd-2-clause
daurer/afnumpy,FilipeMaia/afnumpy
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
<commit_before>import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, a...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
<commit_before>import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, a...
a94a8f0e5c773995da710bb8e90839c7b697db96
cobe/tokenizer.py
cobe/tokenizer.py
# Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally considers [a-z...
# Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally considers [a-z...
Use the re.UNICODE flag (i.e., Python character tables) in findall()
Use the re.UNICODE flag (i.e., Python character tables) in findall()
Python
mit
LeMagnesium/cobe,meska/cobe,wodim/cobe-ng,wodim/cobe-ng,LeMagnesium/cobe,pteichman/cobe,tiagochiavericosta/cobe,pteichman/cobe,meska/cobe,DarkMio/cobe,tiagochiavericosta/cobe,DarkMio/cobe
# Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally considers [a-z...
# Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally considers [a-z...
<commit_before># Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally...
# Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally considers [a-z...
# Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally considers [a-z...
<commit_before># Copyright (C) 2010 Peter Teichman import re class MegaHALTokenizer: def split(self, phrase): if len(phrase) == 0: return [] # add ending punctuation if it is missing if phrase[-1] not in ".!?": phrase = phrase + "." # megahal traditionally...
b7c95f6eed786000278f5719fbf4ac037af20e50
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/factories.py
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/factories.py
from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @post_generation ...
from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @post_generation ...
Update factory-boy's .generate to evaluate
Update factory-boy's .generate to evaluate Co-Authored-By: Timo Halbesma <98c2d5a1e48c998bd9ba9dbc53d6857beae1c9bd@halbesma.com>
Python
bsd-3-clause
pydanny/cookiecutter-django,pydanny/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-dja...
from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @post_generation ...
from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @post_generation ...
<commit_before>from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @p...
from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @post_generation ...
from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @post_generation ...
<commit_before>from typing import Any, Sequence from django.contrib.auth import get_user_model from factory import Faker, post_generation from factory.django import DjangoModelFactory class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") name = Faker("name") @p...
32b35f49c525d6b527de325ecc4837ab7c18b5ad
apiserver/alembic/versions/201711101357_451d4bb125cb_add_ranking_data_to_participants_table.py
apiserver/alembic/versions/201711101357_451d4bb125cb_add_ranking_data_to_participants_table.py
"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revision = '49be219...
"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revision = '49be219...
Rename rank field to avoid column name clash
Rename rank field to avoid column name clash
Python
mit
HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteCh...
"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revision = '49be219...
"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revision = '49be219...
<commit_before>"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revi...
"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revision = '49be219...
"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revision = '49be219...
<commit_before>"""Add ranking data to participants table Revision ID: 451d4bb125cb Revises: 49be2190c22d Create Date: 2017-11-10 13:57:37.807238+00:00 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '451d4bb125cb' down_revi...
c291d032f7b6fba4fcc28ce8495b482d3e93406b
tests/test_ops.py
tests/test_ops.py
# -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.RegisteredClient ...
# -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from .secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.RegisteredClient ...
Make importing secrets explicitly relative
Make importing secrets explicitly relative
Python
mit
nestauk/inet
# -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.RegisteredClient ...
# -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from .secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.RegisteredClient ...
<commit_before># -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.Regis...
# -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from .secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.RegisteredClient ...
# -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.RegisteredClient ...
<commit_before># -*- coding: utf-8 -*- import pytest from epo_ops.middlewares import Dogpile, Throttler from epo_ops.middlewares.throttle.storages import sqlite from inet.sources.ops import OpsClient from secrets import OPS_KEY, OPS_SECRET def test_ops_client_instantiated(): """Test our subclass od epo_ops.Regis...
e9709abadb2daa1a0752fa12b8e017074f0fb098
classes/person.py
classes/person.py
class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def full_name(self): ...
class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def full_name(self): ...
Change full name method to stop validating for str type which is repetitive and has been tested elsewhere
Change full name method to stop validating for str type which is repetitive and has been tested elsewhere
Python
mit
peterpaints/room-allocator
class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def full_name(self): ...
class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def full_name(self): ...
<commit_before>class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def fu...
class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def full_name(self): ...
class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def full_name(self): ...
<commit_before>class Person(object): def __init__(self, person_type, person_name, person_surname="", wants_accommodation="N"): self.person_name = person_name self.person_surname = person_surname self.person_type = person_type self.wants_accommodation = wants_accommodation def fu...
8d43061490c32b204505382ec7b77c18ddc32d9d
conf_site/apps.py
conf_site/apps.py
from django.apps import AppConfig as BaseAppConfig from django.utils.importlib import import_module class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers")
from importlib import import_module from django.apps import AppConfig as BaseAppConfig class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers")
Remove Django importlib in favor of stdlib.
Remove Django importlib in favor of stdlib. Django's copy of importlib was deprecated in 1.7 and therefore removed in Django 1.9: https://docs.djangoproject.com/en/1.10/releases/1.7/#django-utils-dictconfig-django-utils-importlib This is okay, since we are using Python 2.7 and can rely on the copy in the standard lib...
Python
mit
pydata/conf_site,pydata/conf_site,pydata/conf_site
from django.apps import AppConfig as BaseAppConfig from django.utils.importlib import import_module class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers") Remove Django importlib in favor of stdlib. Django's copy of importlib was deprecated in 1.7 a...
from importlib import import_module from django.apps import AppConfig as BaseAppConfig class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers")
<commit_before>from django.apps import AppConfig as BaseAppConfig from django.utils.importlib import import_module class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers") <commit_msg>Remove Django importlib in favor of stdlib. Django's copy of import...
from importlib import import_module from django.apps import AppConfig as BaseAppConfig class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers")
from django.apps import AppConfig as BaseAppConfig from django.utils.importlib import import_module class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers") Remove Django importlib in favor of stdlib. Django's copy of importlib was deprecated in 1.7 a...
<commit_before>from django.apps import AppConfig as BaseAppConfig from django.utils.importlib import import_module class AppConfig(BaseAppConfig): name = "conf_site" def ready(self): import_module("conf_site.receivers") <commit_msg>Remove Django importlib in favor of stdlib. Django's copy of import...
858f993ceffb497bee12457d1d4102339af410a4
typer/__init__.py
typer/__init__.py
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from click.termui im...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, Exit, ) from click.termui import ( # noqa clear, confirm, echo_via_pager, edit, get_terminal_size, getchar, launch, pause, progressb...
Clean exports from typer, remove unneeded Click components
:fire: Clean exports from typer, remove unneeded Click components and add Exit exception
Python
mit
tiangolo/typer,tiangolo/typer
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from click.termui im...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, Exit, ) from click.termui import ( # noqa clear, confirm, echo_via_pager, edit, get_terminal_size, getchar, launch, pause, progressb...
<commit_before>"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from ...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, Exit, ) from click.termui import ( # noqa clear, confirm, echo_via_pager, edit, get_terminal_size, getchar, launch, pause, progressb...
"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from click.termui im...
<commit_before>"""Typer, build great CLIs. Easy to code. Based on Python type hints.""" __version__ = "0.0.4" from click.exceptions import ( # noqa Abort, BadArgumentUsage, BadOptionUsage, BadParameter, ClickException, FileError, MissingParameter, NoSuchOption, UsageError, ) from ...
2833e2296cff6a52ab75c2c88563e81372902035
src/heartbeat/checkers/build.py
src/heartbeat/checkers/build.py
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from pkg_resources import get_distribution, DistributionNotFound def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( 'Missing pack...
from pkg_resources import Requirement, WorkingSet from django.conf import settings from django.core.exceptions import ImproperlyConfigured def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( 'Missing package_name key f...
Package name should be searched through the same distros list we use for listing installed packages. get_distribution is using the global working_set which may not contain the requested package if the initialization(pkg_resources import time) happened before the project name to appear in the sys.path.
Package name should be searched through the same distros list we use for listing installed packages. get_distribution is using the global working_set which may not contain the requested package if the initialization(pkg_resources import time) happened before the project name to appear in the sys.path.
Python
mit
pbs/django-heartbeat
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from pkg_resources import get_distribution, DistributionNotFound def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( 'Missing pack...
from pkg_resources import Requirement, WorkingSet from django.conf import settings from django.core.exceptions import ImproperlyConfigured def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( 'Missing package_name key f...
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from pkg_resources import get_distribution, DistributionNotFound def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( ...
from pkg_resources import Requirement, WorkingSet from django.conf import settings from django.core.exceptions import ImproperlyConfigured def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( 'Missing package_name key f...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from pkg_resources import get_distribution, DistributionNotFound def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( 'Missing pack...
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from pkg_resources import get_distribution, DistributionNotFound def check(request): package_name = settings.HEARTBEAT.get('package_name') if not package_name: raise ImproperlyConfigured( ...
fa776fc0d3c568bda7d84ccd9b345e34c3fcf312
ideascube/mediacenter/tests/factories.py
ideascube/mediacenter/tests/factories.py
from django.conf import settings import factory from ..models import Document class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory.django.FileFie...
from django.conf import settings import factory from ..models import Document class EmptyFileField(factory.django.FileField): DEFAULT_FILENAME = None class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summ...
Allow DocumentFactory to handle preview field.
Allow DocumentFactory to handle preview field. The factory.django.FileField.DEFAULT_FILENAME == 'example.dat'. It means that by default a FileField created by factoryboy is considered as a True value. Before this commit, we were not defining a Document.preview field in the factory so factoryboy created a empty FileFie...
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
from django.conf import settings import factory from ..models import Document class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory.django.FileFie...
from django.conf import settings import factory from ..models import Document class EmptyFileField(factory.django.FileField): DEFAULT_FILENAME = None class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summ...
<commit_before>from django.conf import settings import factory from ..models import Document class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory...
from django.conf import settings import factory from ..models import Document class EmptyFileField(factory.django.FileField): DEFAULT_FILENAME = None class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summ...
from django.conf import settings import factory from ..models import Document class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory.django.FileFie...
<commit_before>from django.conf import settings import factory from ..models import Document class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory...
e0607c27cf990f893d837af5717de684bb62aa63
plugins/spark/__init__.py
plugins/spark/__init__.py
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
Fix spark mode (faulty shutdown conditional logic)
Fix spark mode (faulty shutdown conditional logic)
Python
apache-2.0
Kitware/romanesco,girder/girder_worker,girder/girder_worker,Kitware/romanesco,girder/girder_worker,Kitware/romanesco,Kitware/romanesco
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
<commit_before>import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ ...
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ info = event....
<commit_before>import os import romanesco from . import pyspark_executor, spark SC_KEY = '_romanesco_spark_context' def setup_pyspark_task(event): """ This is executed before a task execution. If it is a pyspark task, we create the spark context here so it can be used for any input conversion. """ ...
e771eeb4595197ae4c147f617c4cf7e5825f279c
object_extractor/named_object.py
object_extractor/named_object.py
from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return max(self.forms.it...
from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return max(self.forms.it...
Remove `objects' group as useless
Remove `objects' group as useless
Python
mit
Lol4t0/named-objects-extractor
from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return max(self.forms.it...
from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return max(self.forms.it...
<commit_before>from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return ma...
from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return max(self.forms.it...
from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return max(self.forms.it...
<commit_before>from collections import defaultdict class EntityForm: def __init__(self): self._score = 0. self.forms = defaultdict(float) def add_form(self, score, normal_form): self._score += score self.forms[normal_form] += score def normal_form(self): return ma...
c6427c035b9d1d38618ebfed33f729e3d10f270d
config.py
config.py
from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): self.bo...
from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): self.bo...
Change set to merge correctly
Change set to merge correctly
Python
mit
BeatButton/beattie,BeatButton/beattie-bot
from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): self.bo...
from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): self.bo...
<commit_before>from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): ...
from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): self.bo...
from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): self.bo...
<commit_before>from katagawa.kg import Katagawa from schema.config import Guild class Config: def __init__(self, bot): dsn = f'postgresql://beattie:passwd@localhost/config' self.db = Katagawa(dsn) self.bot = bot self.bot.loop.create_task(self.db.connect()) def __del__(self): ...
dbda7d542c2f9353a57b63b7508afbf9bc2397cd
examples/address_validation.py
examples/address_validation.py
#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging import binascii from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationRequest # Set this t...
#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationRequest # Set this to the INFO level...
Remove un-necessary binascii module import.
Remove un-necessary binascii module import.
Python
bsd-3-clause
gtaylor/python-fedex,gtaylor/python-fedex,python-fedex-devs/python-fedex,AxiaCore/python-fedex,obr/python-fedex,python-fedex-devs/python-fedex,python-fedex-devs/python-fedex,obr/python-fedex,gtaylor/python-fedex,gtaylor/python-fedex,python-fedex-devs/python-fedex,AxiaCore/python-fedex
#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging import binascii from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationRequest # Set this t...
#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationRequest # Set this to the INFO level...
<commit_before>#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging import binascii from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationReques...
#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationRequest # Set this to the INFO level...
#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging import binascii from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationRequest # Set this t...
<commit_before>#!/usr/bin/env python """ This example shows how to validate addresses. Note that the validation class can handle up to 100 addresses for validation. """ import logging import binascii from example_config import CONFIG_OBJ from fedex.services.address_validation_service import FedexAddressValidationReques...
0fe2cf6b03c6eb11a7cabed9302a1aa312a33b31
django/projects/mysite/run-gevent.py
django/projects/mysite/run-gevent.py
#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys import settings...
#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys import settings...
Allow host/port config in settings file for gevent run script
Allow host/port config in settings file for gevent run script
Python
agpl-3.0
fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID
#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys import settings...
#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys import settings...
<commit_before>#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys ...
#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys import settings...
#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys import settings...
<commit_before>#!/usr/bin/env python # Import gevent monkey and patch everything from gevent import monkey monkey.patch_all(httplib=True) # Import the rest from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp from django.core.management import setup_environ from gevent.wsgi import WSGIServer import sys ...
b1bb08a8ee246774b43e521e8f754cdcc88c418b
gasistafelice/gas/management.py
gasistafelice/gas/management.py
from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and created_models: # `worklows` app was syncronized for the first time ...
from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and "Workflow" in created_models: # `worklows` app was syncronized for th...
Fix in post_syncdb workflow registration
Fix in post_syncdb workflow registration
Python
agpl-3.0
michelesr/gasistafelice,befair/gasistafelice,matteo88/gasistafelice,matteo88/gasistafelice,OrlyMar/gasistafelice,kobe25/gasistafelice,michelesr/gasistafelice,kobe25/gasistafelice,befair/gasistafelice,michelesr/gasistafelice,matteo88/gasistafelice,kobe25/gasistafelice,feroda/gasistafelice,OrlyMar/gasistafelice,michelesr...
from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and created_models: # `worklows` app was syncronized for the first time ...
from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and "Workflow" in created_models: # `worklows` app was syncronized for th...
<commit_before>from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and created_models: # `worklows` app was syncronized for t...
from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and "Workflow" in created_models: # `worklows` app was syncronized for th...
from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and created_models: # `worklows` app was syncronized for the first time ...
<commit_before>from django.db.models.signals import post_syncdb from gasistafelice.gas.workflow_data import workflow_dict def init_workflows(app, created_models, verbosity, **kwargs): app_label = app.__name__.split('.')[-2] if app_label == 'workflows' and created_models: # `worklows` app was syncronized for t...
7080057c9abc6e455222e057315055b3e9965cc9
runtests.py
runtests.py
#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ALLOWED_HOSTS=[ 'testserver', ], INSTALLED_APPS=[ ...
#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command TEST_SETTINGS = { 'DATABASES': { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, 'ALLOWED_HOSTS': [ 'testserver', ], 'INSTALLED_APPS': [...
Set middleware setting according to Django version in test settings
Set middleware setting according to Django version in test settings Django 1.10 introduced new-style middleware and the corresponding MIDDLEWARE setting and deprecated MIDDLEWARE_CLASSES. The latter is ignored on Django 2.
Python
mit
wylee/django-perms
#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ALLOWED_HOSTS=[ 'testserver', ], INSTALLED_APPS=[ ...
#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command TEST_SETTINGS = { 'DATABASES': { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, 'ALLOWED_HOSTS': [ 'testserver', ], 'INSTALLED_APPS': [...
<commit_before>#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ALLOWED_HOSTS=[ 'testserver', ], INSTALL...
#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command TEST_SETTINGS = { 'DATABASES': { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, 'ALLOWED_HOSTS': [ 'testserver', ], 'INSTALLED_APPS': [...
#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ALLOWED_HOSTS=[ 'testserver', ], INSTALLED_APPS=[ ...
<commit_before>#!/usr/bin/env python import django from django.conf import settings from django.core.management import call_command settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ALLOWED_HOSTS=[ 'testserver', ], INSTALL...
4dbc42b0516578d59b315b1ac1fa6ccf3e262f1e
seo/escaped_fragment/app.py
seo/escaped_fragment/app.py
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.startswith("_escap...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.startswith("_escap...
Fix broken content from PhJS
Fix broken content from PhJS
Python
apache-2.0
platformio/platformio-web,orgkhnargh/platformio-web,orgkhnargh/platformio-web,orgkhnargh/platformio-web,platformio/platformio-web
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.startswith("_escap...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.startswith("_escap...
<commit_before># Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.sta...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.startswith("_escap...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.startswith("_escap...
<commit_before># Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. from subprocess import check_output, CalledProcessError from urllib import unquote def application(env, start_response): status = "200 OK" response = "" qs = env.get("QUERY_STRING", None) if not qs or not qs.sta...
fd061738d025b5371c1415a1f5466bcf5f6476b7
py2deb/config/__init__.py
py2deb/config/__init__.py
import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. PKG_REPO = '/tmp/'
import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. if os.getuid() == 0: PKG_REPO = '/var/repos/deb-repo/repository/pl-py2deb' else: PKG_REPO = '/tmp'
Make it work out of the box on the build-server and locally
Make it work out of the box on the build-server and locally
Python
mit
paylogic/py2deb,paylogic/py2deb
import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. PKG_REPO = '/tmp/' Make it work out of the box on the build-server and locally
import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. if os.getuid() == 0: PKG_REPO = '/var/repos/deb-repo/repository/pl-py2deb' else: PKG_REPO = '/tmp'
<commit_before>import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. PKG_REPO = '/tmp/' <commit_msg>Make it work out of the box on the build-server and locally<commit_after>
import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. if os.getuid() == 0: PKG_REPO = '/var/repos/deb-repo/repository/pl-py2deb' else: PKG_REPO = '/tmp'
import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. PKG_REPO = '/tmp/' Make it work out of the box on the build-server and locallyimport os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. if os.getuid() == 0: PKG_REPO = '/va...
<commit_before>import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages. PKG_REPO = '/tmp/' <commit_msg>Make it work out of the box on the build-server and locally<commit_after>import os config_dir = os.path.dirname(os.path.abspath(__file__)) # Destination of built packages....
7fa074929301d610bdba6186267eb0659aed9dd8
python/app/models/game.py
python/app/models/game.py
from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' # # Col...
from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' # # Col...
Fix issue with returning wrong date
Fix issue with returning wrong date
Python
apache-2.0
joostsijm/Supremacy1914,joostsijm/Supremacy1914
from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' # # Col...
from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' # # Col...
<commit_before>from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' ...
from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' # # Col...
from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' # # Col...
<commit_before>from datetime import datetime from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method from .base import Base class Game(Base): # Table name __tablename__ = 'sp_games' ...
b986b437495b4406936b2a139e4e027f6275c9eb
boussole/logs.py
boussole/logs.py
""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name (``debug``, ``i...
""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name (``debug``, ``i...
Use StringIO object from 'io' module instead of deprecated 'StringIO' module
Use StringIO object from 'io' module instead of deprecated 'StringIO' module
Python
mit
sveetch/boussole
""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name (``debug``, ``i...
""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name (``debug``, ``i...
<commit_before>""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name ...
""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name (``debug``, ``i...
""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name (``debug``, ``i...
<commit_before>""" Logging ======= """ import logging import colorlog def init_logger(level, printout=True): """ Initialize app logger to configure its level/handler/formatter/etc.. Todo: * A mean to raise click.Abort or sys.exit when CRITICAL is used; Args: level (str): Level name ...
16ea4f3ca1622604fd79e22b4b674d1dd9e11779
conveyor/store.py
conveyor/store.py
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(object): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def se...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
Fix the inheritence of InMemoryStore
Fix the inheritence of InMemoryStore
Python
bsd-2-clause
crateio/carrier
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(object): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def se...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
<commit_before>class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(object): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data =...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(BaseStore): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def...
class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(object): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data = {} def se...
<commit_before>class BaseStore(object): def set(self, key, value): raise NotImplementedError def get(self, key): raise NotImplementedError class InMemoryStore(object): def __init__(self, *args, **kwargs): super(InMemoryStore, self).__init__(*args, **kwargs) self._data =...
8d9b50b2cd8b0235863c48a84ba5f23af4531765
ynr/apps/parties/tests/test_models.py
ynr/apps/parties/tests/test_models.py
""" Test some of the basic model use cases """ from django.test import TestCase from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TestCase): def setUp(self): PartyFactory.reset_sequence() def test_party_str(self): party = PartyFactory() self.assertEqual(s...
""" Test some of the basic model use cases """ from django.test import TestCase from django.core.files.storage import DefaultStorage from candidates.tests.helpers import TmpMediaRootMixin from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TmpMediaRootMixin, TestCase): def setUp(self):...
Test using tmp media root
Test using tmp media root
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
""" Test some of the basic model use cases """ from django.test import TestCase from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TestCase): def setUp(self): PartyFactory.reset_sequence() def test_party_str(self): party = PartyFactory() self.assertEqual(s...
""" Test some of the basic model use cases """ from django.test import TestCase from django.core.files.storage import DefaultStorage from candidates.tests.helpers import TmpMediaRootMixin from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TmpMediaRootMixin, TestCase): def setUp(self):...
<commit_before>""" Test some of the basic model use cases """ from django.test import TestCase from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TestCase): def setUp(self): PartyFactory.reset_sequence() def test_party_str(self): party = PartyFactory() sel...
""" Test some of the basic model use cases """ from django.test import TestCase from django.core.files.storage import DefaultStorage from candidates.tests.helpers import TmpMediaRootMixin from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TmpMediaRootMixin, TestCase): def setUp(self):...
""" Test some of the basic model use cases """ from django.test import TestCase from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TestCase): def setUp(self): PartyFactory.reset_sequence() def test_party_str(self): party = PartyFactory() self.assertEqual(s...
<commit_before>""" Test some of the basic model use cases """ from django.test import TestCase from .factories import PartyFactory, PartyEmblemFactory class TestPartyModels(TestCase): def setUp(self): PartyFactory.reset_sequence() def test_party_str(self): party = PartyFactory() sel...
b6a2ba81c9ddd642cfa271cab809a5c2511f7204
app/auth/forms.py
app/auth/forms.py
from flask_wtf import Form from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(Form): email = StringField('Email', validators=[ ...
from flask_wtf import FlaskForm from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(FlaskForm): email = StringField('Email', valida...
Change Form to FlaskForm (previous is deprecated)
:art: Change Form to FlaskForm (previous is deprecated)
Python
mit
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
from flask_wtf import Form from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(Form): email = StringField('Email', validators=[ ...
from flask_wtf import FlaskForm from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(FlaskForm): email = StringField('Email', valida...
<commit_before>from flask_wtf import Form from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(Form): email = StringField('Email', v...
from flask_wtf import FlaskForm from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(FlaskForm): email = StringField('Email', valida...
from flask_wtf import Form from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(Form): email = StringField('Email', validators=[ ...
<commit_before>from flask_wtf import Form from wtforms import ( StringField, PasswordField, BooleanField, SubmitField, ValidationError, ) from wtforms.validators import ( InputRequired, Length, Email, Regexp, EqualTo, ) from app.models import User class LoginForm(Form): email = StringField('Email', v...
58544043b8dee4e55bad0be5d889a40c0ae88960
tests/__init__.py
tests/__init__.py
import logging import os import re import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it's a local file ...
import logging import os import re import io import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it's a l...
Fix intermittent errors during test runs.
Fix intermittent errors during test runs.
Python
unlicense
HXLStandard/libhxl-python,HXLStandard/libhxl-python
import logging import os import re import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it's a local file ...
import logging import os import re import io import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it's a l...
<commit_before>import logging import os import re import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it'...
import logging import os import re import io import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it's a l...
import logging import os import re import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it's a local file ...
<commit_before>import logging import os import re import unittest.mock # Default to turning off all but critical logging messages logging.basicConfig(level=logging.CRITICAL) def mock_open_url(url, allow_local=False, timeout=None, verify_ssl=True, http_headers=None): """Open local files instead of URLs. If it'...
2f2b64321a54c93a109c0b65866d724227db9399
tests/conftest.py
tests/conftest.py
from unittest.mock import MagicMock import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="password", email="em...
import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="password", email="email@domain.com"): # create e...
Remove Mock and create "empty" object on the fly
Remove Mock and create "empty" object on the fly
Python
mit
jadolg/rocketchat_API
from unittest.mock import MagicMock import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="password", email="em...
import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="password", email="email@domain.com"): # create e...
<commit_before>from unittest.mock import MagicMock import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="passw...
import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="password", email="email@domain.com"): # create e...
from unittest.mock import MagicMock import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="password", email="em...
<commit_before>from unittest.mock import MagicMock import pytest from rocketchat_API.rocketchat import RocketChat @pytest.fixture(scope="session") def rocket(): _rocket = RocketChat() return _rocket @pytest.fixture(scope="session") def create_user(rocket): def _create_user(name="user1", password="passw...
00f1ff26fcd7d0398d057eee2c7c6f6b2002e959
tests/conftest.py
tests/conftest.py
import pytest @pytest.fixture def event_loop(): print("in event_loop") try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close()
import pytest @pytest.fixture def event_loop(): try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close()
Remove accidentally left in print statement
Remove accidentally left in print statement
Python
mit
kura/blackhole,kura/blackhole
import pytest @pytest.fixture def event_loop(): print("in event_loop") try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close() Remove accidentall...
import pytest @pytest.fixture def event_loop(): try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close()
<commit_before>import pytest @pytest.fixture def event_loop(): print("in event_loop") try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close() <co...
import pytest @pytest.fixture def event_loop(): try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close()
import pytest @pytest.fixture def event_loop(): print("in event_loop") try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close() Remove accidentall...
<commit_before>import pytest @pytest.fixture def event_loop(): print("in event_loop") try: import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) except ImportError: pass loop = asyncio.new_event_loop() yield loop loop.close() <co...
dcebceec83c31fc9b99cb5e232ae066ee229c3bf
tests/conftest.py
tests/conftest.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @pytest.fixture(s...
#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @pytest.fixture(s...
Set fixture scope to module, so that pipes from one file dont influence tests from another
Set fixture scope to module, so that pipes from one file dont influence tests from another
Python
apache-2.0
ceteri/pytextrank,ceteri/pytextrank
#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @pytest.fixture(s...
#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @pytest.fixture(s...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @p...
#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @pytest.fixture(s...
#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @pytest.fixture(s...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # type: ignore """Shared fixture functions.""" import pathlib import pytest # pylint: disable=E0401 import spacy # pylint: disable=E0401 from spacy.language import Language # pylint: disable=E0401 from spacy.tokens import Doc # pylint: disable=E0401 @p...
6b148e4c98628e9ef60cc3ce70c7cdeb8a215c49
scarplet/datasets/base.py
scarplet/datasets/base.py
""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): path = os.path.join(EXAMPLE_DIRECTORY, 'carrizo.tif') data = sl.load(path) re...
""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): """ Load sample dataset containing fault scarps along the San Andreas Fault f...
Add docstrings for load functions
Add docstrings for load functions
Python
mit
rmsare/scarplet,stgl/scarplet
""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): path = os.path.join(EXAMPLE_DIRECTORY, 'carrizo.tif') data = sl.load(path) re...
""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): """ Load sample dataset containing fault scarps along the San Andreas Fault f...
<commit_before>""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): path = os.path.join(EXAMPLE_DIRECTORY, 'carrizo.tif') data = sl.lo...
""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): """ Load sample dataset containing fault scarps along the San Andreas Fault f...
""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): path = os.path.join(EXAMPLE_DIRECTORY, 'carrizo.tif') data = sl.load(path) re...
<commit_before>""" Convenience functions to load example datasets """ import os import scarplet as sl EXAMPLE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data/') def load_carrizo(): path = os.path.join(EXAMPLE_DIRECTORY, 'carrizo.tif') data = sl.lo...
39acab842be6a82d687d4edf6c1d29e7bf293fae
udp_logger.py
udp_logger.py
#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt if __name__ == '__main__': ENDPOINT = ("", 3000) # empty string == INADDR_ANY skt = create_udp_ser...
#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM from optparse import OptionParser def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt def MakeOptionParser(): parser = OptionParser() parser.add_option('-a'...
Support for appending to a file
Support for appending to a file
Python
mit
tmacam/remote_logging_cpp,tmacam/remote_logging_cpp
#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt if __name__ == '__main__': ENDPOINT = ("", 3000) # empty string == INADDR_ANY skt = create_udp_ser...
#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM from optparse import OptionParser def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt def MakeOptionParser(): parser = OptionParser() parser.add_option('-a'...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt if __name__ == '__main__': ENDPOINT = ("", 3000) # empty string == INADDR_ANY skt =...
#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM from optparse import OptionParser def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt def MakeOptionParser(): parser = OptionParser() parser.add_option('-a'...
#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt if __name__ == '__main__': ENDPOINT = ("", 3000) # empty string == INADDR_ANY skt = create_udp_ser...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- from socket import socket, AF_INET, SOCK_DGRAM def create_udp_server_socket(endpoint): skt = socket(AF_INET, SOCK_DGRAM) skt.bind(endpoint) return skt if __name__ == '__main__': ENDPOINT = ("", 3000) # empty string == INADDR_ANY skt =...
3a74774a42521f4b68e484855d103495438095c3
examples/schema/targetinfo.py
examples/schema/targetinfo.py
import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField(jsl.StringField(), max_items=2) rsync = jsl.ArrayField(jsl.StringField(), max_items=2) containers = jsl.ArrayField([ jsl.StringField(), jsl.ArrayField(jsl.StringField()) ])
import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField([ jsl.StringField(), jsl.OneOfField([jsl.StringField(), jsl.NullField()]) ]) rsync = jsl.ArrayField([ jsl.StringField(), jsl.OneOfField([jsl.StringField(), jsl.NullField()]) ]) containers = jsl.Array...
Correct the target info schema: docker and rsync messages are Null in case of success. Suggested by @vinzenz and corrected by @artmello.
Correct the target info schema: docker and rsync messages are Null in case of success. Suggested by @vinzenz and corrected by @artmello.
Python
apache-2.0
leapp-to/snactor
import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField(jsl.StringField(), max_items=2) rsync = jsl.ArrayField(jsl.StringField(), max_items=2) containers = jsl.ArrayField([ jsl.StringField(), jsl.ArrayField(jsl.StringField()) ]) Correct the target info schema: docker and rsy...
import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField([ jsl.StringField(), jsl.OneOfField([jsl.StringField(), jsl.NullField()]) ]) rsync = jsl.ArrayField([ jsl.StringField(), jsl.OneOfField([jsl.StringField(), jsl.NullField()]) ]) containers = jsl.Array...
<commit_before>import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField(jsl.StringField(), max_items=2) rsync = jsl.ArrayField(jsl.StringField(), max_items=2) containers = jsl.ArrayField([ jsl.StringField(), jsl.ArrayField(jsl.StringField()) ]) <commit_msg>Correct the target ...
import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField([ jsl.StringField(), jsl.OneOfField([jsl.StringField(), jsl.NullField()]) ]) rsync = jsl.ArrayField([ jsl.StringField(), jsl.OneOfField([jsl.StringField(), jsl.NullField()]) ]) containers = jsl.Array...
import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField(jsl.StringField(), max_items=2) rsync = jsl.ArrayField(jsl.StringField(), max_items=2) containers = jsl.ArrayField([ jsl.StringField(), jsl.ArrayField(jsl.StringField()) ]) Correct the target info schema: docker and rsy...
<commit_before>import jsl class TargetInfo(jsl.Document): docker = jsl.ArrayField(jsl.StringField(), max_items=2) rsync = jsl.ArrayField(jsl.StringField(), max_items=2) containers = jsl.ArrayField([ jsl.StringField(), jsl.ArrayField(jsl.StringField()) ]) <commit_msg>Correct the target ...
74260bc1b401d9ec500fba1eae72b99c2a2db147
github.py
github.py
import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository( owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { edges { node{ ...
import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository(owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { nodes { ...
Update query to use nodes
Update query to use nodes
Python
mit
ayushgoel/LongShot
import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository( owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { edges { node{ ...
import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository(owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { nodes { ...
<commit_before>import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository( owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { edges { ...
import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository(owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { nodes { ...
import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository( owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { edges { node{ ...
<commit_before>import requests GITHUB_API_URL = "https://api.github.com/graphql" QUERY = """ query($repository_owner:String!, $repository_name: String!, $count: Int!) { repository( owner: $repository_owner, name: $repository_name) { refs(last: $count,refPrefix:"refs/tags/") { edges { ...
05e62b96cfa50934d98d78a86307d94239dd7a4b
Orange/__init__.py
Orange/__init__.py
from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', 'regression', '...
from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', 'regression', '...
Add preprocess to the list of modules lazy-imported in Orange
Add preprocess to the list of modules lazy-imported in Orange
Python
bsd-2-clause
cheral/orange3,qPCR4vir/orange3,kwikadi/orange3,qusp/orange3,cheral/orange3,cheral/orange3,marinkaz/orange3,kwikadi/orange3,kwikadi/orange3,cheral/orange3,qPCR4vir/orange3,qPCR4vir/orange3,qusp/orange3,kwikadi/orange3,marinkaz/orange3,marinkaz/orange3,kwikadi/orange3,qusp/orange3,marinkaz/orange3,qusp/orange3,qPCR4vir/...
from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', 'regression', '...
from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', 'regression', '...
<commit_before>from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', ...
from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', 'regression', '...
from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', 'regression', '...
<commit_before>from .misc.lazy_module import LazyModule from .version import \ short_version as __version__, git_revision as __git_version__ ADDONS_ENTRY_POINT = 'orange.addons' from Orange import data for mod_name in ['classification', 'clustering', 'distance', 'evaluation', 'feature', 'misc', ...
896a9b3d116a6ac2d313c5ea8dbc16345a097138
linguine/ops/StanfordCoreNLP.py
linguine/ops/StanfordCoreNLP.py
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: def __init__(self): # I don't see anywhere to put properties like this path... # For now it's hardcoded and would ...
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: """ When the JSON segments return from the CoreNLP library, they separate the data acquired from each word into their...
Format JSON to be collections of tokens
Format JSON to be collections of tokens When coreNLP returns the JSON payload, it is in an unmanageable format where multiple arrays are made for all parts of speech, tokens, and lemmas. It's much easier to manage when the response is formatted as a list of objects: { "token": "Pineapple", "lemma": "Pineapple", ...
Python
mit
rigatoni/linguine-python,Pastafarians/linguine-python
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: def __init__(self): # I don't see anywhere to put properties like this path... # For now it's hardcoded and would ...
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: """ When the JSON segments return from the CoreNLP library, they separate the data acquired from each word into their...
<commit_before>#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: def __init__(self): # I don't see anywhere to put properties like this path... # For now it's hardc...
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: """ When the JSON segments return from the CoreNLP library, they separate the data acquired from each word into their...
#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: def __init__(self): # I don't see anywhere to put properties like this path... # For now it's hardcoded and would ...
<commit_before>#!/usr/bin/env python import os """ Performs some core NLP operations as a proof of concept for the library. """ from stanford_corenlp_pywrapper import CoreNLP class StanfordCoreNLP: def __init__(self): # I don't see anywhere to put properties like this path... # For now it's hardc...
f473cc24e0f2a41699ed9e684b400cb5cb562ce6
go_contacts/backends/utils.py
go_contacts/backends/utils.py
from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor): try: ...
from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor): try: ...
Change to more generic variable names in _fill_queue
Change to more generic variable names in _fill_queue
Python
bsd-3-clause
praekelt/go-contacts-api,praekelt/go-contacts-api
from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor): try: ...
from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor): try: ...
<commit_before>from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cur...
from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor): try: ...
from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor): try: ...
<commit_before>from vumi.persist.model import VumiRiakError from go_api.collections.errors import CollectionUsageError from go_api.queue import PausingQueueCloseMarker from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def _get_page_of_keys(model_proxy, user_account_key, max_results, cur...
b7b41a160294edd987f73be7817c8b08aa8ed70e
herders/templatetags/utils.py
herders/templatetags/utils.py
from django import template register = template.Library() @register.filter def get_range(value): return range(value) @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter def multiply(value, arg): return value * ar...
from django import template register = template.Library() @register.filter def get_range(value): if value: return range(value) else: return 0 @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter de...
Return 0 with the get_range filter if value is invalid instead of raise exception
Return 0 with the get_range filter if value is invalid instead of raise exception
Python
apache-2.0
porksmash/swarfarm,PeteAndersen/swarfarm,PeteAndersen/swarfarm,porksmash/swarfarm,PeteAndersen/swarfarm,porksmash/swarfarm,porksmash/swarfarm,PeteAndersen/swarfarm
from django import template register = template.Library() @register.filter def get_range(value): return range(value) @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter def multiply(value, arg): return value * ar...
from django import template register = template.Library() @register.filter def get_range(value): if value: return range(value) else: return 0 @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter de...
<commit_before>from django import template register = template.Library() @register.filter def get_range(value): return range(value) @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter def multiply(value, arg): re...
from django import template register = template.Library() @register.filter def get_range(value): if value: return range(value) else: return 0 @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter de...
from django import template register = template.Library() @register.filter def get_range(value): return range(value) @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter def multiply(value, arg): return value * ar...
<commit_before>from django import template register = template.Library() @register.filter def get_range(value): return range(value) @register.filter def absolute(value): return abs(value) @register.filter def subtract(value, arg): return value - arg @register.filter def multiply(value, arg): re...
5704912ea9ba866848b6942d6330d30203d90f8b
raven/__init__.py
raven/__init__.py
""" sentry ~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION = 'unknown' f...
""" raven ~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION = 'unknown' fro...
Correct module name in docstring
Correct module name in docstring
Python
bsd-3-clause
someonehan/raven-python,smarkets/raven-python,inspirehep/raven-python,jmagnusson/raven-python,ewdurbin/raven-python,inspirehep/raven-python,danriti/raven-python,openlabs/raven,daikeren/opbeat_python,arthurlogilab/raven-python,akalipetis/raven-python,beniwohli/apm-agent-python,Photonomie/raven-python,jmagnusson/raven-py...
""" sentry ~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION = 'unknown' f...
""" raven ~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION = 'unknown' fro...
<commit_before>""" sentry ~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION...
""" raven ~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION = 'unknown' fro...
""" sentry ~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION = 'unknown' f...
<commit_before>""" sentry ~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ __all__ = ('VERSION', 'Client', 'load') try: VERSION = __import__('pkg_resources') \ .get_distribution('raven').version except Exception, e: VERSION...
6d018ef0ac8bc020b38dab1dd29dd6e383be2e8e
src/sentry_heroku/plugin.py
src/sentry_heroku/plugin.py
""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def handle(self, reque...
""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def handle(self, reque...
Add url and environment to payload
Add url and environment to payload
Python
apache-2.0
getsentry/sentry-heroku
""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def handle(self, reque...
""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def handle(self, reque...
<commit_before>""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def han...
""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def handle(self, reque...
""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def handle(self, reque...
<commit_before>""" sentry_heroku.plugin ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by Sentry Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. """ import sentry_heroku from sentry.plugins import ReleaseHook, ReleaseTrackingPlugin class HerokuReleaseHook(ReleaseHook): def han...
400289449e164ff168372d9df286acba35926e61
map_points/oauth2/decorators.py
map_points/oauth2/decorators.py
import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): if 'credentials' not in request.ses...
import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): """ Verify if request is author...
Add docstr to auth_required decorator.
Add docstr to auth_required decorator.
Python
mit
nihn/map-points,nihn/map-points,nihn/map-points,nihn/map-points
import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): if 'credentials' not in request.ses...
import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): """ Verify if request is author...
<commit_before>import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): if 'credentials' not...
import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): """ Verify if request is author...
import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): if 'credentials' not in request.ses...
<commit_before>import httplib2 from decorator import decorator from django.core.urlresolvers import reverse from django.shortcuts import redirect from googleapiclient import discovery from oauth2client.client import OAuth2Credentials @decorator def auth_required(f, request, *args, **kwargs): if 'credentials' not...
2502a6c54e4f87d3d344077cce5029e4bbca58d5
taarifa_backend/__init__.py
taarifa_backend/__init__.py
from flask import Flask from flask.ext.mongoengine import MongoEngine import logging # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) app.config["MONGODB_SETTINGS"] = {'DB': "taarifa_backend"} app.config["SECRET_KEY"] = "Kee...
from flask import Flask from flask.ext.mongoengine import MongoEngine import logging from os import environ import urlparse # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) if environ.get('MONGOLAB_URI'): url = urlparse...
Use MongoLab configuration from environment if available
Use MongoLab configuration from environment if available
Python
bsd-3-clause
taarifa/taarifa_backend,taarifa/taarifa_backend,taarifa/taarifa_backend,taarifa/taarifa_backend
from flask import Flask from flask.ext.mongoengine import MongoEngine import logging # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) app.config["MONGODB_SETTINGS"] = {'DB': "taarifa_backend"} app.config["SECRET_KEY"] = "Kee...
from flask import Flask from flask.ext.mongoengine import MongoEngine import logging from os import environ import urlparse # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) if environ.get('MONGOLAB_URI'): url = urlparse...
<commit_before>from flask import Flask from flask.ext.mongoengine import MongoEngine import logging # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) app.config["MONGODB_SETTINGS"] = {'DB': "taarifa_backend"} app.config["SECR...
from flask import Flask from flask.ext.mongoengine import MongoEngine import logging from os import environ import urlparse # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) if environ.get('MONGOLAB_URI'): url = urlparse...
from flask import Flask from flask.ext.mongoengine import MongoEngine import logging # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) app.config["MONGODB_SETTINGS"] = {'DB': "taarifa_backend"} app.config["SECRET_KEY"] = "Kee...
<commit_before>from flask import Flask from flask.ext.mongoengine import MongoEngine import logging # configure the logging logging.basicConfig(level='DEBUG', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') app = Flask(__name__) app.config["MONGODB_SETTINGS"] = {'DB': "taarifa_backend"} app.config["SECR...
389befbf655e6b1608aff79d176365c79c91fe2b
tests/fields/test_string.py
tests/fields/test_string.py
from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage def test_get(se...
from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage def test_get(se...
Update string tests to reflect new behaviour.
Update string tests to reflect new behaviour.
Python
mit
Pr0Ger/protobuf3
from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage def test_get(se...
from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage def test_get(se...
<commit_before>from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage ...
from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage def test_get(se...
from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage def test_get(se...
<commit_before>from protobuf3.fields.string import StringField from protobuf3.message import Message from unittest import TestCase class TestStringField(TestCase): def setUp(self): class StringTestMessage(Message): b = StringField(field_number=2) self.msg_cls = StringTestMessage ...
2d0b44d65a8167a105cbc63e704735b1c360e0c4
api/core/urls.py
api/core/urls.py
from django.urls import path, re_path from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'), re_path('^', views.index, name='index'),...
from django.conf import settings from django.conf.urls.static import static from django.contrib.auth.views import logout from django.urls import path, re_path from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'),...
Handle logout on the backend
Handle logout on the backend
Python
mit
citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement
from django.urls import path, re_path from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'), re_path('^', views.index, name='index'),...
from django.conf import settings from django.conf.urls.static import static from django.contrib.auth.views import logout from django.urls import path, re_path from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'),...
<commit_before>from django.urls import path, re_path from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'), re_path('^', views.index,...
from django.conf import settings from django.conf.urls.static import static from django.contrib.auth.views import logout from django.urls import path, re_path from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'),...
from django.urls import path, re_path from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'), re_path('^', views.index, name='index'),...
<commit_before>from django.urls import path, re_path from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns = static('/compiled/', document_root=settings.BUILD_ROOT) + [ path('go/<path:path>', views.redirector, name='redirector'), re_path('^', views.index,...
e6ae7fc2c30aa8af087b803408359189ece58f30
keystone/common/policies/revoke_event.py
keystone/common/policies/revoke_event.py
# 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, software # distributed under t...
# 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, software # distributed under t...
Move revoke events to DocumentedRuleDefault
Move revoke events to DocumentedRuleDefault The overall goal is to define a richer policy for deployers and operators[0]. To achieve that goal a new policy class was introduce that requires additional parameters when defining policy objects. This patch switches our revoke events policy object to the policy.Documented...
Python
apache-2.0
rajalokan/keystone,mahak/keystone,rajalokan/keystone,ilay09/keystone,openstack/keystone,rajalokan/keystone,openstack/keystone,openstack/keystone,mahak/keystone,ilay09/keystone,mahak/keystone,ilay09/keystone
# 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, software # distributed under t...
# 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, software # distributed under t...
<commit_before># 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, software # dist...
# 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, software # distributed under t...
# 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, software # distributed under t...
<commit_before># 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, software # dist...
5cb8d2a4187d867111b32491df6e53983f124d73
rawkit/raw.py
rawkit/raw.py
from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): libr...
from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): """C...
Add close method to Raw class
Add close method to Raw class Fixes #10
Python
mit
nagyistoce/rawkit,SamWhited/rawkit,photoshell/rawkit
from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): libr...
from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): """C...
<commit_before>from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback...
from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): """C...
from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): libr...
<commit_before>from rawkit.libraw import libraw class Raw(object): def __init__(self, filename=None): self.data = libraw.libraw_init(0) libraw.libraw_open_file(self.data, bytes(filename, 'utf-8')) def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback...
abd5fcac1fa585daa73910273adf429baf671de3
contrib/runners/windows_runner/windows_runner/__init__.py
contrib/runners/windows_runner/windows_runner/__init__.py
# -*- coding: utf-8 -*- # 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 "Licen...
# -*- coding: utf-8 -*- # 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 "Licen...
Remove code we dont need anymore.
Remove code we dont need anymore.
Python
apache-2.0
nzlosh/st2,StackStorm/st2,StackStorm/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,nzlosh/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2
# -*- coding: utf-8 -*- # 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 "Licen...
# -*- coding: utf-8 -*- # 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 "Licen...
<commit_before># -*- coding: utf-8 -*- # 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....
# -*- coding: utf-8 -*- # 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 "Licen...
# -*- coding: utf-8 -*- # 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 "Licen...
<commit_before># -*- coding: utf-8 -*- # 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....
139b0ae83ff4faa633a628c09f61b33b755b3502
dataset/print.py
dataset/print.py
import json with open('short_dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name']
import json with open('dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name']
Fix name to correct dataset JSON file
Fix name to correct dataset JSON file
Python
mit
MaxLikelihood/CODE
import json with open('short_dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name'] Fix name to correct dataset JSON file
import json with open('dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name']
<commit_before>import json with open('short_dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name'] <commit_msg>Fix name to correct dataset JSON file<commit_after>
import json with open('dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name']
import json with open('short_dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name'] Fix name to correct dataset JSON fileimport json with open('dataset_item.json') as dataset_file: d...
<commit_before>import json with open('short_dataset_item.json') as dataset_file: dataset = json.load(dataset_file) for i in range(len(dataset)): if 'Continual' == dataset[i]['frequency']: print dataset[i]['name'] <commit_msg>Fix name to correct dataset JSON file<commit_after>import json with open('d...
6e874375ee1d371a3e6ecb786ade4e1b16d84da5
wafer/kv/views.py
wafer/kv/views.py
from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs to be viewed or edited.""" queryset = ...
from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission from wafer.utils import order_results_by class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs ...
Order paginated KV API results.
Order paginated KV API results.
Python
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs to be viewed or edited.""" queryset = ...
from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission from wafer.utils import order_results_by class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs ...
<commit_before>from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs to be viewed or edited.""" ...
from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission from wafer.utils import order_results_by class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs ...
from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs to be viewed or edited.""" queryset = ...
<commit_before>from rest_framework import viewsets from wafer.kv.models import KeyValue from wafer.kv.serializers import KeyValueSerializer from wafer.kv.permissions import KeyValueGroupPermission class KeyValueViewSet(viewsets.ModelViewSet): """API endpoint that allows key-value pairs to be viewed or edited.""" ...
d8872865cc7159ffeeae45a860b97cd241f95c6e
vispy/visuals/tests/test_arrows.py
vispy/visuals/tests/test_arrows.py
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application, TestingCanvas...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application, TestingCanvas...
Disable antialias for GL drawing lines
Disable antialias for GL drawing lines
Python
bsd-3-clause
inclement/vispy,michaelaye/vispy,srinathv/vispy,jay3sh/vispy,julienr/vispy,QuLogic/vispy,jay3sh/vispy,julienr/vispy,ghisvail/vispy,drufat/vispy,Eric89GXL/vispy,inclement/vispy,RebeccaWPerry/vispy,michaelaye/vispy,kkuunnddaannkk/vispy,Eric89GXL/vispy,jdreaver/vispy,sbtlaarzc/vispy,srinathv/vispy,Eric89GXL/vispy,drufat/v...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application, TestingCanvas...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application, TestingCanvas...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application, TestingCanvas...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application, TestingCanvas...
<commit_before># -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from vispy.visuals.line.arrow import ARROW_TYPES from vispy.scene import visuals, transforms from vispy.testing import (requires_application...
c5548840286084f477f689d87539be73751ab784
accio/users/models.py
accio/users/models.py
from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_staff = True super().save(*args, ...
from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_active = False super().save(*args...
Make users be inactive on creation
fix: Make users be inactive on creation
Python
mit
relekang/accio,relekang/accio,relekang/accio
from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_staff = True super().save(*args, ...
from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_active = False super().save(*args...
<commit_before>from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_staff = True super...
from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_active = False super().save(*args...
from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_staff = True super().save(*args, ...
<commit_before>from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth class User(AbstractUser): def save(self, *args, **kwargs): if not self.pk: self.is_staff = True super...
a1be6021c4d13b1212dff74dc981a602951994fb
erpnext/patches/v4_0/customer_discount_to_pricing_rule.py
erpnext/patches/v4_0/customer_discount_to_pricing_rule.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule") frappe.db.au...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule") frappe.db.au...
Fix in pricing rule patch
Fix in pricing rule patch
Python
agpl-3.0
mbauskar/omnitech-erpnext,indictranstech/internal-erpnext,pawaranand/phrerp,SPKian/Testing,indictranstech/reciphergroup-erpnext,Drooids/erpnext,suyashphadtare/gd-erp,shft117/SteckerApp,hernad/erpnext,pawaranand/phrerp,pombredanne/erpnext,rohitwaghchaure/digitales_erpnext,Tejal011089/trufil-erpnext,suyashphadtare/sajil-...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule") frappe.db.au...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule") frappe.db.au...
<commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule")...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule") frappe.db.au...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule") frappe.db.au...
<commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of def execute(): frappe.reload_doc("accounts", "doctype", "pricing_rule")...
701d312815fe6f193e1e555abe9fc65f9cee0567
core/management/commands/send_tweets.py
core/management/commands/send_tweets.py
import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__lte=5): ...
import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__lte=5): ...
Use ENJAZACESSS when is access is provided
Use ENJAZACESSS when is access is provided
Python
agpl-3.0
enjaz/enjaz,enjaz/enjaz,osamak/student-portal,osamak/student-portal,enjaz/enjaz,enjaz/enjaz,enjaz/enjaz,osamak/student-portal,osamak/student-portal,osamak/student-portal
import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__lte=5): ...
import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__lte=5): ...
<commit_before>import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__l...
import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__lte=5): ...
import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__lte=5): ...
<commit_before>import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trials__l...
7d271c3f221d5fade656cd94d2a56fab0fc3b928
dsub/_dsub_version.py
dsub/_dsub_version.py
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Update dsub version to 0.4.5.dev0
Update dsub version to 0.4.5.dev0 PiperOrigin-RevId: 358198209
Python
apache-2.0
DataBiosphere/dsub,DataBiosphere/dsub
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
d324b27e41aee52b044e5647a4a13aecc9130c3e
tests/conftest.py
tests/conftest.py
import pytest from utils import * from pgcli.pgexecute import PGExecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.close() @pytest.fixture def cursor(connection): ...
import pytest from utils import (POSTGRES_HOST, POSTGRES_USER, create_db, db_connection, drop_tables) import pgcli.pgexecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.c...
Replace splat import in tests.
Replace splat import in tests.
Python
bsd-3-clause
koljonen/pgcli,darikg/pgcli,n-someya/pgcli,thedrow/pgcli,dbcli/vcli,joewalnes/pgcli,zhiyuanshi/pgcli,thedrow/pgcli,darikg/pgcli,janusnic/pgcli,bitemyapp/pgcli,dbcli/pgcli,MattOates/pgcli,suzukaze/pgcli,bitmonk/pgcli,bitmonk/pgcli,johshoff/pgcli,nosun/pgcli,d33tah/pgcli,johshoff/pgcli,koljonen/pgcli,lk1ngaa7/pgcli,zhiyu...
import pytest from utils import * from pgcli.pgexecute import PGExecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.close() @pytest.fixture def cursor(connection): ...
import pytest from utils import (POSTGRES_HOST, POSTGRES_USER, create_db, db_connection, drop_tables) import pgcli.pgexecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.c...
<commit_before>import pytest from utils import * from pgcli.pgexecute import PGExecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.close() @pytest.fixture def cursor(co...
import pytest from utils import (POSTGRES_HOST, POSTGRES_USER, create_db, db_connection, drop_tables) import pgcli.pgexecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.c...
import pytest from utils import * from pgcli.pgexecute import PGExecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.close() @pytest.fixture def cursor(connection): ...
<commit_before>import pytest from utils import * from pgcli.pgexecute import PGExecute @pytest.yield_fixture(scope="function") def connection(): create_db('_test_db') connection = db_connection('_test_db') yield connection drop_tables(connection) connection.close() @pytest.fixture def cursor(co...
e5beaabc66cbb87f63e2648b277bada72ddec7dc
tests/conftest.py
tests/conftest.py
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
Allow unsafe change of backend for testing
Allow unsafe change of backend for testing
Python
bsd-2-clause
FilipeMaia/afnumpy,daurer/afnumpy
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
<commit_before>import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, a...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, autouse=True) de...
<commit_before>import arrayfire import pytest backends = arrayfire.library.get_available_backends() # do not use opencl backend, it's kinda broken #backends = [x for x in backends if x != 'opencl'] # This will set the different backends before each test is executed @pytest.fixture(scope="function", params=backends, a...
c5a617db987fda0302cf5963bbc41e8d0887347d
tests/conftest.py
tests/conftest.py
import pytest @pytest.fixture def observe(monkeypatch): def patch(module, func): original_func = getattr(module, func) def wrapper(*args, **kwargs): result = original_func(*args, **kwargs) self.calls[self.last_call] = (args, kwargs, result) self.last_call += 1 ...
import pytest @pytest.fixture def observe(monkeypatch): """ Wrap a function so its call history can be inspected. Example: # foo.py def func(bar): return 2 * bar # test.py import pytest import foo def test_func(observe): observer = observe(foo, "func") a...
Clean up test helper, add example
Clean up test helper, add example
Python
mit
numberoverzero/pyservice
import pytest @pytest.fixture def observe(monkeypatch): def patch(module, func): original_func = getattr(module, func) def wrapper(*args, **kwargs): result = original_func(*args, **kwargs) self.calls[self.last_call] = (args, kwargs, result) self.last_call += 1 ...
import pytest @pytest.fixture def observe(monkeypatch): """ Wrap a function so its call history can be inspected. Example: # foo.py def func(bar): return 2 * bar # test.py import pytest import foo def test_func(observe): observer = observe(foo, "func") a...
<commit_before>import pytest @pytest.fixture def observe(monkeypatch): def patch(module, func): original_func = getattr(module, func) def wrapper(*args, **kwargs): result = original_func(*args, **kwargs) self.calls[self.last_call] = (args, kwargs, result) self....
import pytest @pytest.fixture def observe(monkeypatch): """ Wrap a function so its call history can be inspected. Example: # foo.py def func(bar): return 2 * bar # test.py import pytest import foo def test_func(observe): observer = observe(foo, "func") a...
import pytest @pytest.fixture def observe(monkeypatch): def patch(module, func): original_func = getattr(module, func) def wrapper(*args, **kwargs): result = original_func(*args, **kwargs) self.calls[self.last_call] = (args, kwargs, result) self.last_call += 1 ...
<commit_before>import pytest @pytest.fixture def observe(monkeypatch): def patch(module, func): original_func = getattr(module, func) def wrapper(*args, **kwargs): result = original_func(*args, **kwargs) self.calls[self.last_call] = (args, kwargs, result) self....
dec3ec25739e78c465fd5e31a161a674331edbed
serpent/cv.py
serpent/cv.py
import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): result_image = N...
import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): result_image = N...
Change scale range to normalization with source and target min max
Change scale range to normalization with source and target min max
Python
mit
SerpentAI/SerpentAI
import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): result_image = N...
import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): result_image = N...
<commit_before>import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): r...
import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): result_image = N...
import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): result_image = N...
<commit_before>import numpy as np import skimage.io import skimage.util import os def extract_region_from_image(image, region_bounding_box): return image[region_bounding_box[0]:region_bounding_box[2], region_bounding_box[1]:region_bounding_box[3]] def isolate_sprite(image_region_path, output_file_path): r...
7157843c2469fd837cb30df182ad69583790b9eb
makeaface/makeaface/urls.py
makeaface/makeaface/urls.py
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
Handle when /grid ends with a period, since Twitter let apgwoz link to it that way
Handle when /grid ends with a period, since Twitter let apgwoz link to it that way
Python
mit
markpasc/make-a-face,markpasc/make-a-face
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
<commit_before>from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), ...
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), url(r'^entry/(...
<commit_before>from django.conf.urls.defaults import * from motion.feeds import PublicEventsFeed urlpatterns = patterns('', url(r'^$', 'makeaface.views.home', name='home'), url(r'^$', 'makeaface.views.home', name='group_events'), url(r'^authorize/?$', 'makeaface.views.authorize', name='authorize'), ...
4fda69c972f223354b27b89981751e2ae490a98e
plumeria/plugins/discord.py
plumeria/plugins/discord.py
from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Example:: /r...
from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Example:: /r...
Fix typo in the Discord plugin.
Fix typo in the Discord plugin.
Python
mit
sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria
from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Example:: /r...
from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Example:: /r...
<commit_before>from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Exampl...
from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Example:: /r...
from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Example:: /r...
<commit_before>from plumeria.command import commands, channel_only from plumeria.message import Response @commands.register('roles', category='Discord') @channel_only async def roles(message): """ Gets the roles in the current server, including their name and ID. Intended for development purposes. Exampl...
fedf1df20418169a377012c22bf81f758e2978e8
tests/test_dbg.py
tests/test_dbg.py
import pytest from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree) def test_add_single_kmer(): _test_add_single_km...
import pytest from utils import * from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree, _te...
Add right tip structure tests
Add right tip structure tests
Python
mit
camillescott/boink,camillescott/boink,camillescott/boink,camillescott/boink
import pytest from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree) def test_add_single_kmer(): _test_add_single_km...
import pytest from utils import * from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree, _te...
<commit_before>import pytest from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree) def test_add_single_kmer(): _tes...
import pytest from utils import * from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree, _te...
import pytest from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree) def test_add_single_kmer(): _test_add_single_km...
<commit_before>import pytest from boink.dbg_tests import (_test_add_single_kmer, _test_add_two_kmers, _test_kmer_degree, _test_kmer_in_degree, _test_kmer_out_degree) def test_add_single_kmer(): _tes...
568c3466844ec9b27fbe7e3a4e1bae772203923d
touch/__init__.py
touch/__init__.py
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 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(...
Update timestamps of generated feeds as well
Update timestamps of generated feeds as well
Python
agpl-3.0
frickp/pelican-plugins,UHBiocomputation/pelican-plugins,xsteadfastx/pelican-plugins,mikitex70/pelican-plugins,jantman/pelican-plugins,proteansec/pelican-plugins,lindzey/pelican-plugins,farseerfc/pelican-plugins,davidmarquis/pelican-plugins,UHBiocomputation/pelican-plugins,makefu/pelican-plugins,mwcz/pelican-plugins,goe...
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 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 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...
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 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 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...
99c8024b5568650d4efc9de197b48d93bb099267
eulfedora/__init__.py
eulfedora/__init__.py
# file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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 # ...
# file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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 # ...
Set version to 1.1.0 final
Set version to 1.1.0 final
Python
apache-2.0
bodleian/eulfedora,WSULib/eulfedora
# file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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 # ...
# file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
<commit_before># file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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...
# file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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 # ...
# file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
<commit_before># file eulfedora/__init__.py # # Copyright 2010,2011 Emory University Libraries # # 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...
cbd0855feb9164182b58b36ee487716fd5a33689
forms/subject.py
forms/subject.py
from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired, Length class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') grade = Stri...
from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') grade = StringField(...
Remove Unused Length imported from wtforms.validators, pylint.
Remove Unused Length imported from wtforms.validators, pylint.
Python
mit
openedoo/module_employee,openedoo/module_employee,openedoo/module_employee
from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired, Length class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') grade = Stri...
from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') grade = StringField(...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired, Length class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') ...
from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') grade = StringField(...
from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired, Length class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') grade = Stri...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField from wtforms.validators import DataRequired, Length class AddSubjectForm(FlaskForm): code = StringField('Code', validators=[DataRequired()]) name = StringField('Name', validators=[DataRequired()]) major = StringField('Major') ...
394262effa690eda51ba9ee29aa86d98c683e17d
foundry/tests.py
foundry/tests.py
from django.core import management from django.test import TestCase from django.contrib.contenttypes.models import ContentType from post.models import Post from foundry.models import Member, Listing class TestCase(TestCase): def setUp(self): # Post-syncdb steps management.call_command('migrate'...
from django.core import management from django.utils import unittest from django.contrib.contenttypes.models import ContentType from django.test.client import Client from post.models import Post from foundry.models import Member, Listing class TestCase(unittest.TestCase): def setUp(self): self.client =...
Add test to show login form is broken
Add test to show login form is broken
Python
bsd-3-clause
praekelt/jmbo-foundry,praekelt/jmbo-foundry,praekelt/jmbo-foundry
from django.core import management from django.test import TestCase from django.contrib.contenttypes.models import ContentType from post.models import Post from foundry.models import Member, Listing class TestCase(TestCase): def setUp(self): # Post-syncdb steps management.call_command('migrate'...
from django.core import management from django.utils import unittest from django.contrib.contenttypes.models import ContentType from django.test.client import Client from post.models import Post from foundry.models import Member, Listing class TestCase(unittest.TestCase): def setUp(self): self.client =...
<commit_before>from django.core import management from django.test import TestCase from django.contrib.contenttypes.models import ContentType from post.models import Post from foundry.models import Member, Listing class TestCase(TestCase): def setUp(self): # Post-syncdb steps management.call_co...
from django.core import management from django.utils import unittest from django.contrib.contenttypes.models import ContentType from django.test.client import Client from post.models import Post from foundry.models import Member, Listing class TestCase(unittest.TestCase): def setUp(self): self.client =...
from django.core import management from django.test import TestCase from django.contrib.contenttypes.models import ContentType from post.models import Post from foundry.models import Member, Listing class TestCase(TestCase): def setUp(self): # Post-syncdb steps management.call_command('migrate'...
<commit_before>from django.core import management from django.test import TestCase from django.contrib.contenttypes.models import ContentType from post.models import Post from foundry.models import Member, Listing class TestCase(TestCase): def setUp(self): # Post-syncdb steps management.call_co...
332452cf7ccd6d3ee583be9a6aac27b14771263f
source/services/omdb_service.py
source/services/omdb_service.py
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': 'json', 'tomatoe...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': 'json', 'tomatoe...
Add url to RTRating object
Add url to RTRating object
Python
mit
jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': 'json', 'tomatoe...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': 'json', 'tomatoe...
<commit_before>import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': '...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': 'json', 'tomatoe...
import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': 'json', 'tomatoe...
<commit_before>import requests from bs4 import BeautifulSoup from source.models.rt_rating import RTRating class OmdbService: __API_URL = 'http://www.omdbapi.com/?' def __init__(self, movie_id): self.id = movie_id def get_rt_rating(self): payload = {'i': self.id, 'plot': 'short', 'r': '...
7ea80522ae56c314b2230fe95d3b5ae939181d40
cactus/logger.py
cactus/logger.py
import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } if type(re...
import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } if type(re...
Use common colors, Reset after message.
Use common colors, Reset after message. Switch to colors that don't mess up on using light color schemes.
Python
bsd-3-clause
koenbok/Cactus,koenbok/Cactus,eudicots/Cactus,koenbok/Cactus,eudicots/Cactus,eudicots/Cactus
import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } if type(re...
import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } if type(re...
<commit_before>import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } ...
import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } if type(re...
import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } if type(re...
<commit_before>import os import logging import types import json import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record) } ...