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
4336a5d3eaf5500a6f3041b30c7887361dea5737
tests/test_formatting.py
tests/test_formatting.py
# -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph without r...
# -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph without r...
Add failing test for formatting
Add failing test for formatting
Python
bsd-3-clause
her0e1c1/click,MakerDAO/click,Akasurde/click,scalp42/click,khwilson/click,polinom/click,amjith/click,hellodk/click,jvrsantacruz/click,naoyat/click,lucius-feng/click,dastergon/click,TomRegan/click,hackebrot/click,cbandera/click,oss6/click,GeoffColburn/click,willingc/click,pallets/click,pgkelley4/click,glorizen/click,mit...
# -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph without r...
# -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph without r...
<commit_before># -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph ...
# -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph without r...
# -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph without r...
<commit_before># -*- coding: utf-8 -*- import click def test_basic_functionality(runner): @click.command() def cli(): """First paragraph. This is a very long second paragraph and not correctly wrapped but it will be rewrapped. \b This is a paragraph ...
cb2dec164b18dc671dabdafe221bfd6aac4fc01e
onitu/drivers/local_storage/tests/driver.py
onitu/drivers/local_storage/tests/driver.py
import os import sh from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.cre...
import os from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.create() ...
Remove dependency to sh in the tests
LocalStorage: Remove dependency to sh in the tests
Python
mit
onitu/onitu,onitu/onitu,onitu/onitu
import os import sh from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.cre...
import os from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.create() ...
<commit_before>import os import sh from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['ro...
import os from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.create() ...
import os import sh from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['root'] = dirs.cre...
<commit_before>import os import sh from path import path from tests.utils.testdriver import TestDriver from tests.utils import files from tests.utils.tempdirs import dirs class Driver(TestDriver): SPEED_BUMP = 1 def __init__(self, *args, **options): if 'root' not in options: options['ro...
219f67e3e15c548b81211b0baff475621f66a7fa
scripts/dbutil/compute_asos_sts.py
scripts/dbutil/compute_asos_sts.py
# Look into the ASOS database and figure out the start time of various # sites for a given network. import sys sys.path.insert(0, '../lib') import db, network asos = db.connect('asos') mesosite = db.connect('mesosite') net = sys.argv[1] table = network.Table( net ) ids = `tuple(table.sts.keys())` rs = asos.query("...
# Look into the ASOS database and figure out the start time of various # sites for a given network. import iemdb, network, sys asos = iemdb.connect('asos', bypass=True) acursor = asos.cursor() mesosite = iemdb.connect('mesosite') mcursor = mesosite.cursor() net = sys.argv[1] table = network.Table( net ) ids = `tup...
Make the output less noisey, more informative
Make the output less noisey, more informative
Python
mit
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
# Look into the ASOS database and figure out the start time of various # sites for a given network. import sys sys.path.insert(0, '../lib') import db, network asos = db.connect('asos') mesosite = db.connect('mesosite') net = sys.argv[1] table = network.Table( net ) ids = `tuple(table.sts.keys())` rs = asos.query("...
# Look into the ASOS database and figure out the start time of various # sites for a given network. import iemdb, network, sys asos = iemdb.connect('asos', bypass=True) acursor = asos.cursor() mesosite = iemdb.connect('mesosite') mcursor = mesosite.cursor() net = sys.argv[1] table = network.Table( net ) ids = `tup...
<commit_before># Look into the ASOS database and figure out the start time of various # sites for a given network. import sys sys.path.insert(0, '../lib') import db, network asos = db.connect('asos') mesosite = db.connect('mesosite') net = sys.argv[1] table = network.Table( net ) ids = `tuple(table.sts.keys())` rs...
# Look into the ASOS database and figure out the start time of various # sites for a given network. import iemdb, network, sys asos = iemdb.connect('asos', bypass=True) acursor = asos.cursor() mesosite = iemdb.connect('mesosite') mcursor = mesosite.cursor() net = sys.argv[1] table = network.Table( net ) ids = `tup...
# Look into the ASOS database and figure out the start time of various # sites for a given network. import sys sys.path.insert(0, '../lib') import db, network asos = db.connect('asos') mesosite = db.connect('mesosite') net = sys.argv[1] table = network.Table( net ) ids = `tuple(table.sts.keys())` rs = asos.query("...
<commit_before># Look into the ASOS database and figure out the start time of various # sites for a given network. import sys sys.path.insert(0, '../lib') import db, network asos = db.connect('asos') mesosite = db.connect('mesosite') net = sys.argv[1] table = network.Table( net ) ids = `tuple(table.sts.keys())` rs...
9ea29573841307ffe24b597dd8d1e0b783f81a2a
tests/app/views/test_application.py
tests/app/views/test_application.py
import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_should_have_analytics_on_page(self): res = self.client.get('/') assert_equ...
import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_analytics_code_should_be_in_javascript(self): res = self.client.get('/static/javas...
Correct test to point at application.js
Correct test to point at application.js The JS to search was previously in the page rather than concatenated into the main JavaScript file.
Python
mit
alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,mtekel/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalm...
import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_should_have_analytics_on_page(self): res = self.client.get('/') assert_equ...
import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_analytics_code_should_be_in_javascript(self): res = self.client.get('/static/javas...
<commit_before>import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_should_have_analytics_on_page(self): res = self.client.get('/') ...
import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_analytics_code_should_be_in_javascript(self): res = self.client.get('/static/javas...
import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_should_have_analytics_on_page(self): res = self.client.get('/') assert_equ...
<commit_before>import mock from nose.tools import assert_equal, assert_true from ...helpers import BaseApplicationTest class TestApplication(BaseApplicationTest): def setup(self): super(TestApplication, self).setup() def test_should_have_analytics_on_page(self): res = self.client.get('/') ...
e0adf4df50dcb366e7977f46e1f09ca04dd48cf2
blockbuster/bb_logging.py
blockbuster/bb_logging.py
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
Update log output so that it works more nicely with ELK
Update log output so that it works more nicely with ELK
Python
mit
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
<commit_before>import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.hand...
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.handlers.TimedRotat...
<commit_before>import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger('bb_log') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging.hand...
f7a1a849161007e3703b41758e99dd45609c9753
renovation_tax_be/models/account_invoice.py
renovation_tax_be/models/account_invoice.py
from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: line._onchange_product_id()
from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: price = line.unit_price line._onchange_product_id() line.unit_price ...
Fix loss of unit price if edited
Fix loss of unit price if edited
Python
agpl-3.0
Somko/Odoo-Public,Somko/Odoo-Public
from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: line._onchange_product_id() Fix loss of unit price if edited
from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: price = line.unit_price line._onchange_product_id() line.unit_price ...
<commit_before>from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: line._onchange_product_id() <commit_msg>Fix loss of unit price if edited<comm...
from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: price = line.unit_price line._onchange_product_id() line.unit_price ...
from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: line._onchange_product_id() Fix loss of unit price if editedfrom odoo import models, api c...
<commit_before>from odoo import models, api class AccountInvoice(models.Model): _inherit = "account.invoice" @api.onchange('fiscal_position_id') def somko_update_tax(self): for line in self.invoice_line_ids: line._onchange_product_id() <commit_msg>Fix loss of unit price if edited<comm...
a9e9705e6963569cb0c88135ce539320aef77ed6
examples/explorer/settings.py
examples/explorer/settings.py
import os from rororo import GET, static # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), )
import os from rororo import GET # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), )
Remove unnecessary import in explorer example.
Remove unnecessary import in explorer example.
Python
bsd-3-clause
playpauseandstop/rororo,playpauseandstop/rororo
import os from rororo import GET, static # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), ) Remove unnecessary import i...
import os from rororo import GET # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), )
<commit_before>import os from rororo import GET, static # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), ) <commit_msg>...
import os from rororo import GET # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), )
import os from rororo import GET, static # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), ) Remove unnecessary import i...
<commit_before>import os from rororo import GET, static # Debug settings DEBUG = True # Explorer settings ROOT_DIR = os.path.expanduser('~') SHOW_HIDDEN_ITEMS = True # List of available routes ROUTES = ('', GET('/{path:path}', 'views.explorer', name='explorer', renderer='explorer.html'), ) <commit_msg>...
c22c7a63c85b52c4e05ac0fe6a9f05960705872b
tests/test_application.py
tests/test_application.py
# Copyright 2013 Donald Stufft # # 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, so...
# Copyright 2013 Donald Stufft # # 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, so...
Test the cli instantiation a bit better
Test the cli instantiation a bit better
Python
apache-2.0
techtonik/warehouse,robhudson/warehouse,mattrobenolt/warehouse,robhudson/warehouse,techtonik/warehouse,mattrobenolt/warehouse,mattrobenolt/warehouse
# Copyright 2013 Donald Stufft # # 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, so...
# Copyright 2013 Donald Stufft # # 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, so...
<commit_before># Copyright 2013 Donald Stufft # # 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...
# Copyright 2013 Donald Stufft # # 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, so...
# Copyright 2013 Donald Stufft # # 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, so...
<commit_before># Copyright 2013 Donald Stufft # # 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...
84c4aa73e6792dad6853866c66c756073df71f27
tests/test_replace_all.py
tests/test_replace_all.py
import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_objc(self): ...
import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_objc(self): ...
Test for block with multi args
Test for block with multi args
Python
mit
kyamaguchi/SublimeObjC2RubyMotion,kyamaguchi/SublimeObjC2RubyMotion
import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_objc(self): ...
import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_objc(self): ...
<commit_before>import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_o...
import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_objc(self): ...
import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_objc(self): ...
<commit_before>import unittest, os, sys from custom_test_case import CustomTestCase PROJECT_ROOT = os.path.dirname(__file__) sys.path.append(os.path.join(PROJECT_ROOT, "..")) from CodeConverter import CodeConverter class TestReplaceAll(unittest.TestCase, CustomTestCase): # All replacement def test_replace_o...
a47b5506476f9d0e4dbb2eb24cd22da61f42eb65
bixi/api.py
bixi/api.py
from tastypie.resources import ModelResource from models import Station class StationResource(ModelResource): class Meta: allowed_methods = ['get'] queryset = Station.objects.all() resource_name = 'station'
from tastypie.resources import ModelResource from models import Station, Update class StationResource(ModelResource): def dehydrate(self, bundle): update = Update.objects.filter(station__id=bundle.data['id']).latest() bundle.data['nb_bikes'] = update.nb_bikes bundle.data['nb_empty_docks']...
Include the number of available bikes and docks from the latest update.
Include the number of available bikes and docks from the latest update.
Python
bsd-3-clause
flebel/django-bixi
from tastypie.resources import ModelResource from models import Station class StationResource(ModelResource): class Meta: allowed_methods = ['get'] queryset = Station.objects.all() resource_name = 'station' Include the number of available bikes and docks from the latest update.
from tastypie.resources import ModelResource from models import Station, Update class StationResource(ModelResource): def dehydrate(self, bundle): update = Update.objects.filter(station__id=bundle.data['id']).latest() bundle.data['nb_bikes'] = update.nb_bikes bundle.data['nb_empty_docks']...
<commit_before>from tastypie.resources import ModelResource from models import Station class StationResource(ModelResource): class Meta: allowed_methods = ['get'] queryset = Station.objects.all() resource_name = 'station' <commit_msg>Include the number of available bikes and docks from t...
from tastypie.resources import ModelResource from models import Station, Update class StationResource(ModelResource): def dehydrate(self, bundle): update = Update.objects.filter(station__id=bundle.data['id']).latest() bundle.data['nb_bikes'] = update.nb_bikes bundle.data['nb_empty_docks']...
from tastypie.resources import ModelResource from models import Station class StationResource(ModelResource): class Meta: allowed_methods = ['get'] queryset = Station.objects.all() resource_name = 'station' Include the number of available bikes and docks from the latest update.from tasty...
<commit_before>from tastypie.resources import ModelResource from models import Station class StationResource(ModelResource): class Meta: allowed_methods = ['get'] queryset = Station.objects.all() resource_name = 'station' <commit_msg>Include the number of available bikes and docks from t...
5fc0854f54f2946c2b38a8b3c03a553c8a838aed
shale/webdriver.py
shale/webdriver.py
from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webdriver.Remote): ...
from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webdriver.Remote): ...
Fix a string type-checking bug.
Fix a string type-checking bug.
Python
mit
cardforcoin/shale,mhluongo/shale,mhluongo/shale,cardforcoin/shale
from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webdriver.Remote): ...
from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webdriver.Remote): ...
<commit_before>from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webd...
from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webdriver.Remote): ...
from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webdriver.Remote): ...
<commit_before>from selenium import webdriver from selenium.webdriver.remote.switch_to import SwitchTo from selenium.webdriver.remote.mobile import Mobile from selenium.webdriver.remote.errorhandler import ErrorHandler from selenium.webdriver.remote.remote_connection import RemoteConnection class ResumableRemote(webd...
6c999c654e1fffe067592067bd4314cff011cda5
permuta/math/counting.py
permuta/math/counting.py
def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2*n,n)//n+1
def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2*n,n)//(n+1)
Fix catalan since me is dumb
Fix catalan since me is dumb
Python
bsd-3-clause
PermutaTriangle/Permuta
def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2*n,n)//n+1 Fix ...
def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2*n,n)//(n+1)
<commit_before> def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2...
def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2*n,n)//(n+1)
def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2*n,n)//n+1 Fix ...
<commit_before> def factorial(n): res = 1 for i in range(2, n+1): res *= i return res def binomial(n,k): if k > n: return 0 if n-k < k: k = n-k res = 1 for i in range(1,k+1): res = res * (n - (k - i)) // i return res def catalan(n): return binomial(2...
37740e4b965a59fc1508b897d791900017daae42
PublicWebServicesAPI_AND_servercommandScripts/addInfoToCSVreport.py
PublicWebServicesAPI_AND_servercommandScripts/addInfoToCSVreport.py
#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to add user account notes to account_configurations.csv host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to ...
#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to user account notes to the Shared account configuration report(account_configurations.csv) host="https://localhost:9192/rpc/api/xmlrpc" # If not loca...
Change comment to reflect a shared account report
Update: Change comment to reflect a shared account report
Python
mit
PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples
#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to add user account notes to account_configurations.csv host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to ...
#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to user account notes to the Shared account configuration report(account_configurations.csv) host="https://localhost:9192/rpc/api/xmlrpc" # If not loca...
<commit_before>#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to add user account notes to account_configurations.csv host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this addres...
#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to user account notes to the Shared account configuration report(account_configurations.csv) host="https://localhost:9192/rpc/api/xmlrpc" # If not loca...
#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to add user account notes to account_configurations.csv host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to ...
<commit_before>#!/usr/bin/env python3 from csv import reader from sys import stdin from xmlrpc.client import ServerProxy from ssl import create_default_context, Purpose # Script to add user account notes to account_configurations.csv host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this addres...
023568228dc2ffcf772edb4d5335c0c755a7e37c
revel/setup.py
revel/setup.py
import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get github.com/robfig/revel/cmd", shell=True, cwd="revel") subprocess.call("go build -o ...
import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel") subprocess.call("go buil...
Update start process to reflect new path for /cmd
Update start process to reflect new path for /cmd
Python
bsd-3-clause
raziel057/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,fabianmurariu/Framework...
import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get github.com/robfig/revel/cmd", shell=True, cwd="revel") subprocess.call("go build -o ...
import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel") subprocess.call("go buil...
<commit_before>import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get github.com/robfig/revel/cmd", shell=True, cwd="revel") subprocess.cal...
import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get -u github.com/robfig/revel/revel", shell=True, cwd="revel") subprocess.call("go buil...
import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get github.com/robfig/revel/cmd", shell=True, cwd="revel") subprocess.call("go build -o ...
<commit_before>import subprocess import sys import os import setup_util import time def start(args): setup_util.replace_text("revel/src/benchmark/conf/app.conf", "tcp\(.*:3306\)", "tcp(" + args.database_host + ":3306)") subprocess.call("go get github.com/robfig/revel/cmd", shell=True, cwd="revel") subprocess.cal...
1cfd8618931da76fc83745a45206df08f058c453
pog_absolute_pointing.py
pog_absolute_pointing.py
import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of data mid_dy = (...
import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of data mid_dy = (...
Use print as a function and tweak output text
Use print as a function and tweak output text
Python
bsd-2-clause
sot/aimpoint_mon,sot/aimpoint_mon
import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of data mid_dy = (...
import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of data mid_dy = (...
<commit_before>import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of ...
import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of data mid_dy = (...
import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of data mid_dy = (...
<commit_before>import numpy as np from Chandra.Time import DateTime import plot_aimpoint # Get 99th percential absolute pointing radius plot_aimpoint.opt = plot_aimpoint.get_opt() asols = plot_aimpoint.get_asol() # Last six months of data asols = asols[asols['time'] > DateTime(-183).secs] # center of box of range of ...
999ff373d40dd98f3ffccb2478ac6d464e3332e3
flask_gzip.py
flask_gzip.py
import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6): self.app = app self.compress_level = compress_level self.app.after_request(self.after_request) def after_request(self, response): accept_encoding = request.head...
import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6, minimum_size=500): self.app = app self.compress_level = compress_level self.minimum_size = minimum_size self.app.after_request(self.after_request) def after_requ...
Fix Accept-Encoding match (split would result in ' gzip', which doesn't match.
Fix Accept-Encoding match (split would result in ' gzip', which doesn't match. Add minimum_size attribute.
Python
mit
libwilliam/flask-compress,libwilliam/flask-compress,saymedia/flask-compress,libwilliam/flask-compress,saymedia/flask-compress,wichitacode/flask-compress,wichitacode/flask-compress
import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6): self.app = app self.compress_level = compress_level self.app.after_request(self.after_request) def after_request(self, response): accept_encoding = request.head...
import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6, minimum_size=500): self.app = app self.compress_level = compress_level self.minimum_size = minimum_size self.app.after_request(self.after_request) def after_requ...
<commit_before>import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6): self.app = app self.compress_level = compress_level self.app.after_request(self.after_request) def after_request(self, response): accept_encoding...
import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6, minimum_size=500): self.app = app self.compress_level = compress_level self.minimum_size = minimum_size self.app.after_request(self.after_request) def after_requ...
import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6): self.app = app self.compress_level = compress_level self.app.after_request(self.after_request) def after_request(self, response): accept_encoding = request.head...
<commit_before>import gzip import StringIO from flask import request class Gzip(object): def __init__(self, app, compress_level=6): self.app = app self.compress_level = compress_level self.app.after_request(self.after_request) def after_request(self, response): accept_encoding...
c878a67815ef47abdb0bf4203a23ac0ece4feda6
src/CameraImage.py
src/CameraImage.py
import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image.__gobject_init__...
import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image.__gobject_init__...
Convert data to unsigned 8-bit when displaying
Convert data to unsigned 8-bit when displaying
Python
mit
ptomato/Beams
import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image.__gobject_init__...
import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image.__gobject_init__...
<commit_before>import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image._...
import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image.__gobject_init__...
import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image.__gobject_init__...
<commit_before>import gtk, gobject import numpy as N class CameraImage(gtk.Image): __gproperties__ = { 'data' : (gobject.TYPE_PYOBJECT, 'Image data', 'NumPy ndarray containing the data', gobject.PARAM_READWRITE) } def __init__(self): gtk.Image._...
837f25cd2606da70130b21109e0c03d6055622cd
dvol_python/__init__.py
dvol_python/__init__.py
import os from hypothesis import settings, Verbosity settings.register_profile("ci", settings(max_examples=1000)) settings.register_profile("dev", settings(max_examples=5)) settings.register_profile("debug", settings(max_examples=10, verbosity=Verbosity.verbose)) settings.load_profile(os.environ.get(u'HYPOTHESIS_PROF...
Address review feedback: set hypothesis settings depending on env. Default to dev.
Address review feedback: set hypothesis settings depending on env. Default to dev.
Python
apache-2.0
ClusterHQ/dvol,ClusterHQ/dvol,ClusterHQ/dvol
Address review feedback: set hypothesis settings depending on env. Default to dev.
import os from hypothesis import settings, Verbosity settings.register_profile("ci", settings(max_examples=1000)) settings.register_profile("dev", settings(max_examples=5)) settings.register_profile("debug", settings(max_examples=10, verbosity=Verbosity.verbose)) settings.load_profile(os.environ.get(u'HYPOTHESIS_PROF...
<commit_before><commit_msg>Address review feedback: set hypothesis settings depending on env. Default to dev.<commit_after>
import os from hypothesis import settings, Verbosity settings.register_profile("ci", settings(max_examples=1000)) settings.register_profile("dev", settings(max_examples=5)) settings.register_profile("debug", settings(max_examples=10, verbosity=Verbosity.verbose)) settings.load_profile(os.environ.get(u'HYPOTHESIS_PROF...
Address review feedback: set hypothesis settings depending on env. Default to dev.import os from hypothesis import settings, Verbosity settings.register_profile("ci", settings(max_examples=1000)) settings.register_profile("dev", settings(max_examples=5)) settings.register_profile("debug", settings(max_examples=10, ver...
<commit_before><commit_msg>Address review feedback: set hypothesis settings depending on env. Default to dev.<commit_after>import os from hypothesis import settings, Verbosity settings.register_profile("ci", settings(max_examples=1000)) settings.register_profile("dev", settings(max_examples=5)) settings.register_profi...
4a65dacb992ef48dbbaf9ca168f0b4e5567abe90
falmer/content/models/selection_grid.py
falmer/content/models/selection_grid.py
from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock from falmer.content.models.core impor...
from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content import components from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock...
Add text to selection grid
Add text to selection grid
Python
mit
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock from falmer.content.models.core impor...
from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content import components from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock...
<commit_before>from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock from falmer.content.mo...
from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content import components from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock...
from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock from falmer.content.models.core impor...
<commit_before>from wagtail.core import blocks from wagtail.core.blocks import RichTextBlock from wagtail.core.fields import StreamField from wagtail.admin.edit_handlers import TabbedInterface, StreamFieldPanel, ObjectList from falmer.content.blocks import HeroImageBlock, FalmerImageChooserBlock from falmer.content.mo...
ecd0c00766304f1e5b12e6067a846033a4ee36d5
txlege84/topics/admin.py
txlege84/topics/admin.py
from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic admin.site.register(Topic) admin.site.register(Issue) admin.site.register(Stream) admin.site.register(StoryPointer)
from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic @admin.register(Issue) class IssueAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('name',)} admin.site.register(Topic) admin.site.register(Stream) admin.site.register(StoryPointer)
Move Issue ModelAdmin to new register syntax
Move Issue ModelAdmin to new register syntax
Python
mit
texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84
from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic admin.site.register(Topic) admin.site.register(Issue) admin.site.register(Stream) admin.site.register(StoryPointer) Move Issue ModelAdmin to new register syntax
from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic @admin.register(Issue) class IssueAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('name',)} admin.site.register(Topic) admin.site.register(Stream) admin.site.register(StoryPointer)
<commit_before>from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic admin.site.register(Topic) admin.site.register(Issue) admin.site.register(Stream) admin.site.register(StoryPointer) <commit_msg>Move Issue ModelAdmin to new register syntax<commit_after>
from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic @admin.register(Issue) class IssueAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('name',)} admin.site.register(Topic) admin.site.register(Stream) admin.site.register(StoryPointer)
from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic admin.site.register(Topic) admin.site.register(Issue) admin.site.register(Stream) admin.site.register(StoryPointer) Move Issue ModelAdmin to new register syntaxfrom django.contrib import admin from topics.models import Issu...
<commit_before>from django.contrib import admin from topics.models import Issue, StoryPointer, Stream, Topic admin.site.register(Topic) admin.site.register(Issue) admin.site.register(Stream) admin.site.register(StoryPointer) <commit_msg>Move Issue ModelAdmin to new register syntax<commit_after>from django.contrib imp...
d76cbdd768964a2583cf28ab9efaf46964c815ae
swf/core.py
swf/core.py
# -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { 'aws_access_key_id': None, 'aws_secret_access_key': None } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ 'aws_access_key_id': aws_access_...
# -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { #'aws_access_key_id': AWS_ACCESS_KEY_ID, #'aws_secret_access_key': AWS_SECRET_ACCESS_KEY, } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ ...
Update ConnectedSWFObject: raise KeyError if credentials are not set
Update ConnectedSWFObject: raise KeyError if credentials are not set
Python
mit
botify-labs/python-simple-workflow,botify-labs/python-simple-workflow
# -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { 'aws_access_key_id': None, 'aws_secret_access_key': None } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ 'aws_access_key_id': aws_access_...
# -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { #'aws_access_key_id': AWS_ACCESS_KEY_ID, #'aws_secret_access_key': AWS_SECRET_ACCESS_KEY, } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ ...
<commit_before># -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { 'aws_access_key_id': None, 'aws_secret_access_key': None } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ 'aws_access_key_i...
# -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { #'aws_access_key_id': AWS_ACCESS_KEY_ID, #'aws_secret_access_key': AWS_SECRET_ACCESS_KEY, } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ ...
# -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { 'aws_access_key_id': None, 'aws_secret_access_key': None } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ 'aws_access_key_id': aws_access_...
<commit_before># -*- coding:utf-8 -*- from boto.swf.layer1 import Layer1 AWS_CREDENTIALS = { 'aws_access_key_id': None, 'aws_secret_access_key': None } def set_aws_credentials(aws_access_key_id, aws_secret_access_key): """Set default credentials.""" AWS_CREDENTIALS.update({ 'aws_access_key_i...
abb1d2db9052391c78fb09952b58a5331046aae5
pylinks/links/tests.py
pylinks/links/tests.py
from django.test import TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str, Category.objec...
from django.test import Client, TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str, Catego...
Add test for link redirect
Add test for link redirect
Python
mit
michaelmior/pylinks,michaelmior/pylinks,michaelmior/pylinks
from django.test import TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str, Category.objec...
from django.test import Client, TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str, Catego...
<commit_before>from django.test import TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str,...
from django.test import Client, TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str, Catego...
from django.test import TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str, Category.objec...
<commit_before>from django.test import TestCase from .models import Category, Link class CategoryModelTests(TestCase): def test_category_sort(self): Category(title='Test 2', slug='test2').save() Category(title='Test 1', slug='test1').save() self.assertEqual(['Test 1', 'Test 2'], map(str,...
045574a936df26798962f230568de33458495c09
spacy/about.py
spacy/about.py
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' __version__ = '2.0.0a0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython' __uri__...
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy-nightly' __version__ = '2.0.0a1' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython'...
Update package name and increment version
Update package name and increment version
Python
mit
aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/sp...
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' __version__ = '2.0.0a0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython' __uri__...
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy-nightly' __version__ = '2.0.0a1' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython'...
<commit_before># inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' __version__ = '2.0.0a0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and ...
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy-nightly' __version__ = '2.0.0a1' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython'...
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' __version__ = '2.0.0a0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython' __uri__...
<commit_before># inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' __version__ = '2.0.0a0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and ...
4f1bbe6435f2c899915ab72d990a649d4e494553
grum/views.py
grum/views.py
from grum import app, db from grum.models import User from flask import render_template, request @app.route("/") def main(): # # Login verification code # username = request.form('username') # password = request.form('password') # # user = User.query.filter_by(username=username).first_or_404() ...
from grum import app, db from grum.models import User from flask import render_template, request, redirect @app.route("/", methods=['GET', 'POST']) def main(): if request.method == "POST": # Login verification code username = request.form['username'] password = request.form['password'] ...
Fix register and login y0
Fix register and login y0
Python
mit
Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web,Grum-Hackdee/grum-web
from grum import app, db from grum.models import User from flask import render_template, request @app.route("/") def main(): # # Login verification code # username = request.form('username') # password = request.form('password') # # user = User.query.filter_by(username=username).first_or_404() ...
from grum import app, db from grum.models import User from flask import render_template, request, redirect @app.route("/", methods=['GET', 'POST']) def main(): if request.method == "POST": # Login verification code username = request.form['username'] password = request.form['password'] ...
<commit_before>from grum import app, db from grum.models import User from flask import render_template, request @app.route("/") def main(): # # Login verification code # username = request.form('username') # password = request.form('password') # # user = User.query.filter_by(username=username).fir...
from grum import app, db from grum.models import User from flask import render_template, request, redirect @app.route("/", methods=['GET', 'POST']) def main(): if request.method == "POST": # Login verification code username = request.form['username'] password = request.form['password'] ...
from grum import app, db from grum.models import User from flask import render_template, request @app.route("/") def main(): # # Login verification code # username = request.form('username') # password = request.form('password') # # user = User.query.filter_by(username=username).first_or_404() ...
<commit_before>from grum import app, db from grum.models import User from flask import render_template, request @app.route("/") def main(): # # Login verification code # username = request.form('username') # password = request.form('password') # # user = User.query.filter_by(username=username).fir...
89d13cdf811d7ab499303380b549fbc4c9877076
confu/recipes/googlebenchmark.py
confu/recipes/googlebenchmark.py
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
Update recipe for Google Benchmark
Update recipe for Google Benchmark
Python
mit
Maratyszcza/confu,Maratyszcza/confu
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
<commit_before>#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googleb...
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googlebenchmark.yaml")...
<commit_before>#!/usr/bin/env python def setup(root_dir): import confu.git repo = confu.git.clone("https://github.com/google/benchmark.git", root_dir) from os import path recipes_dir = path.dirname(path.abspath(__file__)) import shutil shutil.copyfile( path.join(recipes_dir, "googleb...
252cfa3baa7973a923952ecb3c83cdfb9f28ab67
l10n_br_account/models/fiscal_document.py
l10n_br_account/models/fiscal_document.py
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, models class FiscalDocument(models.Model): _inherit = 'l10n_br_fiscal.document' @api.multi def unlink(self): invoices = self.env['account.invoice'].search( ...
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import _, api, models from odoo.exceptions import UserError from odoo.addons.l10n_br_fiscal.constants.fiscal import ( SITUACAO_EDOC_EM_DIGITACAO, ) class FiscalDocument(models.Model): ...
Allow delete only fiscal documents with draft state
[REF] Allow delete only fiscal documents with draft state
Python
agpl-3.0
OCA/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, models class FiscalDocument(models.Model): _inherit = 'l10n_br_fiscal.document' @api.multi def unlink(self): invoices = self.env['account.invoice'].search( ...
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import _, api, models from odoo.exceptions import UserError from odoo.addons.l10n_br_fiscal.constants.fiscal import ( SITUACAO_EDOC_EM_DIGITACAO, ) class FiscalDocument(models.Model): ...
<commit_before># Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, models class FiscalDocument(models.Model): _inherit = 'l10n_br_fiscal.document' @api.multi def unlink(self): invoices = self.env['account.invo...
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import _, api, models from odoo.exceptions import UserError from odoo.addons.l10n_br_fiscal.constants.fiscal import ( SITUACAO_EDOC_EM_DIGITACAO, ) class FiscalDocument(models.Model): ...
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, models class FiscalDocument(models.Model): _inherit = 'l10n_br_fiscal.document' @api.multi def unlink(self): invoices = self.env['account.invoice'].search( ...
<commit_before># Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, models class FiscalDocument(models.Model): _inherit = 'l10n_br_fiscal.document' @api.multi def unlink(self): invoices = self.env['account.invo...
21f6d03449217952cb981719345eccfbb1ec84b3
isogram/isogram.py
isogram/isogram.py
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars))
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) # You could also achieve this using "c.isalpha()" instead of LOWERCASE # You would then not need to import from `string`, but it's ma...
Add note about str.isalpha() method as an alternative
Add note about str.isalpha() method as an alternative
Python
agpl-3.0
CubicComet/exercism-python-solutions
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) Add note about str.isalpha() method as an alternative
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) # You could also achieve this using "c.isalpha()" instead of LOWERCASE # You would then not need to import from `string`, but it's ma...
<commit_before>from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) <commit_msg>Add note about str.isalpha() method as an alternative<commit_after>
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) # You could also achieve this using "c.isalpha()" instead of LOWERCASE # You would then not need to import from `string`, but it's ma...
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) Add note about str.isalpha() method as an alternativefrom string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_iso...
<commit_before>from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) <commit_msg>Add note about str.isalpha() method as an alternative<commit_after>from string import ascii_lowercase LOWE...
54a1f1774517faf377ae43f1bad4a4f5c0b0c562
accelerator/tests/contexts/judging_round_context.py
accelerator/tests/contexts/judging_round_context.py
from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: shoul...
from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: shoul...
Add some values to the default judging_form_element
[AC-7310] Add some values to the default judging_form_element
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: shoul...
from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: shoul...
<commit_before>from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: ...
from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: shoul...
from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: shoul...
<commit_before>from accelerator.tests.factories import ( JudgingFormFactory, JudgingFormElementFactory, JudgingRoundFactory, ) from accelerator_abstract.models import FORM_ELEM_OVERALL_RECOMMENDATION class JudgingRoundContext: def __init__(self, **kwargs): if kwargs.get("is_active") is True: ...
dfeccf96499584d6b19c0734e6041e0d4b5947a1
knowledge/admin.py
knowledge/admin.py
from django.contrib import admin from knowledge.models import Question, Response, Category from portalpractices.models import Company, Author class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.register(Category...
from django.contrib import admin from knowledge.models import Question, Response, Category class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.register(Category, CategoryAdmin) class QuestionAdmin(admin.ModelA...
Update to remove references to Portal Practices
Update to remove references to Portal Practices
Python
isc
CantemoInternal/django-knowledge,CantemoInternal/django-knowledge,CantemoInternal/django-knowledge
from django.contrib import admin from knowledge.models import Question, Response, Category from portalpractices.models import Company, Author class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.register(Category...
from django.contrib import admin from knowledge.models import Question, Response, Category class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.register(Category, CategoryAdmin) class QuestionAdmin(admin.ModelA...
<commit_before> from django.contrib import admin from knowledge.models import Question, Response, Category from portalpractices.models import Company, Author class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.re...
from django.contrib import admin from knowledge.models import Question, Response, Category class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.register(Category, CategoryAdmin) class QuestionAdmin(admin.ModelA...
from django.contrib import admin from knowledge.models import Question, Response, Category from portalpractices.models import Company, Author class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.register(Category...
<commit_before> from django.contrib import admin from knowledge.models import Question, Response, Category from portalpractices.models import Company, Author class CategoryAdmin(admin.ModelAdmin): list_display = [f.name for f in Category._meta.fields] prepopulated_fields = {'slug': ('title', )} admin.site.re...
a8bbe98f07e00cc6a9e9d076c6ed39c5d3136658
aldryn_apphooks_config/models.py
aldryn_apphooks_config/models.py
# -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (abstract) model ...
# -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (abstract) model ...
Add shortcut to get configuration data
Add shortcut to get configuration data
Python
bsd-3-clause
aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config,aldryn/aldryn-apphooks-config
# -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (abstract) model ...
# -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (abstract) model ...
<commit_before># -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (a...
# -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (abstract) model ...
# -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (abstract) model ...
<commit_before># -*- coding: utf-8 -*- from app_data import AppDataField from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AppHookConfig(models.Model): """ This is the generic (a...
2f280e34762ad4910ff9e5041c2bf24f8283368c
src-backend/registration/tests/test_user.py
src-backend/registration/tests/test_user.py
from django.test import TestCase from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from rest_framework.authtoken.models import Token class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.com', 'password')...
from django.test import TestCase from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from nose.tools import assert_false class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.com', 'password') self.test...
Use nose test tools for the user test
Use nose test tools for the user test
Python
bsd-3-clause
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
from django.test import TestCase from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from rest_framework.authtoken.models import Token class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.com', 'password')...
from django.test import TestCase from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from nose.tools import assert_false class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.com', 'password') self.test...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from rest_framework.authtoken.models import Token class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.co...
from django.test import TestCase from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from nose.tools import assert_false class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.com', 'password') self.test...
from django.test import TestCase from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from rest_framework.authtoken.models import Token class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.com', 'password')...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from rest_framework.authtoken.models import Token class UserTest(TestCase): def setUp(self): self.test_user = User.objects.create_user('username', 'test@test.co...
40c9c762ce65e0e231a14745cdc274be6c927a74
byceps/services/shop/storefront/models.py
byceps/services/shop/storefront/models.py
""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequenceID from ..shop....
""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequenceID from ..shop....
Add index for storefront's shop ID
Add index for storefront's shop ID DDL: CREATE INDEX ix_shop_storefronts_shop_id ON shop_storefronts (shop_id);
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequenceID from ..shop....
""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequenceID from ..shop....
<commit_before>""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequence...
""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequenceID from ..shop....
""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequenceID from ..shop....
<commit_before>""" byceps.services.shop.storefront.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....util.instances import ReprBuilder from ..sequence.transfer.models import NumberSequence...
4e3773d96a47b88529a01fa4c4a0f25bf1b77b1c
lib/github_test.py
lib/github_test.py
import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues(self): ...
import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues(self): ...
Remove old repo_from_path tests. This is a very hard functionality to test
Remove old repo_from_path tests. This is a very hard functionality to test
Python
mit
jonmorehouse/vimhub
import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues(self): ...
import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues(self): ...
<commit_before>import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues...
import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues(self): ...
import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues(self): ...
<commit_before>import unittest import github class TestGithub(unittest.TestCase): def setUp(self): pass def test_user(self): u = github.user() u1 = github.user() self.assertTrue(u) # make sure hash works self.assertTrue(u is u1) def test_has_issues...
76282391f35725ee42ac0671a9a77b68e1f34081
rest_tester/test_info.py
rest_tester/test_info.py
class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test information fro...
class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test information fro...
Use get for params and timeout.
Use get for params and timeout.
Python
mit
ridibooks/lightweight-rest-tester,ridibooks/lightweight-rest-tester
class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test information fro...
class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test information fro...
<commit_before>class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test ...
class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test information fro...
class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test information fro...
<commit_before>class TestInfo(object): """Read test information from JSON data.""" PATH_API = 'api' PATH_API_URL = 'url' PATH_API_PARAMS = 'params' PATH_API_TIMEOUT = 'timeout' PATH_TESTS = 'tests' DEFAULT_TIME_OUT = 10 @classmethod def read(cls, json_data): """Read test ...
fecb9624379057a98aeaf2bb5cf42d7e526bbf0a
vumi/blinkenlights/heartbeat/__init__.py
vumi/blinkenlights/heartbeat/__init__.py
from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"]
"""Vumi worker heartbeating.""" from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"]
Add module docstring from vumi.blinkenlights.heartbeat.
Add module docstring from vumi.blinkenlights.heartbeat.
Python
bsd-3-clause
vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,TouK/vumi,TouK/vumi
from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"] Add module docstring from vumi.blinkenlights.heartbeat.
"""Vumi worker heartbeating.""" from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"]
<commit_before> from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"] <commit_msg>Add module docstring from vumi.blinkenlights.heartbeat.<commit_after>
"""Vumi worker heartbeating.""" from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"]
from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"] Add module docstring from vumi.blinkenlights.heartbeat."""Vumi worker heartbeating.""" from vumi.blinkenlights.heartbeat.p...
<commit_before> from vumi.blinkenlights.heartbeat.publisher import (HeartBeatMessage, HeartBeatPublisher) __all__ = ["HeartBeatMessage", "HeartBeatPublisher"] <commit_msg>Add module docstring from vumi.blinkenlights.heartbeat.<commit_after>"""Vumi worker heartbeating...
fbf2a59d9cf25c3d3a041afa839d0d44f6f385a5
win_unc/internal/utils.py
win_unc/internal/utils.py
""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, **kwargs: not fu...
""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, **kwargs: not fu...
Return None explicitly instead of implicitly
Return None explicitly instead of implicitly
Python
mit
CovenantEyes/py_win_unc,nithinphilips/py_win_unc
""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, **kwargs: not fu...
""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, **kwargs: not fu...
<commit_before>""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, *...
""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, **kwargs: not fu...
""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, **kwargs: not fu...
<commit_before>""" Contains generic helper funcitons to aid in parsing. """ import itertools def take_while(predicate, items): return list(itertools.takewhile(predicate, items)) def drop_while(predicate, items): return list(itertools.dropwhile(predicate, items)) def not_(func): return lambda *args, *...
62a6b78b62631c0b1de7d0497250aa3d0310d47d
winthrop/common/models.py
winthrop/common/models.py
from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstract = True ...
from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstract = True ...
Add alpha ordering on Named abstract class
Add alpha ordering on Named abstract class
Python
apache-2.0
Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django
from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstract = True ...
from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstract = True ...
<commit_before>from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstra...
from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstract = True ...
from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstract = True ...
<commit_before>from django.db import models # abstract models with common fields to be # used as mix-ins class Named(models.Model): '''Abstract model with a 'name' field; by default, name is used as the string display.''' name = models.CharField(max_length=255, unique=True) class Meta: abstra...
09506e7ae8dbc1ad06b35c075e15946dd2c6092b
examples/my_test_suite.py
examples/my_test_suite.py
from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) def test_2(self): # This test will fail ...
from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") self.find_text("Garden", "div#ctitle", timeout=3) for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) ...
Update the example test suite
Update the example test suite
Python
mit
possoumous/Watchers,mdmintz/SeleniumBase,possoumous/Watchers,seleniumbase/SeleniumBase,mdmintz/seleniumspot,ktp420/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,ktp420/SeleniumBase,ktp420/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,ktp420/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/Sele...
from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) def test_2(self): # This test will fail ...
from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") self.find_text("Garden", "div#ctitle", timeout=3) for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) ...
<commit_before>from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) def test_2(self): # This test w...
from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") self.find_text("Garden", "div#ctitle", timeout=3) for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) ...
from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) def test_2(self): # This test will fail ...
<commit_before>from seleniumbase import BaseCase class MyTestSuite(BaseCase): def test_1(self): self.open("http://xkcd.com/1663/") for p in xrange(4): self.click('a[rel="next"]') self.find_text("Algorithms", "div#ctitle", timeout=3) def test_2(self): # This test w...
5aca109f486786266164f4ac7a10e4d76f0730e4
scrappyr/scraps/forms.py
scrappyr/scraps/forms.py
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm, self).__init_...
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm, self).__init_...
Make add-scrap title user friendly
Make add-scrap title user friendly
Python
mit
tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm, self).__init_...
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm, self).__init_...
<commit_before>from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm...
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm, self).__init_...
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm, self).__init_...
<commit_before>from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from .models import Scrap class ScrapForm(forms.ModelForm): class Meta: model = Scrap fields = ['raw_title'] def __init__(self, *args, **kwargs): super(ScrapForm...
bdb38a935dbbe6b70b0b960ba132dc6870455ceb
validate.py
validate.py
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: print...
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType, setup, options ) def main(): load() setup() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue...
Check that start building can recruit something.
Check that start building can recruit something.
Python
mpl-2.0
chrisnorman7/pyrts,chrisnorman7/pyrts,chrisnorman7/pyrts
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: print...
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType, setup, options ) def main(): load() setup() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue...
<commit_before>"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: ...
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType, setup, options ) def main(): load() setup() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue...
"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: print...
<commit_before>"""Check for inconsistancies in the database.""" from server.db import ( BuildingBuilder, BuildingRecruit, BuildingType, load, UnitType ) def main(): load() for name in UnitType.resource_names(): if UnitType.count(getattr(UnitType, name) >= 1): continue else: ...
15efe5ecd3f17ec05f3dc9054cd823812c4b3743
utils/http.py
utils/http.py
import requests def retrieve_json(url): r = requests.get(url) r.raise_for_status() return r.json()
import requests DEFAULT_TIMEOUT = 10 def retrieve_json(url, timeout=DEFAULT_TIMEOUT): r = requests.get(url, timeout=timeout) r.raise_for_status() return r.json()
Add a default timeout parameter to retrieve_json
Add a default timeout parameter to retrieve_json
Python
bsd-3-clause
tebriel/dd-agent,jyogi/purvar-agent,pmav99/praktoras,gphat/dd-agent,manolama/dd-agent,pmav99/praktoras,gphat/dd-agent,Wattpad/dd-agent,brettlangdon/dd-agent,cberry777/dd-agent,pmav99/praktoras,brettlangdon/dd-agent,tebriel/dd-agent,tebriel/dd-agent,Wattpad/dd-agent,jyogi/purvar-agent,cberry777/dd-agent,manolama/dd-agen...
import requests def retrieve_json(url): r = requests.get(url) r.raise_for_status() return r.json() Add a default timeout parameter to retrieve_json
import requests DEFAULT_TIMEOUT = 10 def retrieve_json(url, timeout=DEFAULT_TIMEOUT): r = requests.get(url, timeout=timeout) r.raise_for_status() return r.json()
<commit_before>import requests def retrieve_json(url): r = requests.get(url) r.raise_for_status() return r.json() <commit_msg>Add a default timeout parameter to retrieve_json<commit_after>
import requests DEFAULT_TIMEOUT = 10 def retrieve_json(url, timeout=DEFAULT_TIMEOUT): r = requests.get(url, timeout=timeout) r.raise_for_status() return r.json()
import requests def retrieve_json(url): r = requests.get(url) r.raise_for_status() return r.json() Add a default timeout parameter to retrieve_jsonimport requests DEFAULT_TIMEOUT = 10 def retrieve_json(url, timeout=DEFAULT_TIMEOUT): r = requests.get(url, timeout=timeout) r.raise_for_status() ...
<commit_before>import requests def retrieve_json(url): r = requests.get(url) r.raise_for_status() return r.json() <commit_msg>Add a default timeout parameter to retrieve_json<commit_after>import requests DEFAULT_TIMEOUT = 10 def retrieve_json(url, timeout=DEFAULT_TIMEOUT): r = requests.get(url, tim...
fe89b50d87c37c83170de74e5f88f59d88ba2c89
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...
Add 0.33 to the vertices to prevent misalignment
Add 0.33 to the vertices to prevent misalignment
Python
bsd-3-clause
michaelaye/vispy,ghisvail/vispy,QuLogic/vispy,jdreaver/vispy,Eric89GXL/vispy,srinathv/vispy,dchilds7/Deysha-Star-Formation,jay3sh/vispy,sbtlaarzc/vispy,jay3sh/vispy,julienr/vispy,sbtlaarzc/vispy,michaelaye/vispy,jay3sh/vispy,bollu/vispy,drufat/vispy,RebeccaWPerry/vispy,julienr/vispy,Eric89GXL/vispy,bollu/vispy,jdreaver...
# -*- 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...
a75ca43b3035f3f391b39393802ea46d440b22c5
bookvoyage-backend/core/admin.py
bookvoyage-backend/core/admin.py
from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register your models here. from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch class BookResource(resources.ModelResour...
from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register models from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch from django.contrib.auth.models import User class B...
Add option to bulk-add users
Add option to bulk-add users Warning: excel import is shaky with importing groups; json import is recommended.
Python
mit
edushifts/book-voyage,edushifts/book-voyage,edushifts/book-voyage,edushifts/book-voyage
from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register your models here. from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch class BookResource(resources.ModelResour...
from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register models from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch from django.contrib.auth.models import User class B...
<commit_before>from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register your models here. from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch class BookResource(resour...
from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register models from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch from django.contrib.auth.models import User class B...
from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register your models here. from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch class BookResource(resources.ModelResour...
<commit_before>from leaflet.admin import LeafletGeoAdmin from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin # Register your models here. from .models import Author, Book, BookInstance, BookHolding, BookOwning, BookBatch class BookResource(resour...
3e1f8a567e9d7fa7bb7ac5acf8fe336b88faeeaa
expressions/python/setup.py
expressions/python/setup.py
from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package requirements re...
from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package requirements re...
Declare package_data to ensure month.aliases is included
Declare package_data to ensure month.aliases is included
Python
bsd-3-clause
rapidpro/flows
from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package requirements re...
from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package requirements re...
<commit_before>from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package ...
from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package requirements re...
from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package requirements re...
<commit_before>from setuptools import setup, find_packages def _is_requirement(line): """Returns whether the line is a valid package requirement.""" line = line.strip() return line and not (line.startswith("-r") or line.startswith("#")) def _read_requirements(filename): """Returns a list of package ...
a8b0a1f20264506beec9ffc1299b82277a339556
chipy_org/apps/profiles/views.py
chipy_org/apps/profiles/views.py
from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filter(profile__show...
from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filter(profile__show...
Add ordering for profiles by name
Add ordering for profiles by name
Python
mit
chicagopython/chipy.org,chicagopython/chipy.org,chicagopython/chipy.org,chicagopython/chipy.org
from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filter(profile__show...
from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filter(profile__show...
<commit_before>from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filte...
from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filter(profile__show...
from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filter(profile__show...
<commit_before>from django.contrib.auth.models import User from django.views.generic import ListView, UpdateView from .forms import ProfileForm from .models import UserProfile class ProfilesList(ListView): context_object_name = "profiles" template_name = "profiles/list.html" queryset = User.objects.filte...
fbe4761d2d679a983d2625c4969dab53500634b7
fases/rodar_fase_exemplo.py
fases/rodar_fase_exemplo.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__=='__main__': fase = Fase(intervalo_de_colisao=10) # Adicionar Pássaros Vermelhos for i in ra...
# -*- coding: utf-8 -*- from os import path import sys project_dir = path.dirname(__file__) project_dir = path.join('..') sys.path.append(project_dir) from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__ == '__main__': ...
Refactor para funfar via linha de comando
Refactor para funfar via linha de comando
Python
mit
guoliveer/pythonbirds,deniscampos/pythonbirds,renzon/pythonbirds-fatec,giovaneliberato/python_birds_fp,pythonprobr/pythonbirds,jvitorlb/pythonbirds,evertongoncalves/pythonbirds,renzon/python-birds-t5,Cleitoon1/pythonbirds,gomesfelipe/pythonbirds,igorlimasan/pythonbirds
# -*- coding: utf-8 -*- from __future__ import unicode_literals from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__=='__main__': fase = Fase(intervalo_de_colisao=10) # Adicionar Pássaros Vermelhos for i in ra...
# -*- coding: utf-8 -*- from os import path import sys project_dir = path.dirname(__file__) project_dir = path.join('..') sys.path.append(project_dir) from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__ == '__main__': ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__=='__main__': fase = Fase(intervalo_de_colisao=10) # Adicionar Pássaros Vermelhos ...
# -*- coding: utf-8 -*- from os import path import sys project_dir = path.dirname(__file__) project_dir = path.join('..') sys.path.append(project_dir) from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__ == '__main__': ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__=='__main__': fase = Fase(intervalo_de_colisao=10) # Adicionar Pássaros Vermelhos for i in ra...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__=='__main__': fase = Fase(intervalo_de_colisao=10) # Adicionar Pássaros Vermelhos ...
a0df14a38bcc4f71cf073298e078160488b143ca
sheldon/basic_classes.py
sheldon/basic_classes.py
# -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adapter: name, ...
# -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adapter: name, ...
Change docs of send_message method
Change docs of send_message method
Python
mit
lises/sheldon
# -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adapter: name, ...
# -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adapter: name, ...
<commit_before># -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adap...
# -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adapter: name, ...
# -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adapter: name, ...
<commit_before># -*- coding: utf-8 -*- """ Declaration of classes needed for bot working: Adapter class, Plugin class @author: Lises team @contact: zhidkovseva@gmail.com @license: The MIT license Copyright (C) 2015 """ from time import sleep class Adapter: """ Adapter class contains information about adap...
07ccbc36fd5148db2efc5f676fd13d4b24aa004f
hackasmlexer/hacklexer.py
hackasmlexer/hacklexer.py
import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = { 'root...
import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = { 'root...
Add register and IO addresses
Add register and IO addresses
Python
mit
cprieto/pygments_hack_asm
import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = { 'root...
import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = { 'root...
<commit_before>import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = ...
import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = { 'root...
import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = { 'root...
<commit_before>import re from pygments.lexer import RegexLexer, include from pygments.token import * class HackAsmLexer(RegexLexer): name = 'Hack Assembler' aliases = ['hack_asm'] filenames = ['*.asm'] identifier = r'[a-zA-Z$._?][a-zA-Z0-9$._?]*' flags = re.IGNORECASE | re.MULTILINE tokens = ...
6b07710ae8c7681f58060c15c74bf5bd3dda4f3b
handroll/composers/txt.py
handroll/composers/txt.py
# Copyright (c) 2014, Matt Layman import textile from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.textile``). The first line of the file will be used as the ``title`` data for the template. ...
# Copyright (c) 2014, Matt Layman import sys try: import textile except ImportError: # FIXME: textile not supported on Python 3. pass from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.tex...
Revert "Textile is working with Python 3 now."
Revert "Textile is working with Python 3 now." This reverts commit 849316dd5bffa9132608cc9eeac63b08188f31c0. Textile is still having issues with Python 3.2 so rollback the support until it is fixed.
Python
bsd-2-clause
handroll/handroll
# Copyright (c) 2014, Matt Layman import textile from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.textile``). The first line of the file will be used as the ``title`` data for the template. ...
# Copyright (c) 2014, Matt Layman import sys try: import textile except ImportError: # FIXME: textile not supported on Python 3. pass from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.tex...
<commit_before># Copyright (c) 2014, Matt Layman import textile from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.textile``). The first line of the file will be used as the ``title`` data for the...
# Copyright (c) 2014, Matt Layman import sys try: import textile except ImportError: # FIXME: textile not supported on Python 3. pass from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.tex...
# Copyright (c) 2014, Matt Layman import textile from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.textile``). The first line of the file will be used as the ``title`` data for the template. ...
<commit_before># Copyright (c) 2014, Matt Layman import textile from handroll import logger from handroll.composers import GenericHTMLComposer class TextileComposer(GenericHTMLComposer): """Compose HTML from Textile files (``.textile``). The first line of the file will be used as the ``title`` data for the...
ff89cb8216168beb9c79028080fbccbe91c13000
masters/master.chromium.infra/master_site_config.py
masters/master.chromium.infra/master_site_config.py
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id= 1 buildbot_url...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id = 11 buildbot_u...
Use 11 as master_port_id for labs convenience.
Use 11 as master_port_id for labs convenience. R=phajdan.jr@chromium.org BUG=449961 Review URL: https://codereview.chromium.org/935813002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@294106 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id= 1 buildbot_url...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id = 11 buildbot_u...
<commit_before># Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id= 1...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id = 11 buildbot_u...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id= 1 buildbot_url...
<commit_before># Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class Infra(Master.Master1): project_name = 'Infra' master_port_id= 1...
20224987f7c1ac34b13587a6dc7c1241e0466663
dataset/dataset/spiders/dataset_spider.py
dataset/dataset/spiders/dataset_spider.py
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from .. import items class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data.gc.ca/data/...
Fix import post merge to project directory
Fix import post merge to project directory
Python
mit
MaxLikelihood/CODE
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from .. import items class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data.gc.ca/data/...
<commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls =...
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from .. import items class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data.gc.ca/data/...
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
<commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls =...
6c0287a3ba1c98d9f4879c4f2ec95a3d6406b6ae
meinberlin/apps/dashboard/filtersets.py
meinberlin/apps/dashboard/filtersets.py
import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinberlin.apps.proj...
import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinberlin.apps.proj...
Remove typ filter from dashboard
Remove typ filter from dashboard
Python
agpl-3.0
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinberlin.apps.proj...
import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinberlin.apps.proj...
<commit_before>import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinb...
import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinberlin.apps.proj...
import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinberlin.apps.proj...
<commit_before>import django_filters from django.utils.translation import ugettext_lazy as _ from adhocracy4.filters import widgets as filters_widgets from adhocracy4.filters.filters import DefaultsFilterSet from adhocracy4.filters.filters import FreeTextFilter from adhocracy4.projects.models import Project from meinb...
8f6a19bade1a0591f3feba4521fdf42c157c179d
skyline_path/algorithms/growing_graph.py
skyline_path/algorithms/growing_graph.py
class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def growing(self): for old_node in self.outer_nodes.copy(): self._update_nodes(old_node) def...
class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def all_nodes(self): return self.outer_nodes | self.inner_nodes def growing(self, times=1): for ...
Add all_nodes and growing times param
Add all_nodes and growing times param
Python
mit
shadow3x3x3/renew-skyline-path-query
class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def growing(self): for old_node in self.outer_nodes.copy(): self._update_nodes(old_node) def...
class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def all_nodes(self): return self.outer_nodes | self.inner_nodes def growing(self, times=1): for ...
<commit_before>class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def growing(self): for old_node in self.outer_nodes.copy(): self._update_nodes(old...
class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def all_nodes(self): return self.outer_nodes | self.inner_nodes def growing(self, times=1): for ...
class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def growing(self): for old_node in self.outer_nodes.copy(): self._update_nodes(old_node) def...
<commit_before>class GrowingGraph: def __init__(self, neighbors_table, start_nodes): self.neighbors_table = neighbors_table self.outer_nodes = set(start_nodes) self.inner_nodes = set() def growing(self): for old_node in self.outer_nodes.copy(): self._update_nodes(old...
776814f7c5ef5b54167adbe3cce29b8e8381fd69
scripts/cluster/craq/start_craq_server.py
scripts/cluster/craq/start_craq_server.py
#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru28', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) return 0 i...
#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru27', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) return 0 i...
Use servers for craq that are actually alive.
Use servers for craq that are actually alive.
Python
bsd-3-clause
sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata
#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru28', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) return 0 i...
#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru27', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) return 0 i...
<commit_before>#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru28', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) ...
#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru27', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) return 0 i...
#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru28', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) return 0 i...
<commit_before>#!/usr/bin/python import sys import subprocess import time import socket def main(): if (not socket.gethostname() in ['meru28', 'meru29', 'meru30']): return 0 subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-32 -d meru -p 10333 -z 192.168.1.7:9888', shell=True) ...
2aab3167f70fa736fafb3507e71a6233a02363eb
space-age/space_age.py
space-age/space_age.py
class SpaceAge(object): def __init__(self, seconds): self.seconds = seconds @property def years(self): return self.seconds/31557600 def on_earth(self): return round(self.years, 2) def on_mercury(self): return round(self.years/0.2408467, 2) def on_venus(self): ...
class SpaceAge(object): YEARS = {"on_earth": 1, "on_mercury": 0.2408467, "on_venus": 0.61519726, "on_mars": 1.8808158, "on_jupiter": 11.862615, "on_saturn": 29.447498, "on_uranus": 84.016846, "on_neptune": 164.79132} def...
Implement __getattr__ to reduce code
Implement __getattr__ to reduce code
Python
agpl-3.0
CubicComet/exercism-python-solutions
class SpaceAge(object): def __init__(self, seconds): self.seconds = seconds @property def years(self): return self.seconds/31557600 def on_earth(self): return round(self.years, 2) def on_mercury(self): return round(self.years/0.2408467, 2) def on_venus(self): ...
class SpaceAge(object): YEARS = {"on_earth": 1, "on_mercury": 0.2408467, "on_venus": 0.61519726, "on_mars": 1.8808158, "on_jupiter": 11.862615, "on_saturn": 29.447498, "on_uranus": 84.016846, "on_neptune": 164.79132} def...
<commit_before>class SpaceAge(object): def __init__(self, seconds): self.seconds = seconds @property def years(self): return self.seconds/31557600 def on_earth(self): return round(self.years, 2) def on_mercury(self): return round(self.years/0.2408467, 2) def o...
class SpaceAge(object): YEARS = {"on_earth": 1, "on_mercury": 0.2408467, "on_venus": 0.61519726, "on_mars": 1.8808158, "on_jupiter": 11.862615, "on_saturn": 29.447498, "on_uranus": 84.016846, "on_neptune": 164.79132} def...
class SpaceAge(object): def __init__(self, seconds): self.seconds = seconds @property def years(self): return self.seconds/31557600 def on_earth(self): return round(self.years, 2) def on_mercury(self): return round(self.years/0.2408467, 2) def on_venus(self): ...
<commit_before>class SpaceAge(object): def __init__(self, seconds): self.seconds = seconds @property def years(self): return self.seconds/31557600 def on_earth(self): return round(self.years, 2) def on_mercury(self): return round(self.years/0.2408467, 2) def o...
47c50f9e3f8c0643e0e76cd60fa5694701e73afe
scanner/ScannerApplication.py
scanner/ScannerApplication.py
from Cura.Application import Application class ScannerApplication(Application): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.loadPlugin("MeshV...
from Cura.WxApplication import WxApplication class ScannerApplication(WxApplication): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.loadPlugin(...
Use WxApplication as base class for the scanner
Use WxApplication as base class for the scanner
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
from Cura.Application import Application class ScannerApplication(Application): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.loadPlugin("MeshV...
from Cura.WxApplication import WxApplication class ScannerApplication(WxApplication): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.loadPlugin(...
<commit_before>from Cura.Application import Application class ScannerApplication(Application): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.lo...
from Cura.WxApplication import WxApplication class ScannerApplication(WxApplication): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.loadPlugin(...
from Cura.Application import Application class ScannerApplication(Application): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.loadPlugin("MeshV...
<commit_before>from Cura.Application import Application class ScannerApplication(Application): def __init__(self): super(ScannerApplication, self).__init__() self._plugin_registry.loadPlugin("STLReader") self._plugin_registry.loadPlugin("STLWriter") self._plugin_registry.lo...
e3804c302df761a4ebf7f2c7ed3e3c0bc8d079e7
grader/grader/__init__.py
grader/grader/__init__.py
import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run(): # Confi...
import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run(): """Scri...
Add a todo item to run()
Add a todo item to run()
Python
mit
redkyn/grader,grade-it/grader,redkyn/grader
import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run(): # Confi...
import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run(): """Scri...
<commit_before>import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run...
import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run(): """Scri...
import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run(): # Confi...
<commit_before>import argparse import importlib import logging import os logger = logging.getLogger(__name__) description = "An automated grading tool for programming assignments." subcommands = { "init": "grader.init", "new": "grader.new", "image": "grader.image", "grade": "grader.grade" } def run...
6bef0dc50470bc71c15e0fb7c86f03e69c416e67
scrapi/harvesters/datacite.py
scrapi/harvesters/datacite.py
''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class DataciteHarvester(OAIH...
''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class DataciteHarvester(OAIH...
Add docstring explaiing why to take the second description
Add docstring explaiing why to take the second description
Python
apache-2.0
CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,ostwald/scrapi,erinspace/scrapi,mehanig/scrapi,felliott/scrapi,fabianvf/scrapi,erinspace/scrapi,alexgarciac/scrapi,felliott/scrapi,mehanig/scrapi,jeffreyliu3230/scrapi
''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class DataciteHarvester(OAIH...
''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class DataciteHarvester(OAIH...
<commit_before>''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class Datacit...
''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class DataciteHarvester(OAIH...
''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class DataciteHarvester(OAIH...
<commit_before>''' Harvester for the DataCite MDS for the SHARE project Example API call: http://oai.datacite.org/oai?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.base.helpers import updated_schema, oai_extract_dois class Datacit...
40af3e546a9024f7bb7786828d22534f8dff103a
neutron_fwaas/common/fwaas_constants.py
neutron_fwaas/common/fwaas_constants.py
# Copyright 2015 Cisco Systems, 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 requir...
# Copyright 2015 Cisco Systems, 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 requir...
Remove unused constant for topics
Remove unused constant for topics While reading the code, I found "L3_AGENT" topic is defined but never be used. Change-Id: I9b6da61f9fe5224d2c25bbe7cc55fd508b4e240f
Python
apache-2.0
openstack/neutron-fwaas,openstack/neutron-fwaas
# Copyright 2015 Cisco Systems, 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 requir...
# Copyright 2015 Cisco Systems, 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 requir...
<commit_before># Copyright 2015 Cisco Systems, 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 # # ...
# Copyright 2015 Cisco Systems, 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 requir...
# Copyright 2015 Cisco Systems, 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 requir...
<commit_before># Copyright 2015 Cisco Systems, 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 # # ...
5055e01bb7ea340ef96204a360002907c43fac91
tsserver/models.py
tsserver/models.py
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) """Tempe...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) """Tempe...
Remove Telemetry.__init__ as not necessary
Remove Telemetry.__init__ as not necessary
Python
mit
m4tx/techswarm-server
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) """Tempe...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) """Tempe...
<commit_before>from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Floa...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) """Tempe...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) """Tempe...
<commit_before>from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Floa...
9f42cd231375475d27c6fe298ec862065c34f8ca
armstrong/core/arm_sections/views.py
armstrong/core/arm_sections/views.py
from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .models import Sect...
from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import DetailView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .models import Sectio...
Refactor SimpleSectionView to inherit DetailView
Refactor SimpleSectionView to inherit DetailView
Python
apache-2.0
armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,texastribune/armstrong.core.tt_sections
from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .models import Sect...
from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import DetailView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .models import Sectio...
<commit_before>from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .mod...
from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import DetailView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .models import Sectio...
from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .models import Sect...
<commit_before>from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from .mod...
2ca5ccb861962a021f81b6e794f5372d8079216f
fml/generatechangedfilelist.py
fml/generatechangedfilelist.py
import sys import os import commands import fnmatch import re import subprocess, shlex def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) prelist = os.p...
import sys import os import commands import fnmatch import re import subprocess, shlex mcp_root = os.path.abspath(sys.argv[1]) sys.path.append(os.path.join(mcp_root,"runtime")) from filehandling.srgshandler import parse_srg def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') retur...
Tweak file list script to print obf names
Tweak file list script to print obf names
Python
lgpl-2.1
Zaggy1024/MinecraftForge,luacs1998/MinecraftForge,simon816/MinecraftForge,karlthepagan/MinecraftForge,jdpadrnos/MinecraftForge,bonii-xx/MinecraftForge,mickkay/MinecraftForge,dmf444/MinecraftForge,Theerapak/MinecraftForge,ThiagoGarciaAlves/MinecraftForge,blay09/MinecraftForge,shadekiller666/MinecraftForge,Mathe172/Minec...
import sys import os import commands import fnmatch import re import subprocess, shlex def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) prelist = os.p...
import sys import os import commands import fnmatch import re import subprocess, shlex mcp_root = os.path.abspath(sys.argv[1]) sys.path.append(os.path.join(mcp_root,"runtime")) from filehandling.srgshandler import parse_srg def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') retur...
<commit_before>import sys import os import commands import fnmatch import re import subprocess, shlex def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) ...
import sys import os import commands import fnmatch import re import subprocess, shlex mcp_root = os.path.abspath(sys.argv[1]) sys.path.append(os.path.join(mcp_root,"runtime")) from filehandling.srgshandler import parse_srg def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') retur...
import sys import os import commands import fnmatch import re import subprocess, shlex def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) prelist = os.p...
<commit_before>import sys import os import commands import fnmatch import re import subprocess, shlex def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) ...
18332cdac7c7dcb2ef64e3a9ad17b8b229387af8
spraakbanken/s5/spr_local/reconstruct_corpus.py
spraakbanken/s5/spr_local/reconstruct_corpus.py
#!/usr/bin/env python3 import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) if words[0] == "<s>" and words[-1] == "<...
#!/usr/bin/env python3 from __future__ import print_function import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) i...
Add reconstruct corpus as a test
Add reconstruct corpus as a test
Python
apache-2.0
psmit/kaldi-recipes,phsmit/kaldi-recipes,psmit/kaldi-recipes,psmit/kaldi-recipes,phsmit/kaldi-recipes
#!/usr/bin/env python3 import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) if words[0] == "<s>" and words[-1] == "<...
#!/usr/bin/env python3 from __future__ import print_function import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) i...
<commit_before>#!/usr/bin/env python3 import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) if words[0] == "<s>" and ...
#!/usr/bin/env python3 from __future__ import print_function import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) i...
#!/usr/bin/env python3 import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) if words[0] == "<s>" and words[-1] == "<...
<commit_before>#!/usr/bin/env python3 import argparse import collections import random import sys def reconstruct(f_in, f_out): sentence_starts = [] contexts = {} for line in f_in: parts = line.split() words = parts[:-1] count = int(parts[-1]) if words[0] == "<s>" and ...
1301f5c5d5b9087ec32e3cf78f93ab9a4e708426
geokey_dataimports/__init__.py
geokey_dataimports/__init__.py
"""Main initialisation for extension.""" VERSION = (0, 4, 1) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__version__ ) excep...
"""Main initialisation for extension.""" VERSION = (0, 5, 0) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__version__ ) excep...
Increment minor version number ahead of release
Increment minor version number ahead of release
Python
mit
ExCiteS/geokey-dataimports,ExCiteS/geokey-dataimports,ExCiteS/geokey-dataimports
"""Main initialisation for extension.""" VERSION = (0, 4, 1) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__version__ ) excep...
"""Main initialisation for extension.""" VERSION = (0, 5, 0) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__version__ ) excep...
<commit_before>"""Main initialisation for extension.""" VERSION = (0, 4, 1) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__versio...
"""Main initialisation for extension.""" VERSION = (0, 5, 0) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__version__ ) excep...
"""Main initialisation for extension.""" VERSION = (0, 4, 1) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__version__ ) excep...
<commit_before>"""Main initialisation for extension.""" VERSION = (0, 4, 1) __version__ = '.'.join(map(str, VERSION)) try: from geokey.extensions.base import register register( 'geokey_dataimports', 'Data Imports', display_admin=True, superuser=False, version=__versio...
29c5391078aaa9e3c18356a18ca1c5d6f3bf82e9
src/temp_functions.py
src/temp_functions.py
def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15
def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 def f_to_c(temp): temp_k = f_to_k(temp) result = k_to_c(temp_k) return result
Write a function covert far to cesis
Write a function covert far to cesis
Python
mit
xykang/2015-05-12-BUSM-git,xykang/2015-05-12-BUSM-git
def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 Write a function covert far to cesis
def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 def f_to_c(temp): temp_k = f_to_k(temp) result = k_to_c(temp_k) return result
<commit_before>def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 <commit_msg>Write a function covert far to cesis<commit_after>
def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 def f_to_c(temp): temp_k = f_to_k(temp) result = k_to_c(temp_k) return result
def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 Write a function covert far to cesisdef k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 def f_to_c(temp): temp_k = f_to_k(temp) result = k_to_c(temp_k) return result
<commit_before>def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 <commit_msg>Write a function covert far to cesis<commit_after>def k_to_c(temp): return temp - 273.15 def f_to_k(temp): return ((temp - 32) * (5 / 9)) + 273.15 def f_to_c(temp): temp_k = f_to_k(temp) ...
5b6f4f51eb761b87881d99148e7dae013af09eb6
zgres/utils.py
zgres/utils.py
import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile, 16) + int(offs...
import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile, 16) + int(offs...
Remove sleep time as it appeared to hang forever
Remove sleep time as it appeared to hang forever
Python
mit
jinty/zgres,jinty/zgres
import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile, 16) + int(offs...
import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile, 16) + int(offs...
<commit_before>import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile,...
import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile, 16) + int(offs...
import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile, 16) + int(offs...
<commit_before>import sys import time import asyncio import logging def pg_lsn_to_int(pos): # http://www.postgresql.org/docs/9.4/static/datatype-pg-lsn.html # see http://eulerto.blogspot.com.es/2011/11/understanding-wal-nomenclature.html logfile, offset = pos.split('/') return 0xFF000000 * int(logfile,...
06c3f0c5d4764b745d87bb814cbd87213bb7f747
infrastructure/aws/attach-index-volume.py
infrastructure/aws/attach-index-volume.py
# Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = boto3.resource('ec...
# Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = boto3.resource('ec...
Use a bigger volume so it doesn't fill up
Use a bigger volume so it doesn't fill up
Python
mpl-2.0
bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox,bill-mccloskey/searchfox
# Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = boto3.resource('ec...
# Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = boto3.resource('ec...
<commit_before># Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = bot...
# Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = boto3.resource('ec...
# Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = boto3.resource('ec...
<commit_before># Creates an EBS volume for the index and attaches it to a given instance as /dev/xvdf. # Prints the volume ID on stdout. # Usage: attach-index-volume.py <channel> <instance-id> import sys import boto3 import awslib from datetime import datetime channel = sys.argv[1] instanceId = sys.argv[2] ec2 = bot...
f284a1487551850c23d251a1d501e88025261369
readthedocs/rtd_tests/tests/test_hacks.py
readthedocs/rtd_tests/tests/test_hacks.py
from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy self.as...
from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy self.as...
Comment out known failing test for now (code not in prod).
Comment out known failing test for now (code not in prod).
Python
mit
atsuyim/readthedocs.org,Tazer/readthedocs.org,espdev/readthedocs.org,VishvajitP/readthedocs.org,kdkeyser/readthedocs.org,nyergler/pythonslides,kenshinthebattosai/readthedocs.org,clarkperkins/readthedocs.org,VishvajitP/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,mrshoki/readthedocs.org,asampat3090/readthed...
from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy self.as...
from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy self.as...
<commit_before>from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy ...
from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy self.as...
from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy self.as...
<commit_before>from django.test import TestCase from core import hacks class TestHacks(TestCase): fixtures = ['eric.json', 'test_data.json'] def setUp(self): hacks.patch_meta_path() def tearDown(self): hacks.unpatch_meta_path() def test_hack_failed_import(self): import boogy ...
475d39b9af464649dbab27349180b286f0042fa8
dthm4kaiako/utils/get_upload_filepath.py
dthm4kaiako/utils/get_upload_filepath.py
"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path for file by dat...
"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path for file by dat...
Fix typo in resource media path
Fix typo in resource media path
Python
mit
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path for file by dat...
"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path for file by dat...
<commit_before>"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path ...
"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path for file by dat...
"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path for file by dat...
<commit_before>"""Helper functions for determining file paths for uploads.""" from os.path import join from datetime import datetime from pytz import timezone # This is duplicated here to avoid circular dependency with settings file TIME_ZONE = 'NZ' def get_upload_path_for_date(category): """Create upload path ...
02420b89671cf7a90c357efe24997d3142353a18
bokeh/command/tests/test_bootstrap.py
bokeh/command/tests/test_bootstrap.py
import pytest from bokeh.command.bootstrap import main def test_no_subcommand(capsys): with pytest.raises(SystemExit): main(["bokeh"]) out, err = capsys.readouterr() assert err == "ERROR: Must specify subcommand, one of: html, json or serve\n" assert out == ""
Test running `bokeh` with no subcommand
Test running `bokeh` with no subcommand
Python
bsd-3-clause
dennisobrien/bokeh,clairetang6/bokeh,azjps/bokeh,KasperPRasmussen/bokeh,msarahan/bokeh,draperjames/bokeh,stonebig/bokeh,phobson/bokeh,dennisobrien/bokeh,ptitjano/bokeh,draperjames/bokeh,KasperPRasmussen/bokeh,ptitjano/bokeh,Karel-van-de-Plassche/bokeh,percyfal/bokeh,Karel-van-de-Plassche/bokeh,schoolie/bokeh,percyfal/b...
Test running `bokeh` with no subcommand
import pytest from bokeh.command.bootstrap import main def test_no_subcommand(capsys): with pytest.raises(SystemExit): main(["bokeh"]) out, err = capsys.readouterr() assert err == "ERROR: Must specify subcommand, one of: html, json or serve\n" assert out == ""
<commit_before><commit_msg>Test running `bokeh` with no subcommand<commit_after>
import pytest from bokeh.command.bootstrap import main def test_no_subcommand(capsys): with pytest.raises(SystemExit): main(["bokeh"]) out, err = capsys.readouterr() assert err == "ERROR: Must specify subcommand, one of: html, json or serve\n" assert out == ""
Test running `bokeh` with no subcommandimport pytest from bokeh.command.bootstrap import main def test_no_subcommand(capsys): with pytest.raises(SystemExit): main(["bokeh"]) out, err = capsys.readouterr() assert err == "ERROR: Must specify subcommand, one of: html, json or serve\n" assert out ...
<commit_before><commit_msg>Test running `bokeh` with no subcommand<commit_after>import pytest from bokeh.command.bootstrap import main def test_no_subcommand(capsys): with pytest.raises(SystemExit): main(["bokeh"]) out, err = capsys.readouterr() assert err == "ERROR: Must specify subcommand, one o...
34fe6e4f499385cc437a720db0f54db0f0ba07d2
tests/tests_twobody/test_mean_elements.py
tests/tests_twobody/test_mean_elements.py
import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body is invalid." in excinfo.exconly()
import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body '{body}' is invalid." in excinfo.exconly()
Add test for error check
Add test for error check
Python
mit
poliastro/poliastro
import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body is invalid." in excinfo.exconly() Add test for error check
import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body '{body}' is invalid." in excinfo.exconly()
<commit_before>import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body is invalid." in excinfo.exconly() <commit_ms...
import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body '{body}' is invalid." in excinfo.exconly()
import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body is invalid." in excinfo.exconly() Add test for error checki...
<commit_before>import pytest from poliastro.twobody.mean_elements import get_mean_elements def test_get_mean_elements_raises_error_if_invalid_body(): body = "Sun" with pytest.raises(ValueError) as excinfo: get_mean_elements(body) assert f"The input body is invalid." in excinfo.exconly() <commit_ms...
dddf89e519e40ce118509dcb5823ad932fea88f8
chainer/training/triggers/__init__.py
chainer/training/triggers/__init__.py
from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.interval_trigger import IntervalTrigger # NOQA from chainer.training.triggers.manual_schedule_trigger import ManualScheduleTrigg...
from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.early_stopping_trigger import EarlyStoppingTrigger # NOQA from chainer.training.triggers.interval_trigger import IntervalTrigger...
Fix the order of importing
Fix the order of importing
Python
mit
niboshi/chainer,wkentaro/chainer,ktnyt/chainer,keisuke-umezawa/chainer,jnishi/chainer,hvy/chainer,chainer/chainer,niboshi/chainer,wkentaro/chainer,hvy/chainer,okuta/chainer,anaruse/chainer,keisuke-umezawa/chainer,tkerola/chainer,keisuke-umezawa/chainer,wkentaro/chainer,okuta/chainer,ktnyt/chainer,keisuke-umezawa/chaine...
from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.interval_trigger import IntervalTrigger # NOQA from chainer.training.triggers.manual_schedule_trigger import ManualScheduleTrigg...
from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.early_stopping_trigger import EarlyStoppingTrigger # NOQA from chainer.training.triggers.interval_trigger import IntervalTrigger...
<commit_before>from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.interval_trigger import IntervalTrigger # NOQA from chainer.training.triggers.manual_schedule_trigger import Manu...
from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.early_stopping_trigger import EarlyStoppingTrigger # NOQA from chainer.training.triggers.interval_trigger import IntervalTrigger...
from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.interval_trigger import IntervalTrigger # NOQA from chainer.training.triggers.manual_schedule_trigger import ManualScheduleTrigg...
<commit_before>from chainer.training.triggers import interval_trigger # NOQA from chainer.training.triggers import minmax_value_trigger # NOQA # import class and function from chainer.training.triggers.interval_trigger import IntervalTrigger # NOQA from chainer.training.triggers.manual_schedule_trigger import Manu...
6469a486847823d36a8e804755c6165d0f2fd670
bpython/__init__.py
bpython/__init__.py
# The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
# The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
Set version to mercurial in trunk
Set version to mercurial in trunk
Python
mit
5monkeys/bpython
# The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
# The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
<commit_before># The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
# The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
# The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
<commit_before># The MIT License # # Copyright (c) 2008 Bob Farrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
d128b13e9c05516dcba587c684ef2f54884d6bb6
api/migrations/0001_create_application.py
api/migrations/0001_create_application.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Application.objects.cre...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Application.objects.cre...
Add an additional default redirect_uri
Add an additional default redirect_uri (runserver's default port)
Python
bsd-3-clause
hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Application.objects.cre...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Application.objects.cre...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Applicat...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Application.objects.cre...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Application.objects.cre...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-26 20:29 from __future__ import unicode_literals from django.db import migrations from oauth2_provider.models import Application class Migration(migrations.Migration): def add_default_application(apps, schema_editor): Applicat...
e885f0557037d2df03453961acd1c40b7c44c069
timesheet_activity_report/__openerp__.py
timesheet_activity_report/__openerp__.py
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', 'project_issue_...
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', 'project_issue_...
Add support key for Travis LINT check
Add support key for Travis LINT check
Python
agpl-3.0
Elico-Corp/odoo-addons,Elico-Corp/odoo-addons,Elico-Corp/odoo-addons
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', 'project_issue_...
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', 'project_issue_...
<commit_before># -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', ...
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', 'project_issue_...
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', 'project_issue_...
<commit_before># -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Timesheet Activities Report', 'version': '8.0.1.1.0', 'category': 'Human Resources', 'depends': [ 'project_timesheet', ...
60d6f3ea5495503584220c60353df833304aff53
linkedin_scraper/parsers/base.py
linkedin_scraper/parsers/base.py
from os import path import linkedin_scraper class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines): return set(line.lower().strip() for line in...
import logging from os import path import linkedin_scraper logger = logging.getLogger(__name__) class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines)...
Handle non existing data files in BaseParser.
Handle non existing data files in BaseParser.
Python
mit
nihn/linkedin-scraper,nihn/linkedin-scraper
from os import path import linkedin_scraper class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines): return set(line.lower().strip() for line in...
import logging from os import path import linkedin_scraper logger = logging.getLogger(__name__) class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines)...
<commit_before>from os import path import linkedin_scraper class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines): return set(line.lower().stri...
import logging from os import path import linkedin_scraper logger = logging.getLogger(__name__) class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines)...
from os import path import linkedin_scraper class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines): return set(line.lower().strip() for line in...
<commit_before>from os import path import linkedin_scraper class BaseParser: @staticmethod def get_data_dir(): return path.abspath(path.join(linkedin_scraper.__file__, '../..', 'data')) @staticmethod def normalize_lines(lines): return set(line.lower().stri...
5dacf6d2e2e74b783e39641674fc0f8e718618b3
imager/ImagerProfile/models.py
imager/ImagerProfile/models.py
from django.db import models # from django.conf import settings # Create your models here. class ImagerProfile(models.Model): profile_picture = models.ImageField() # user = models.OneToOneField(settings.AUTH_USER_MODEL) phone_number = models.CharField(max_length=15) # X(XXX) XXX-XXXX birthday = mod...
from django.db import models from django.contrib.auth.models import User # class ImagerProfile(models.Manager): # pass class ImagerProfile(models.Model): user = models.OneToOneField(User) # objects = ImagerProfile() profile_picture = models.ImageField(null=True) phone_number = models.CharField(...
Change ImagerProfile model privacy booleans to default of False, profile_picture to nullable
Change ImagerProfile model privacy booleans to default of False, profile_picture to nullable
Python
mit
nbeck90/django-imager,nbeck90/django-imager
from django.db import models # from django.conf import settings # Create your models here. class ImagerProfile(models.Model): profile_picture = models.ImageField() # user = models.OneToOneField(settings.AUTH_USER_MODEL) phone_number = models.CharField(max_length=15) # X(XXX) XXX-XXXX birthday = mod...
from django.db import models from django.contrib.auth.models import User # class ImagerProfile(models.Manager): # pass class ImagerProfile(models.Model): user = models.OneToOneField(User) # objects = ImagerProfile() profile_picture = models.ImageField(null=True) phone_number = models.CharField(...
<commit_before>from django.db import models # from django.conf import settings # Create your models here. class ImagerProfile(models.Model): profile_picture = models.ImageField() # user = models.OneToOneField(settings.AUTH_USER_MODEL) phone_number = models.CharField(max_length=15) # X(XXX) XXX-XXXX ...
from django.db import models from django.contrib.auth.models import User # class ImagerProfile(models.Manager): # pass class ImagerProfile(models.Model): user = models.OneToOneField(User) # objects = ImagerProfile() profile_picture = models.ImageField(null=True) phone_number = models.CharField(...
from django.db import models # from django.conf import settings # Create your models here. class ImagerProfile(models.Model): profile_picture = models.ImageField() # user = models.OneToOneField(settings.AUTH_USER_MODEL) phone_number = models.CharField(max_length=15) # X(XXX) XXX-XXXX birthday = mod...
<commit_before>from django.db import models # from django.conf import settings # Create your models here. class ImagerProfile(models.Model): profile_picture = models.ImageField() # user = models.OneToOneField(settings.AUTH_USER_MODEL) phone_number = models.CharField(max_length=15) # X(XXX) XXX-XXXX ...
1f03af4a3ceda754dc0196c49f295fc683bd6e5a
opps/core/cache/models.py
opps/core/cache/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models class ModelCaching(models.Model): pass
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.core.cache import cache from .managers import CacheManager ModelBase = type(models.Model) class MetaCaching(ModelBase): def __new__(*args, **kwargs): new_class = ModelBase.__new__(*args, **kwargs) new_manager...
Create MetaCaching, ModelBase for core cache
Create MetaCaching, ModelBase for core cache
Python
mit
YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models class ModelCaching(models.Model): pass Create MetaCaching, ModelBase for core cache
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.core.cache import cache from .managers import CacheManager ModelBase = type(models.Model) class MetaCaching(ModelBase): def __new__(*args, **kwargs): new_class = ModelBase.__new__(*args, **kwargs) new_manager...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models class ModelCaching(models.Model): pass <commit_msg>Create MetaCaching, ModelBase for core cache<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.core.cache import cache from .managers import CacheManager ModelBase = type(models.Model) class MetaCaching(ModelBase): def __new__(*args, **kwargs): new_class = ModelBase.__new__(*args, **kwargs) new_manager...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models class ModelCaching(models.Model): pass Create MetaCaching, ModelBase for core cache#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.core.cache import cache from .managers import CacheManager ModelBa...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models class ModelCaching(models.Model): pass <commit_msg>Create MetaCaching, ModelBase for core cache<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.core.cache import cache fro...
8b6d10e8339510bbc745a3167fd1d5a60422b370
tests/test_planner.py
tests/test_planner.py
import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_largest_stock(self): largest = self.planner.largest_stock ...
import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_init_pieces(self): self.assertEqual(len(self.planner.pieces_...
Add tests for planner init
Add tests for planner init
Python
mit
alanc10n/py-cutplanner
import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_largest_stock(self): largest = self.planner.largest_stock ...
import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_init_pieces(self): self.assertEqual(len(self.planner.pieces_...
<commit_before>import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_largest_stock(self): largest = self.planner.l...
import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_init_pieces(self): self.assertEqual(len(self.planner.pieces_...
import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_largest_stock(self): largest = self.planner.largest_stock ...
<commit_before>import cutplanner import unittest class TestPlanner(unittest.TestCase): def setUp(self): sizes = [50, 80, 120] needed = [10, 25, 75] loss = 0.25 self.planner = cutplanner.Planner(sizes, needed, loss) def test_largest_stock(self): largest = self.planner.l...
88245d2cd66c75e1096eec53882a2750826f03be
zerver/migrations/0108_fix_default_string_id.py
zerver/migrations/0108_fix_default_string_id.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps, DatabaseSchem...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps, DatabaseSchem...
Fix deactivated realm corner cases with 0108.
migrations: Fix deactivated realm corner cases with 0108. Previously the default-string-id migration would not correctly handle ignoring deactivated realms.
Python
apache-2.0
hackerkid/zulip,dhcrzf/zulip,tommyip/zulip,jackrzhang/zulip,kou/zulip,brockwhittaker/zulip,hackerkid/zulip,brainwane/zulip,andersk/zulip,mahim97/zulip,brainwane/zulip,punchagan/zulip,rht/zulip,timabbott/zulip,mahim97/zulip,punchagan/zulip,synicalsyntax/zulip,brainwane/zulip,synicalsyntax/zulip,brockwhittaker/zulip,rht/...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps, DatabaseSchem...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps, DatabaseSchem...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps, DatabaseSchem...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps, DatabaseSchem...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-24 02:39 from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def fix_realm_string_ids(apps, schema_editor): # type: (StateApps...
464fc1e9a905df25b12975422d5b48cf8286306c
custom/icds_reports/utils/migrations.py
custom/icds_reports/utils/migrations.py
from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_health_monthly.sq...
from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_health_monthly.sq...
Add aww_incentive report view to migration util
Add aww_incentive report view to migration util
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_health_monthly.sq...
from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_health_monthly.sq...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_he...
from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_health_monthly.sq...
from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_health_monthly.sq...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from corehq.sql_db.operations import RawSQLMigration def get_view_migrations(): sql_views = [ 'awc_location_months.sql', 'agg_awc_monthly.sql', 'agg_ccs_record_monthly.sql', 'agg_child_he...
4c50bcf29dc397405b21322c6115a00c1df56559
indico/modules/events/views.py
indico/modules/events/views.py
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
Add view for the events modules
Add view for the events modules
Python
mit
indico/indico,ThiefMaster/indico,ThiefMaster/indico,pferreir/indico,DirkHoffmann/indico,indico/indico,indico/indico,DirkHoffmann/indico,DirkHoffmann/indico,OmeGak/indico,mvidalgarcia/indico,indico/indico,OmeGak/indico,pferreir/indico,mic4ael/indico,mic4ael/indico,ThiefMaster/indico,OmeGak/indico,pferreir/indico,OmeGak/...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
2dda63a9a71764c5f4b5e6d15372dd2eb296ef4b
nflpool/services/activeplayers_service.py
nflpool/services/activeplayers_service.py
import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def add_active_nflpla...
import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def add_active_nflpla...
Remove TODO - complete as of last commit
Remove TODO - complete as of last commit Season object is passed to the table update
Python
mit
prcutler/nflpool,prcutler/nflpool
import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def add_active_nflpla...
import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def add_active_nflpla...
<commit_before>import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def ad...
import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def add_active_nflpla...
import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def add_active_nflpla...
<commit_before>import requests from nflpool.data.dbsession import DbSessionFactory from nflpool.data.activeplayers import ActiveNFLPlayers import nflpool.data.secret as secret from requests.auth import HTTPBasicAuth from nflpool.data.seasoninfo import SeasonInfo class ActivePlayersService: @classmethod def ad...
7e97ddd43b8b388091e62f29d8a31875d8637d71
tinman/__init__.py
tinman/__init__.py
#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5 __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', 'tinman....
#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5" __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', 'tinman...
Fix a small release bug
Fix a small release bug
Python
bsd-3-clause
lucius-feng/tinman,gmr/tinman,lucius-feng/tinman,gmr/tinman,lucius-feng/tinman
#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5 __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', 'tinman....
#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5" __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', 'tinman...
<commit_before>#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5 __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', ...
#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5" __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', 'tinman...
#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5 __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', 'tinman....
<commit_before>#!/usr/bin/env python """ Core Tinman imports """ __author__ = 'Gavin M. Roy' __email__ = '<gmr@myyearbook.com>' __since__ = '2011-03-14' __version__ = "0.2.5 __all__ = ['tinman.application', 'tinman.cache', 'tinman.cli', 'tinman.clients', 'tinman.utils', ...
1b68bd3c5cb81f06ccc4dcf69baeafca1104ed37
nirikshak/workers/files/ini.py
nirikshak/workers/files/ini.py
# Copyright 2017 <thenakliman@gmail.com> # # 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...
# Copyright 2017 <thenakliman@gmail.com> # # 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...
Support for python3.5 has been added for configparser
Support for python3.5 has been added for configparser
Python
apache-2.0
thenakliman/nirikshak,thenakliman/nirikshak
# Copyright 2017 <thenakliman@gmail.com> # # 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...
# Copyright 2017 <thenakliman@gmail.com> # # 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...
<commit_before># Copyright 2017 <thenakliman@gmail.com> # # 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 l...
# Copyright 2017 <thenakliman@gmail.com> # # 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...
# Copyright 2017 <thenakliman@gmail.com> # # 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...
<commit_before># Copyright 2017 <thenakliman@gmail.com> # # 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 l...
7a1056e7c929b07220fdefb45e282104ee192836
github3/__init__.py
github3/__init__.py
""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ = '0.1a3' from...
""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ = '0.1a3' from...
Add more objects to the default namespace.
Add more objects to the default namespace. Ease of testing, I'm not exactly a fan of polluting it though. Might rework this later.
Python
bsd-3-clause
wbrefvem/github3.py,itsmemattchung/github3.py,christophelec/github3.py,sigmavirus24/github3.py,icio/github3.py,h4ck3rm1k3/github3.py,krxsky/github3.py,jim-minter/github3.py,ueg1990/github3.py,agamdua/github3.py,degustaf/github3.py,balloob/github3.py
""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ = '0.1a3' from...
""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ = '0.1a3' from...
<commit_before>""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ ...
""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ = '0.1a3' from...
""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ = '0.1a3' from...
<commit_before>""" github3 ======= See http://github3py.rtfd.org/ for documentation. :copyright: (c) 2012 by Ian Cordasco :license: Modified BSD, see LICENSE for more details """ __title__ = 'github3' __author__ = 'Ian Cordasco' __license__ = 'Modified BSD' __copyright__ = 'Copyright 2012 Ian Cordasco' __version__ ...
689980daec94683557113163d0b7384c33904bbf
app/aandete/model/model.py
app/aandete/model/model.py
from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=True) class Cookb...
from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=True) @classm...
Allow string IDs in get_by_id.
Allow string IDs in get_by_id.
Python
bsd-3-clause
stefanv/aandete,stefanv/aandete
from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=True) class Cookb...
from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=True) @classm...
<commit_before>from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=Tru...
from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=True) @classm...
from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=True) class Cookb...
<commit_before>from google.appengine.ext import db class Recipe(db.Model): title = db.StringProperty(required=True) text = db.TextProperty() ingredients = db.TextProperty() tags = db.StringListProperty() photo = db.BlobProperty() owner = db.UserProperty(auto_current_user_add=True, required=Tru...
932e3d8b00768b1b3c103d3d44f714db5bb3a3e6
examples/field_example.py
examples/field_example.py
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = grap...
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = g...
Fix flake8 issues in field example
Fix flake8 issues in field example
Python
mit
Globegitter/graphene,graphql-python/graphene,Globegitter/graphene,sjhewitt/graphene,graphql-python/graphene,sjhewitt/graphene
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = grap...
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = g...
<commit_before>import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo')...
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = g...
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = grap...
<commit_before>import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo')...
d60c7e9471c442112d66a9b15838bd22fdd76600
libraries/encryption.py
libraries/encryption.py
from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1(password) ...
from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1(password) ...
Exclude the salt from the returned decrypted password
Exclude the salt from the returned decrypted password
Python
agpl-3.0
dastergon/identity.gentoo.org,gentoo/identity.gentoo.org,dastergon/identity.gentoo.org,gentoo/identity.gentoo.org
from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1(password) ...
from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1(password) ...
<commit_before>from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1...
from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1(password) ...
from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1(password) ...
<commit_before>from Crypto.Cipher import Blowfish from django.conf import settings from random import choice from base64 import encodestring as encode from base64 import decodestring as decode import base64 import hashlib import string import os def sha_password(password): salt = os.urandom(4) h = hashlib.sha1...
a047fe167a598adfccc70268a01829b8bcdb11e1
python/test/clienttest.py
python/test/clienttest.py
import molequeue client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit_job_request(job_request)
import unittest import molequeue class TestClient(unittest.TestCase): def test_submit_job_request(self): client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit...
Convert test case to Python unittest.TestCase
Convert test case to Python unittest.TestCase Use Python's testing framework Change-Id: I924f329c43294bb1fbb395a7bb19bcaf06ea9385
Python
bsd-3-clause
OpenChemistry/molequeue,OpenChemistry/molequeue,OpenChemistry/molequeue
import molequeue client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit_job_request(job_request)Convert test case to Python unittest.TestCase Use Python's testing framework Change-Id: I...
import unittest import molequeue class TestClient(unittest.TestCase): def test_submit_job_request(self): client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit...
<commit_before>import molequeue client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit_job_request(job_request)<commit_msg>Convert test case to Python unittest.TestCase Use Python's test...
import unittest import molequeue class TestClient(unittest.TestCase): def test_submit_job_request(self): client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit...
import molequeue client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit_job_request(job_request)Convert test case to Python unittest.TestCase Use Python's testing framework Change-Id: I...
<commit_before>import molequeue client = molequeue.Client() client.connect_to_server('MoleQueue') job_request = molequeue.JobRequest() job_request.queue = 'salix' job_request.program = 'sleep (testing)' client.submit_job_request(job_request)<commit_msg>Convert test case to Python unittest.TestCase Use Python's test...
0942ee64b3d84d5ea818a204c16b80d4120e54f2
st2common/st2common/transport/__init__.py
st2common/st2common/transport/__init__.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Remove some nasty imports to avoid cyclic import issues.
Remove some nasty imports to avoid cyclic import issues.
Python
apache-2.0
Plexxi/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
82b45c3ec1344bed87ac7d572d82f43a4320492c
craigomatic/wsgi.py
craigomatic/wsgi.py
""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application SITE_ROOT = dirname(dirname(abspath(__file__))) path.append(SITE_ROOT) os....
""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise SITE_ROOT = dirname(dirname...
Integrate whitenoise with the Django application
Integrate whitenoise with the Django application This allows Django to serve static files in production.
Python
mit
rgreinho/craigomatic,rgreinho/craigomatic,rgreinho/craigomatic,rgreinho/craigomatic
""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application SITE_ROOT = dirname(dirname(abspath(__file__))) path.append(SITE_ROOT) os....
""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise SITE_ROOT = dirname(dirname...
<commit_before>""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application SITE_ROOT = dirname(dirname(abspath(__file__))) path.append(...
""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise SITE_ROOT = dirname(dirname...
""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application SITE_ROOT = dirname(dirname(abspath(__file__))) path.append(SITE_ROOT) os....
<commit_before>""" WSGI config for craigomatic project. It exposes the WSGI callable as a module-level variable named ``application``. """ import os from os.path import abspath, dirname from sys import path from django.core.wsgi import get_wsgi_application SITE_ROOT = dirname(dirname(abspath(__file__))) path.append(...
61ebf3fd3a80dc5573cb65c4250ede591d161b9e
pyaavso/formats/visual.py
pyaavso/formats/visual.py
from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aavso.org/aavso-v...
from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aavso.org/aavso-v...
Write date format in header.
Write date format in header.
Python
mit
zsiciarz/pyaavso
from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aavso.org/aavso-v...
from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aavso.org/aavso-v...
<commit_before>from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aa...
from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aavso.org/aavso-v...
from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aavso.org/aavso-v...
<commit_before>from __future__ import unicode_literals import pyaavso class VisualFormatWriter(object): """ A class responsible for writing observation data in AAVSO `Visual File Format`_. The API here mimics the ``csv`` module in Python standard library. .. _`Visual File Format`: http://www.aa...
81b9a8179ef4db9857b4d133769c92c7b1972ee6
pysuru/tests/test_base.py
pysuru/tests/test_base.py
# coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_build_url_should_return_full_api_endpoint(): api = BaseAPI('http://example.com/', None...
# coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_baseapi_conn_should_return_same_object(): api = BaseAPI(None, None) obj1 = api.con...
Add test to ensure only one conn object is created
Add test to ensure only one conn object is created
Python
mit
rcmachado/pysuru
# coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_build_url_should_return_full_api_endpoint(): api = BaseAPI('http://example.com/', None...
# coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_baseapi_conn_should_return_same_object(): api = BaseAPI(None, None) obj1 = api.con...
<commit_before># coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_build_url_should_return_full_api_endpoint(): api = BaseAPI('http://exam...
# coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_baseapi_conn_should_return_same_object(): api = BaseAPI(None, None) obj1 = api.con...
# coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_build_url_should_return_full_api_endpoint(): api = BaseAPI('http://example.com/', None...
<commit_before># coding: utf-8 from pysuru.base import BaseAPI, ObjectMixin def test_baseapi_headers_should_return_authorization_header(): api = BaseAPI(None, 'TOKEN') assert {'Authorization': 'bearer TOKEN'} == api.headers def test_build_url_should_return_full_api_endpoint(): api = BaseAPI('http://exam...
d32710e53b89e1377a64427f934053c3b0d33802
bin/intake_multiprocess.py
bin/intake_multiprocess.py
import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")) intake_l...
import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")) parser =...
Use a separate log file for the public launcher data
Use a separate log file for the public launcher data Log files are not thread-safe
Python
bsd-3-clause
sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server
import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")) intake_l...
import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")) parser =...
<commit_before>import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")...
import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")) parser =...
import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")) intake_l...
<commit_before>import json import logging import argparse import numpy as np import emission.pipeline.scheduler as eps if __name__ == '__main__': try: intake_log_config = json.load(open("conf/log/intake.conf", "r")) except: intake_log_config = json.load(open("conf/log/intake.conf.sample", "r")...
454e8203295c7f51e1d660adcaf3d282ded5652f
scripts/cluster/craq/start_craq_router.py
scripts/cluster/craq/start_craq_router.py
#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.30:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.30:9888', shell=True) ...
#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.7:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.7:9888', shell=True) r...
Make craq router script point at correct zookeeper node.
Make craq router script point at correct zookeeper node.
Python
bsd-3-clause
sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata
#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.30:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.30:9888', shell=True) ...
#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.7:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.7:9888', shell=True) r...
<commit_before>#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.30:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.30:9888', shel...
#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.7:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.7:9888', shell=True) r...
#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.30:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.30:9888', shell=True) ...
<commit_before>#!/usr/bin/python import sys import subprocess import time def main(): subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10499 -z 192.168.1.30:9888', shell=True) subprocess.Popen('/home/meru/bmistree/new-craq-dist/craq-router-32 -d meru -p 10498 -z 192.168.1.30:9888', shel...
f0371f68fc0ece594710ad9dbbdbfdab00a22e49
migrations/003_add_capped_collections.py
migrations/003_add_capped_collections.py
""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_realtime_pay_legalisation_post", "fco_realtime_pay_legalisation_drop_off", "fco_realtime_pay_register_birth_abroad", "fco_realtime_pay_registe...
""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_pay_legalisation_post_realtime", "fco_pay_legalisation_drop_off_realtime", "fco_pay_register_birth_abroad_realtime", "fco_pay_register_death_a...
Make realtim fco bucket names match format of others
Make realtim fco bucket names match format of others
Python
mit
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_realtime_pay_legalisation_post", "fco_realtime_pay_legalisation_drop_off", "fco_realtime_pay_register_birth_abroad", "fco_realtime_pay_registe...
""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_pay_legalisation_post_realtime", "fco_pay_legalisation_drop_off_realtime", "fco_pay_register_birth_abroad_realtime", "fco_pay_register_death_a...
<commit_before>""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_realtime_pay_legalisation_post", "fco_realtime_pay_legalisation_drop_off", "fco_realtime_pay_register_birth_abroad", "fco_realt...
""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_pay_legalisation_post_realtime", "fco_pay_legalisation_drop_off_realtime", "fco_pay_register_birth_abroad_realtime", "fco_pay_register_death_a...
""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_realtime_pay_legalisation_post", "fco_realtime_pay_legalisation_drop_off", "fco_realtime_pay_register_birth_abroad", "fco_realtime_pay_registe...
<commit_before>""" Add capped collections for real time data """ import logging log = logging.getLogger(__name__) def up(db): capped_collections = [ "fco_realtime_pay_legalisation_post", "fco_realtime_pay_legalisation_drop_off", "fco_realtime_pay_register_birth_abroad", "fco_realt...
db7583b62aad9eaf10c67e89cd46087b36c77d81
scikits/image/io/setup.py
scikits/image/io/setup.py
#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', parent_package, t...
#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', parent_package, t...
Move plugin tests to io/tests.
io: Move plugin tests to io/tests.
Python
bsd-3-clause
ClinicalGraphics/scikit-image,emmanuelle/scikits.image,juliusbierk/scikit-image,Hiyorimi/scikit-image,almarklein/scikit-image,newville/scikit-image,SamHames/scikit-image,ClinicalGraphics/scikit-image,almarklein/scikit-image,youprofit/scikit-image,jwiggins/scikit-image,Britefury/scikit-image,pratapvardhan/scikit-image,c...
#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', parent_package, t...
#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', parent_package, t...
<commit_before>#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', pa...
#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', parent_package, t...
#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', parent_package, t...
<commit_before>#!/usr/bin/env python from scikits.image._build import cython import os.path base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('io', pa...
459e8ba9ecfd16276d7a623b5f6e61ac9fcedcee
kolibri/plugins/html5_viewer/options.py
kolibri/plugins/html5_viewer/options.py
import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-lock", ...
import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-lock", ...
Fix typo in sandbox attribute name.
Fix typo in sandbox attribute name.
Python
mit
indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri
import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-lock", ...
import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-lock", ...
<commit_before>import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-...
import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-lock", ...
import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-lock", ...
<commit_before>import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-...
43238d0de9e4d6d4909b4d67c17449a9599e5dac
mygpo/web/templatetags/time.py
mygpo/web/templatetags/time.py
from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> (t.hour, t.minu...
from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> (t.hour, t.minu...
Format short durations without "0 hours"
Format short durations without "0 hours"
Python
agpl-3.0
gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo
from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> (t.hour, t.minu...
from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> (t.hour, t.minu...
<commit_before>from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> ...
from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> (t.hour, t.minu...
from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> (t.hour, t.minu...
<commit_before>from datetime import time from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django import template register = template.Library() @register.filter def sec_to_time(sec): """ Converts seconds to a time object >>> t = sec_to_time(1000) >>> ...