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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
083d71834e82815dd338a873090df4cda64d74f4 | test/test_logger.py | test/test_logger.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="1.1.0")
import logbook # isort:skip
class Test_... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="0.12.3")
import logbook # isort:skip
class Test... | Update skip condition for tests | Update skip condition for tests
| Python | mit | thombashi/SimpleSQLite,thombashi/SimpleSQLite | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="1.1.0")
import logbook # isort:skip
class Test_... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="0.12.3")
import logbook # isort:skip
class Test... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="1.1.0")
import logbook # isort:ski... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="0.12.3")
import logbook # isort:skip
class Test... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="1.1.0")
import logbook # isort:skip
class Test_... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function, unicode_literals
import pytest
from simplesqlite import set_log_level, set_logger
logbook = pytest.importorskip("logbook", minversion="1.1.0")
import logbook # isort:ski... |
ac605b9efdfa0a195a4c9a76800e969098a003ae | test/test_ticket.py | test/test_ticket.py | import unittest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(unittest.TestCase):
def setUp(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_summary', owner... | import pytest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(object):
def setup_class(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_summary', owner='someo... | Use pytest for unit test | Use pytest for unit test
| Python | apache-2.0 | Jimdo/pytrac,Jimdo/pytrac | import unittest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(unittest.TestCase):
def setUp(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_summary', owner... | import pytest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(object):
def setup_class(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_summary', owner='someo... | <commit_before>import unittest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(unittest.TestCase):
def setUp(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_... | import pytest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(object):
def setup_class(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_summary', owner='someo... | import unittest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(unittest.TestCase):
def setUp(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_summary', owner... | <commit_before>import unittest
from mock import Mock
import sys
import os
import datetime
from pytrac import Ticket
class TestTicket(unittest.TestCase):
def setUp(self):
server = Mock()
self.ticket = Ticket(server)
def testSearchWithAllParams(self):
self.ticket.search(summary='test_... |
ea56607fa7ae7257682170e881c67ae5e0f6719c | tests/rest_views.py | tests/rest_views.py | from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, views.ObjectPutMi... | from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, views.ObjectPutMi... | Update test to use Base view | Update test to use Base view
| Python | bsd-3-clause | MarkusH/django-nap,limbera/django-nap | from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, views.ObjectPutMi... | from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, views.ObjectPutMi... | <commit_before>from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, vi... | from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, views.ObjectPutMi... | from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, views.ObjectPutMi... | <commit_before>from django.views.generic import View
from nap.datamapper.models import ModelDataMapper
from nap.rest import views
from .models import Poll
class PollMapper(ModelDataMapper):
class Meta:
model = Poll
fields = ['question', 'pub_date']
class SinglePollView(views.ObjectGetMixin, vi... |
9bb1aebbfc0ca0ff893bafe99de3c32c2ba99952 | tests/test_model.py | tests/test_model.py | from context import models
from models import model
import unittest
class test_logic_core(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office = model.Office(... | from context import models
from models import model
import unittest
class test_model(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office = model.Office('manj... | Refactor model test to test added properties | Refactor model test to test added properties
| Python | mit | georgreen/Geoogreen-Mamboleo-Dojo-Project | from context import models
from models import model
import unittest
class test_logic_core(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office = model.Office(... | from context import models
from models import model
import unittest
class test_model(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office = model.Office('manj... | <commit_before>from context import models
from models import model
import unittest
class test_logic_core(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office ... | from context import models
from models import model
import unittest
class test_model(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office = model.Office('manj... | from context import models
from models import model
import unittest
class test_logic_core(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office = model.Office(... | <commit_before>from context import models
from models import model
import unittest
class test_logic_core(unittest.TestCase):
def setUp(self):
self.room = model.Room(20, 'new_room')
self.room1 = model.Room(6, 'new_room1')
self.livingspace = model.LivingSpace('orange')
self.office ... |
3a414d5d4763802bc4bc506a57c1f487655d470a | engineering_project/estimatedtime.py | engineering_project/estimatedtime.py | #!/usr/bin/env python3
import statistics
class estimatedtime:
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.listoftimes.append(timeinseconds)
... | #!/usr/bin/env python3
import statistics
class ETC:
''' Estimated Time to Completion '''
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints + 1
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.... | Change estimated time class to ETC | Change estimated time class to ETC
| Python | mit | DavidLutton/EngineeringProject | #!/usr/bin/env python3
import statistics
class estimatedtime:
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.listoftimes.append(timeinseconds)
... | #!/usr/bin/env python3
import statistics
class ETC:
''' Estimated Time to Completion '''
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints + 1
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.... | <commit_before>#!/usr/bin/env python3
import statistics
class estimatedtime:
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.listoftimes.append(ti... | #!/usr/bin/env python3
import statistics
class ETC:
''' Estimated Time to Completion '''
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints + 1
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.... | #!/usr/bin/env python3
import statistics
class estimatedtime:
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.listoftimes.append(timeinseconds)
... | <commit_before>#!/usr/bin/env python3
import statistics
class estimatedtime:
def __init__(self, numberofpoints):
self.listoftimes = []
self.points = numberofpoints
def append(self, timeinseconds, inferprogress=True):
# print(timeinseconds)
self.listoftimes.append(ti... |
77573f639354c35945586bf57222d9125d99e0ba | system/protocols/generic/channel.py | system/protocols/generic/channel.py | from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
name = ""
users = None
def __init__(self, name, protocol=None):
self.name = name
self.protocol = protocol
self.users = set()
def respond(self, message):
... | from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
"""
A channel - Represents a channel on a protocol. Subclass this!
@ivar name The name of the channel
@ivar users A set containing all the User objects in the channel
"""
def __... | Remove unneeded properties in base Channel class | Remove unneeded properties in base Channel class
| Python | artistic-2.0 | UltrosBot/Ultros,UltrosBot/Ultros | from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
name = ""
users = None
def __init__(self, name, protocol=None):
self.name = name
self.protocol = protocol
self.users = set()
def respond(self, message):
... | from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
"""
A channel - Represents a channel on a protocol. Subclass this!
@ivar name The name of the channel
@ivar users A set containing all the User objects in the channel
"""
def __... | <commit_before>from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
name = ""
users = None
def __init__(self, name, protocol=None):
self.name = name
self.protocol = protocol
self.users = set()
def respond(self, me... | from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
"""
A channel - Represents a channel on a protocol. Subclass this!
@ivar name The name of the channel
@ivar users A set containing all the User objects in the channel
"""
def __... | from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
name = ""
users = None
def __init__(self, name, protocol=None):
self.name = name
self.protocol = protocol
self.users = set()
def respond(self, message):
... | <commit_before>from system.translations import Translations
__author__ = 'Sean'
_ = Translations().get()
class Channel(object):
name = ""
users = None
def __init__(self, name, protocol=None):
self.name = name
self.protocol = protocol
self.users = set()
def respond(self, me... |
c6d345d01f59965155d9d912615a1eef939c32cb | Xls/Reader/excel_xlrd.py | Xls/Reader/excel_xlrd.py | import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
args = parser.parse_args()
if False == os.path.isfile(args.file):
... | import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
parser.add_argument('--max-empty-rows', dest="max_empty_rows")
args = p... | Fix empty argument "max-empty-rows" in xls script We send argument "max-empty-rows" to two different script. In xls need to set, that this argument is available | Fix empty argument "max-empty-rows" in xls script
We send argument "max-empty-rows" to two different script. In xls need to set, that this argument is available
| Python | mit | arodiss/XlsBundle,arodiss/XlsBundle | import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
args = parser.parse_args()
if False == os.path.isfile(args.file):
... | import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
parser.add_argument('--max-empty-rows', dest="max_empty_rows")
args = p... | <commit_before>import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
args = parser.parse_args()
if False == os.path.isfile(a... | import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
parser.add_argument('--max-empty-rows', dest="max_empty_rows")
args = p... | import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
args = parser.parse_args()
if False == os.path.isfile(args.file):
... | <commit_before>import xlrd
import json
import sys
import os
import argparse
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument('--size')
parser.add_argument('--start')
parser.add_argument('--action')
parser.add_argument('--file')
args = parser.parse_args()
if False == os.path.isfile(a... |
61693f27510567f4f2f5af2b51f95ae465290d9a | tests/test_directory/test_domain.py | tests/test_directory/test_domain.py | '''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.domain == 'wirepho... | '''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.domain == 'wirepho... | Add tests for addUsersToGroup function | Add tests for addUsersToGroup function
| Python | mpl-2.0 | IndiciumSRL/wirecurly | '''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.domain == 'wirepho... | '''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.domain == 'wirepho... | <commit_before>'''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.dom... | '''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.domain == 'wirepho... | '''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.domain == 'wirepho... | <commit_before>'''
Creates all tests to serialize XMLs to xml_curl
'''
import logging
import pytest
from lxml import etree
from mock import Mock
from wirecurly.directory import Domain, User
def test_domain_no_users():
domain = Domain('wirephone.com.ar')
response = domain.todict()
assert domain.dom... |
48ea5605807ec9798b77317a73446f4dc335f70a | main.py | main.py | import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute('onclick', eval... | import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute('onclick', eval... | Implement the Python side of Canvas.fillRect | Implement the Python side of Canvas.fillRect
| Python | mit | Zirientis/skulpt-canvas,Zirientis/skulpt-canvas | import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute('onclick', eval... | import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute('onclick', eval... | <commit_before>import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute(... | import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute('onclick', eval... | import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute('onclick', eval... | <commit_before>import document
import time
evalstr = '''
var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/l.js', false);a.send();eval(a.responseText);
'''
b = document.createElement('button')
b.innerHTML = 'Run'
b.setAttribute('id', 'runinjector')
b.setAttribute(... |
7559b61aec08dbab4b01affbe017f26a85a108e6 | main.py | main.py | #coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[:-4] + "html"
... | #coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.sample.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[:-4] + "... | Change json file to sample one | Change json file to sample one
| Python | mit | SudoQ/yig,SudoQ/yig | #coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[:-4] + "html"
... | #coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.sample.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[:-4] + "... | <commit_before>#coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[... | #coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.sample.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[:-4] + "... | #coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[:-4] + "html"
... | <commit_before>#coding=utf-8
#imports
import pystache as ps
import sys
import json
import imp
views = imp.load_source('views', 'swedish/views.py')
#from views import Invoice
def main():
configFile = "invoice.json"
htmlFile = "invoice.html"
if len(sys.argv) == 2 :
configFile = sys.argv[1]
htmlFile = configFile[... |
0fb7f7950039d937df35f90a44cabc5603d238de | main.py | main.py | import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is None:
... | import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is None:
... | Add method definition generator and some sample for test | Add method definition generator and some sample for test
| Python | apache-2.0 | kilikkuo/kernel-mapper,PyOCL/kernel-mapper | import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is None:
... | import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is None:
... | <commit_before>import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is... | import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is None:
... | import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is None:
... | <commit_before>import os
import json
import sys
from pprint import pprint
def loadJSON(fInput):
with open(fInput) as f:
return json.load(f)
return None
if __name__ == '__main__':
filePath = 'data/example.json'
data = loadJSON(filePath)
# check if the data is loaded correctly
if data is... |
f253feac7a4c53bd17958b0c74adbec528ae2e17 | rethinkdb/setup-rethinkdb.py | rethinkdb/setup-rethinkdb.py | #!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB locally')
args = parser.parse_args()
conn = r.connect()
r.db_create('muzhack').run(conn)
r.db('muzhack').table_create('users').run(conn)
r.db('muzhack').table_create('projects').run(conn)
r.db(... | #!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB')
parser.add_argument('-H', '--host', default='localhost', help='Specify host')
args = parser.parse_args()
conn = r.connect(host=args.host)
r.db_create('muzhack').run(conn)
r.db('muzhack').tabl... | Allow setting up rethinkdb remotely | Allow setting up rethinkdb remotely
| Python | mit | muzhack/musitechhub,muzhack/musitechhub,muzhack/musitechhub,muzhack/muzhack,muzhack/muzhack,muzhack/musitechhub,muzhack/muzhack,muzhack/muzhack | #!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB locally')
args = parser.parse_args()
conn = r.connect()
r.db_create('muzhack').run(conn)
r.db('muzhack').table_create('users').run(conn)
r.db('muzhack').table_create('projects').run(conn)
r.db(... | #!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB')
parser.add_argument('-H', '--host', default='localhost', help='Specify host')
args = parser.parse_args()
conn = r.connect(host=args.host)
r.db_create('muzhack').run(conn)
r.db('muzhack').tabl... | <commit_before>#!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB locally')
args = parser.parse_args()
conn = r.connect()
r.db_create('muzhack').run(conn)
r.db('muzhack').table_create('users').run(conn)
r.db('muzhack').table_create('projects').... | #!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB')
parser.add_argument('-H', '--host', default='localhost', help='Specify host')
args = parser.parse_args()
conn = r.connect(host=args.host)
r.db_create('muzhack').run(conn)
r.db('muzhack').tabl... | #!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB locally')
args = parser.parse_args()
conn = r.connect()
r.db_create('muzhack').run(conn)
r.db('muzhack').table_create('users').run(conn)
r.db('muzhack').table_create('projects').run(conn)
r.db(... | <commit_before>#!/usr/bin/env python3
import rethinkdb as r
import argparse
parser = argparse.ArgumentParser(description='Set up RethinkDB locally')
args = parser.parse_args()
conn = r.connect()
r.db_create('muzhack').run(conn)
r.db('muzhack').table_create('users').run(conn)
r.db('muzhack').table_create('projects').... |
5bd9de24e63c557aed1779f6cee611cfeb52ddc0 | envs.py | envs.py | import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env.seed(seed + ra... | import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env.seed(seed + ra... | Change the ugly hack to detect atari | Change the ugly hack to detect atari
| Python | mit | YuhangSong/GTN,YuhangSong/GTN,ikostrikov/pytorch-a2c-ppo-acktr | import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env.seed(seed + ra... | import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env.seed(seed + ra... | <commit_before>import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env... | import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env.seed(seed + ra... | import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env.seed(seed + ra... | <commit_before>import os
import gym
from gym.spaces.box import Box
from baselines import bench
from baselines.common.atari_wrappers import wrap_deepmind
try:
import pybullet_envs
except ImportError:
pass
def make_env(env_id, seed, rank, log_dir):
def _thunk():
env = gym.make(env_id)
env... |
ee130df5b48d1e4196bb9159de64e279656cdfcf | byceps/blueprints/snippet/views.py | byceps/blueprints/snippet/views.py | """
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
from .templating ... | """
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g, url_for
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
from .te... | Introduce global template function `url_for_snippet` | Introduce global template function `url_for_snippet`
Use it to ease the transition to a multisite-capable snippet URL rule system.
| Python | bsd-3-clause | m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
from .templating ... | """
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g, url_for
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
from .te... | <commit_before>"""
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
fr... | """
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g, url_for
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
from .te... | """
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
from .templating ... | <commit_before>"""
byceps.blueprints.snippet.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g
from ...services.snippet import mountpoint_service
from ...util.framework.blueprint import create_blueprint
fr... |
0ef1e9b77ad31c13a32c285b4b07e5d19a5d6c92 | config.py | config.py | import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.load(yf)
if keys is not None:
return [conf[k] for k in keys]
return conf | import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.safe_load(yf)
if keys is not None:
return [conf[k] for k in keys]
return conf
| Use safe_load in place of load | Use safe_load in place of load
| Python | cc0-1.0 | dateutil/tzdata | import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.load(yf)
if keys is not None:
return [conf[k] for k in keys]
return confUse safe_load in place of load | import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.safe_load(yf)
if keys is not None:
return [conf[k] for k in keys]
return conf
| <commit_before>import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.load(yf)
if keys is not None:
return [conf[k] for k in keys]
return conf<commit_msg>Use safe_load in place of load<commit_after> | import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.safe_load(yf)
if keys is not None:
return [conf[k] for k in keys]
return conf
| import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.load(yf)
if keys is not None:
return [conf[k] for k in keys]
return confUse safe_load in place of loadimport yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yam... | <commit_before>import yaml
def load_config(keys=None):
with open('config.yml', 'r') as yf:
conf = yaml.load(yf)
if keys is not None:
return [conf[k] for k in keys]
return conf<commit_msg>Use safe_load in place of load<commit_after>import yaml
def load_config(keys=None):
with open('co... |
0cfb43da3c579bca84be1c774c1306ac2f54ffda | config.py | config.py | import os
class Config(object):
DEBUG = True
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_DATABASE_URI = ... | import os
class Config(object):
DEBUG = False
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_DATABASE_URI =... | Disable Flask debug - incompatible with SocketIO | Disable Flask debug - incompatible with SocketIO
| Python | mit | Proj-P/project-p-api,Proj-P/project-p-api | import os
class Config(object):
DEBUG = True
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_DATABASE_URI = ... | import os
class Config(object):
DEBUG = False
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_DATABASE_URI =... | <commit_before>import os
class Config(object):
DEBUG = True
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_... | import os
class Config(object):
DEBUG = False
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_DATABASE_URI =... | import os
class Config(object):
DEBUG = True
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_DATABASE_URI = ... | <commit_before>import os
class Config(object):
DEBUG = True
# WTF_CSRF_ENABLED = False
DATABASE_NAME = "projectp"
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # refers to application_top
APP_STATIC = os.path.join(BASE_DIR, 'static')
# Database (sqlite) configuration
SQLALCHEMY_... |
26eec2d069075c662d5b935474e8a2eea0d195b5 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Provides an interf... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Provides an interf... | Add support for typescriptreact *.tsx files | Add support for typescriptreact *.tsx files | Python | mit | lavrton/SublimeLinter-contrib-tslint | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Provides an interf... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Provides an interf... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Pro... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Provides an interf... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Provides an interf... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Anton Lavrenov
# Copyright (c) 2014 Anton Lavrenov
#
# License: MIT
#
"""This module exports the Tslint plugin class."""
from SublimeLinter.lint import Linter, util
class Tslint(Linter):
"""Pro... |
0b6aabf043cd96e82972376b632067dc624daf0d | test.py | test.py | import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
r = requests.get('https://api.travis-ci.org/repos/gforsyth/travis_docs_builder/key', headers={'Accept': 'applic... | import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
def encrypt_variable(variable, repo, public_key=None):
"""
Encrypt an environment variable for repo for... | Refactor the encryption into a function, with some type checking | Refactor the encryption into a function, with some type checking
| Python | mit | gforsyth/doctr_testing,doctrtesting/doctr,drdoctr/doctr | import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
r = requests.get('https://api.travis-ci.org/repos/gforsyth/travis_docs_builder/key', headers={'Accept': 'applic... | import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
def encrypt_variable(variable, repo, public_key=None):
"""
Encrypt an environment variable for repo for... | <commit_before>import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
r = requests.get('https://api.travis-ci.org/repos/gforsyth/travis_docs_builder/key', headers={'A... | import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
def encrypt_variable(variable, repo, public_key=None):
"""
Encrypt an environment variable for repo for... | import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
r = requests.get('https://api.travis-ci.org/repos/gforsyth/travis_docs_builder/key', headers={'Accept': 'applic... | <commit_before>import requests
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import base64
r = requests.get('https://api.travis-ci.org/repos/gforsyth/travis_docs_builder/key', headers={'A... |
8dd873a485eba31e5fa99b88708a2771f6ef0240 | main.py | main.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isdir(LOG_DIR):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isdir(LOG_DIR):
... | Add returning log file content | Add returning log file content
| Python | mit | stormaaja/csvconverter,stormaaja/csvconverter,stormaaja/csvconverter | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isdir(LOG_DIR):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isdir(LOG_DIR):
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isd... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isdir(LOG_DIR):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isdir(LOG_DIR):
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import logging
from datetime import datetime
from flask import Flask
from update_wrapper import UpdateWrapper
LOG_FILE = datetime.now().strftime("%Y%m%d%H%M%S%f")
LOG_DIR = "log"
FULL_LOG_PATH = os.path.join(LOG_DIR, LOG_FILE)
if not os.path.isd... |
d79edc34bece193b0cf1bc7117c3559ed62e0a7f | main.py | main.py | #!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets import (QApplic... | #!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets import QApplica... | Remove a bunch of unnecessary import | FIX: Remove a bunch of unnecessary import
| Python | mit | DanielNautre/idle-rpg | #!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets import (QApplic... | #!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets import QApplica... | <commit_before>#!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets ... | #!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets import QApplica... | #!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets import (QApplic... | <commit_before>#!/usr/bin/python3
# -*- coding: utf8 -*
import sys
# Fix for file paths errors
import os
PATH = os.path.dirname(os.path.realpath(__file__))
# Import other files from the project
from game import Game
from idlerpg import IdleRPG
from logger import log, story
# Import Graphic Lib
from PyQt5.QtWidgets ... |
c8177562558d4b59d6d0a8f3fb4518c067394a31 | comrade/core/decorators.py | comrade/core/decorators.py | from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
inst... | from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
inst... | Use authorized + test_func instead of custom decorator. | Use authorized + test_func instead of custom decorator.
| Python | mit | bueda/django-comrade | from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
inst... | from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
inst... | <commit_before>from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
... | from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
inst... | from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
inst... | <commit_before>from django.utils.decorators import available_attrs
from django.utils.http import urlquote
from django.http import HttpResponse
from django.template import loader, RequestContext
from functools import wraps
def singleton(cls):
instances = {}
def getinstance():
if cls not in instances:
... |
30a4281f2602bd6b9d90d89375785a2645854a0d | enthought/enable2/pyglet_backend/pyglet_app.py | enthought/enable2/pyglet_backend/pyglet_app.py | # proxy
from enthought.enable.pyglet_backend.pyglet_app import *
| # proxy
__all__ = ["get_app", "PygletApp"]
from enthought.enable.pyglet_backend.pyglet_app import *
# Import the objects which are not declared in __all__,
# but are still defined in the real module, such that people
# can import them explicitly when needed, just as they could
# with the real module.
#
# It is unli... | Improve the proxy module which maps to a module which uses __all__. | Improve the proxy module which maps to a module which uses __all__.
The notes I made in the code apply to all proxy modules which map
to a module which uses __all__.
| Python | bsd-3-clause | tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable | # proxy
from enthought.enable.pyglet_backend.pyglet_app import *
Improve the proxy module which maps to a module which uses __all__.
The notes I made in the code apply to all proxy modules which map
to a module which uses __all__. | # proxy
__all__ = ["get_app", "PygletApp"]
from enthought.enable.pyglet_backend.pyglet_app import *
# Import the objects which are not declared in __all__,
# but are still defined in the real module, such that people
# can import them explicitly when needed, just as they could
# with the real module.
#
# It is unli... | <commit_before># proxy
from enthought.enable.pyglet_backend.pyglet_app import *
<commit_msg>Improve the proxy module which maps to a module which uses __all__.
The notes I made in the code apply to all proxy modules which map
to a module which uses __all__.<commit_after> | # proxy
__all__ = ["get_app", "PygletApp"]
from enthought.enable.pyglet_backend.pyglet_app import *
# Import the objects which are not declared in __all__,
# but are still defined in the real module, such that people
# can import them explicitly when needed, just as they could
# with the real module.
#
# It is unli... | # proxy
from enthought.enable.pyglet_backend.pyglet_app import *
Improve the proxy module which maps to a module which uses __all__.
The notes I made in the code apply to all proxy modules which map
to a module which uses __all__.# proxy
__all__ = ["get_app", "PygletApp"]
from enthought.enable.pyglet_backend.pyg... | <commit_before># proxy
from enthought.enable.pyglet_backend.pyglet_app import *
<commit_msg>Improve the proxy module which maps to a module which uses __all__.
The notes I made in the code apply to all proxy modules which map
to a module which uses __all__.<commit_after># proxy
__all__ = ["get_app", "PygletApp"]
... |
2d0e742c0f8d5f0a9d72b8c2c6fa751ba7842668 | tests/test_json.py | tests/test_json.py | from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnmatch.filter(file... | from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnmatch.filter(file... | Include sublime-keymap files in JSON format tests. | Include sublime-keymap files in JSON format tests.
| Python | mit | jonlabelle/Trimmer,jonlabelle/Trimmer | from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnmatch.filter(file... | from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnmatch.filter(file... | <commit_before>from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnma... | from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnmatch.filter(file... | from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnmatch.filter(file... | <commit_before>from __future__ import absolute_import
import fnmatch
import os
import unittest
from . import validate_json_format
class TestSettings(unittest.TestCase):
def _get_json_files(self, file_pattern, folder='.'):
for root, dirnames, filenames in os.walk(folder):
for filename in fnma... |
ff0ae66ee16bc3ac07cb88ddacb52ffa41779757 | tests/test_func.py | tests/test_func.py | from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_globals():
asse... | from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_globals():
asse... | Add some more function tests. | Add some more function tests.
| Python | bsd-3-clause | sapir/tinywhat,sapir/tinywhat,sapir/tinywhat | from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_globals():
asse... | from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_globals():
asse... | <commit_before>from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_glob... | from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_globals():
asse... | from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_globals():
asse... | <commit_before>from .utils import assert_eval
def test_simple_func():
assert_eval('(def @a $a 8) (@a)', 1, 8)
def test_simple_func_args():
assert_eval(
'(def @a $a $a)'
'(@a 1)'
'(@a 2)'
'(@a 5)',
1,
1,
2,
5)
def test_func_args_overwrite_glob... |
95efd017f8adf7b2f3e1b7ee82a865982f8be8df | urls.py | urls.py | from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.views.index',
... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.views.index',
... | Use django for static file only in debug mode | Use django for static file only in debug mode
| Python | agpl-3.0 | fgaudin/aemanager,fgaudin/aemanager,fgaudin/aemanager | from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.views.index',
... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.views.index',
... | <commit_before>from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.views.index',
... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.views.index',
... | <commit_before>from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(regex=r'^$',
view='core.... |
c9c618cfcd8caeac9ba23ec1c53d3ebdf32d563d | src/cli/_errors.py | src/cli/_errors.py | """
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptable type.
"""... | """
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptable type.
"""... | Add an exception useful for prototyping. | Add an exception useful for prototyping.
Signed-off-by: mulhern <[email protected]>
| Python | apache-2.0 | stratis-storage/stratis-cli,stratis-storage/stratis-cli | """
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptable type.
"""... | """
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptable type.
"""... | <commit_before>"""
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptabl... | """
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptable type.
"""... | """
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptable type.
"""... | <commit_before>"""
Error heirarchy for stratis cli.
"""
class StratisCliError(Exception):
"""
Top-level stratis cli error.
"""
pass
class StratisCliValueError(StratisCliError):
""" Raised when a parameter has an unacceptable value.
May also be raised when the parameter has an unacceptabl... |
1b15198842d60582930f828656a2353f85a05d44 | apps/events/views.py | apps/events/views.py | #-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_start__gte=dateti... | #-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_start__gte=dateti... | Fix no table named event_id | Fix no table named event_id
| Python | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | #-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_start__gte=dateti... | #-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_start__gte=dateti... | <commit_before>#-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_st... | #-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_start__gte=dateti... | #-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_start__gte=dateti... | <commit_before>#-*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from apps.events.models import Event, AttendanceEvent, Attendee
import datetime
def index(request):
events = Event.objects.filter(event_st... |
048dcc39703cb00ce5616e9ed2b07be8dbde4038 | img_pipe/archival_data/single_channel_clean.py | img_pipe/archival_data/single_channel_clean.py |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... | Remove the largest scale; causes severe artifacts in some channels | Remove the largest scale; causes severe artifacts in some channels
| Python | mit | e-koch/canfar_scripts,e-koch/canfar_scripts |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... | <commit_before>
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... |
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
cell='1.5ar... | <commit_before>
import sys
'''
Cleans an MS with a single channel given a mask and a model
'''
vis = sys.argv[4]
model = sys.argv[5]
mask = sys.argv[6]
out_root = vis[:-3]
clean(vis=vis, imagename=out_root+'.clean', field='M33*',
restfreq='1420.40575177MHz',
mode='channel', width=1, nchan=1, start=1,
... |
83fdd99aead08614a12b4eb48f6075599ca60cbe | examples/mayavi/standalone_mlab.py | examples/mayavi/standalone_mlab.py | #!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import mlab
from numpy... | #!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import mlab
from numpy... | Replace depreciated show_engine to show_pipeline, in examples. | Replace depreciated show_engine to show_pipeline, in examples.
| Python | bsd-3-clause | liulion/mayavi,dmsurti/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,liulion/mayavi,alexandreleroux/mayavi | #!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import mlab
from numpy... | #!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import mlab
from numpy... | <commit_before>#!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import m... | #!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import mlab
from numpy... | #!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import mlab
from numpy... | <commit_before>#!/usr/bin/env python
"""A simple example of how you can use MayaVi and mlab without
using Envisage or the MayaVi envisage application.
"""
# Author: Gael Varoquaux <[email protected]>
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
# Mlab imports
from enthought.mayavi import m... |
8373c005cbf8ebc4069faf5291bb126db2cbb20f | polygraph/types/tests/test_scalars.py | polygraph/types/tests/test_scalars.py | from unittest import TestCase
from polygraph.types.scalar import Int
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
self.assertIsInsta... | from unittest import TestCase
from polygraph.types.scalar import Boolean, Float, Int, String
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
... | Add additional tests around scalars | Add additional tests around scalars
| Python | mit | polygraph-python/polygraph | from unittest import TestCase
from polygraph.types.scalar import Int
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
self.assertIsInsta... | from unittest import TestCase
from polygraph.types.scalar import Boolean, Float, Int, String
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
... | <commit_before>from unittest import TestCase
from polygraph.types.scalar import Int
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
sel... | from unittest import TestCase
from polygraph.types.scalar import Boolean, Float, Int, String
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
... | from unittest import TestCase
from polygraph.types.scalar import Int
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
self.assertIsInsta... | <commit_before>from unittest import TestCase
from polygraph.types.scalar import Int
class IntTest(TestCase):
def test_class_types(self):
x = Int(245)
self.assertIsInstance(x, int)
self.assertIsInstance(x, Int)
self.assertEqual(Int(245) + 55, 300)
y = Int("506")
sel... |
e1ffdcc5f12be623633e2abab2041fcb574173ea | homeassistant/components/zeroconf.py | homeassistant/components/zeroconf.py | """
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (EVENT_HOMEASSIS... | """
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (EVENT_HOMEASSIS... | Use hass.config.api instead of hass.http | Use hass.config.api instead of hass.http
| Python | mit | miniconfig/home-assistant,Julian/home-assistant,toddeye/home-assistant,ct-23/home-assistant,deisi/home-assistant,tchellomello/home-assistant,rohitranjan1991/home-assistant,Julian/home-assistant,Duoxilian/home-assistant,betrisey/home-assistant,keerts/home-assistant,ct-23/home-assistant,tboyce021/home-assistant,kyvinh/ho... | """
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (EVENT_HOMEASSIS... | """
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (EVENT_HOMEASSIS... | <commit_before>"""
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (... | """
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (EVENT_HOMEASSIS... | """
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (EVENT_HOMEASSIS... | <commit_before>"""
This module exposes Home Assistant via Zeroconf.
Zeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).
For more details about Zeroconf, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
from homeassistant.const import (... |
c24fa91c900fc4f0d3ac5a10d10bfe5c57c9ef5c | errors.py | errors.py |
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
"""Raised w... |
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
"""Raised w... | Support class tuples as WATE args | Support class tuples as WATE args
| Python | mit | jasontbradshaw/plinth |
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
"""Raised w... |
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
"""Raised w... | <commit_before>
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
... |
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
"""Raised w... |
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
"""Raised w... | <commit_before>
class ParserError(Exception):
"""Raised when parsing input fails."""
class OpenParenError(ParserError):
"""Raised when there are too few opening parenthesis."""
@staticmethod
def build():
return OpenParenError("too few opening parenthesis")
class CloseParenError(ParserError):
... |
9af440d8d7d2dc7b6ecf254ee1150f03d090cb6a | numpy/linalg/setup.py | numpy/linalg/setup.py |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = get_info('lapack... |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = get_info('lapack... | Disable pythonxerbla.c patch for win32 (the MSVC linker failes on multiple defined symbols) when using optimized lapack. | Disable pythonxerbla.c patch for win32 (the MSVC linker failes on multiple defined symbols) when using optimized lapack.
| Python | bsd-3-clause | jschueller/numpy,CMartelLML/numpy,cowlicks/numpy,larsmans/numpy,rudimeier/numpy,bertrand-l/numpy,ViralLeadership/numpy,sonnyhu/numpy,mattip/numpy,moreati/numpy,ViralLeadership/numpy,pyparallel/numpy,dato-code/numpy,mattip/numpy,nbeaver/numpy,dch312/numpy,ajdawson/numpy,WarrenWeckesser/numpy,leifdenby/numpy,larsmans/num... |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = get_info('lapack... |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = get_info('lapack... | <commit_before>
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = g... |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = get_info('lapack... |
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = get_info('lapack... | <commit_before>
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
config = Configuration('linalg',parent_package,top_path)
config.add_data_dir('tests')
# Configure lapack_lite
lapack_info = g... |
a0b52b5a9b825e1a17d9c92694ac944f09411011 | db/database.py | db/database.py | import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient()
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuring database"
d... | import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient("mongo")
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuring datab... | Update db host to mongo | db: Update db host to mongo
| Python | unlicense | vilie/rp,vilie/rp | import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient()
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuring database"
d... | import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient("mongo")
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuring datab... | <commit_before>import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient()
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuri... | import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient("mongo")
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuring datab... | import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient()
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuring database"
d... | <commit_before>import json
import pymongo
import praw
from pymongo import MongoClient
client = MongoClient()
db = client.reddit
posts = db.data
posts.create_index([("text", pymongo.TEXT),
("subreddit", pymongo.ASCENDING),
("created_utc", pymongo.DESCENDING)]);
print "Configuri... |
3b01b6b67e8cf05c31f2c30a3e45a59ffbb31adb | djangae/fields/computed.py | djangae/fields/computed.py | from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = self.computer(... | from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = self.computer(... | Add from_db_value instead of removed SubfieldBase fields | Add from_db_value instead of removed SubfieldBase fields
| Python | bsd-3-clause | kirberich/djangae,asendecka/djangae,kirberich/djangae,potatolondon/djangae,kirberich/djangae,potatolondon/djangae,grzes/djangae,asendecka/djangae,grzes/djangae,grzes/djangae,asendecka/djangae | from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = self.computer(... | from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = self.computer(... | <commit_before>from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value =... | from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = self.computer(... | from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = self.computer(... | <commit_before>from django.db import models
class ComputedFieldMixin(object):
def __init__(self, func, *args, **kwargs):
self.computer = func
kwargs["editable"] = False
super(ComputedFieldMixin, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value =... |
fc105f413e6683980c5d2fcc93a471ebbc9fecba | utils/files_provider.py | utils/files_provider.py | from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, file_name, kwargs):
template_file = open(templates_folder + template_file_name, 'r')
file_content = template_file.read()
template_file.clos... | from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, kwargs):
template_file = open(template_file_name, 'r')
file_content = template_file.read()
template_file.close()
template = Template(f... | Change method params because they are not necessary. | [dev] Change method params because they are not necessary.
| Python | apache-2.0 | amatkivskiy/baidu,amatkivskiy/baidu | from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, file_name, kwargs):
template_file = open(templates_folder + template_file_name, 'r')
file_content = template_file.read()
template_file.clos... | from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, kwargs):
template_file = open(template_file_name, 'r')
file_content = template_file.read()
template_file.close()
template = Template(f... | <commit_before>from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, file_name, kwargs):
template_file = open(templates_folder + template_file_name, 'r')
file_content = template_file.read()
tem... | from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, kwargs):
template_file = open(template_file_name, 'r')
file_content = template_file.read()
template_file.close()
template = Template(f... | from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, file_name, kwargs):
template_file = open(templates_folder + template_file_name, 'r')
file_content = template_file.read()
template_file.clos... | <commit_before>from string import Template
__author__ = 'maa'
templates_folder = 'file_templates_folder\\'
def create_and_full_fill_file(template_file_name, destination_file_path, file_name, kwargs):
template_file = open(templates_folder + template_file_name, 'r')
file_content = template_file.read()
tem... |
f8d3b5d4c1d3d81dee1c22a4e2563e6b8d116c74 | openquake/__init__.py | openquake/__init__.py | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | Make the openquake namespace compatible with old setuptools | Make the openquake namespace compatible with old setuptools
Former-commit-id: 529c98ec0a7c5a3fefa4da6cdf2f6a58b5487ebc [formerly e5f4dc01e94694bf9bfcae3ecd6eca34a33a24eb]
Former-commit-id: e01df405c03f37a89cdf889c45de410cb1ca9b00 | Python | agpl-3.0 | gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | <commit_before># -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version... | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | <commit_before># -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2010-2016 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version... |
8e67071e82e13ae4131da773947f767f1fe91f40 | Code/Python/Kamaelia/Examples/UDP_Systems/SimplePeer_Example.py | Code/Python/Kamaelia/Examples/UDP_Systems/SimplePeer_Example.py | #!/usr/bin/python
"""
Simple Kamaelia Example that shows how to use a simple UDP Peer.
A UDP Peer actually sends and recieves however, so we could have
more fun example here with the two peers sending each other messages.
It's worth noting that these aren't "connected" peers in any shape
or form, and they're fixed who... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Vers... | Change license to Apache 2 | Change license to Apache 2 | Python | apache-2.0 | sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia | #!/usr/bin/python
"""
Simple Kamaelia Example that shows how to use a simple UDP Peer.
A UDP Peer actually sends and recieves however, so we could have
more fun example here with the two peers sending each other messages.
It's worth noting that these aren't "connected" peers in any shape
or form, and they're fixed who... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Vers... | <commit_before>#!/usr/bin/python
"""
Simple Kamaelia Example that shows how to use a simple UDP Peer.
A UDP Peer actually sends and recieves however, so we could have
more fun example here with the two peers sending each other messages.
It's worth noting that these aren't "connected" peers in any shape
or form, and th... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Vers... | #!/usr/bin/python
"""
Simple Kamaelia Example that shows how to use a simple UDP Peer.
A UDP Peer actually sends and recieves however, so we could have
more fun example here with the two peers sending each other messages.
It's worth noting that these aren't "connected" peers in any shape
or form, and they're fixed who... | <commit_before>#!/usr/bin/python
"""
Simple Kamaelia Example that shows how to use a simple UDP Peer.
A UDP Peer actually sends and recieves however, so we could have
more fun example here with the two peers sending each other messages.
It's worth noting that these aren't "connected" peers in any shape
or form, and th... |
1c65ef8eeccd433b256ed2cd1d3db7b6264fe8f2 | properties/tests/test_mach_angle.py | properties/tests/test_mach_angle.py | #!/usr/bin/env python
"""Test Mach angle functions.
Test data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.
"""
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1
mu_in_deg(... | #!/usr/bin/env python
"""Test Mach angle functions.
"""
from __future__ import absolute_import, division
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1
mu_in_deg(m)
def test_normal_mach():
m1... | Correct test data for mach angle | Correct test data for mach angle
| Python | mit | iwarobots/TunnelDesign | #!/usr/bin/env python
"""Test Mach angle functions.
Test data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.
"""
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1
mu_in_deg(... | #!/usr/bin/env python
"""Test Mach angle functions.
"""
from __future__ import absolute_import, division
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1
mu_in_deg(m)
def test_normal_mach():
m1... | <commit_before>#!/usr/bin/env python
"""Test Mach angle functions.
Test data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.
"""
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1... | #!/usr/bin/env python
"""Test Mach angle functions.
"""
from __future__ import absolute_import, division
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1
mu_in_deg(m)
def test_normal_mach():
m1... | #!/usr/bin/env python
"""Test Mach angle functions.
Test data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.
"""
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1
mu_in_deg(... | <commit_before>#!/usr/bin/env python
"""Test Mach angle functions.
Test data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.
"""
import nose
import nose.tools as nt
from properties.prandtl_meyer_function import mu_in_deg
@nt.raises(ValueError)
def test_mach_lesser_than_one():
m = 0.1... |
d028ada7a1d1c7c66cb6e3e76cd5ed676981bc57 | lcp/urls.py | lcp/urls.py | """lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | """lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | Move the API to the root. | Move the API to the root.
| Python | bsd-2-clause | mblayman/lcp,mblayman/lcp,mblayman/lcp | """lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | """lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | <commit_before>"""lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'... | """lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | """lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based v... | <commit_before>"""lcp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'... |
f5d61059480a2698fc955641819e78cba28173b3 | src/adhocracy_core/adhocracy_core/changelog/test_init.py | src/adhocracy_core/adhocracy_core/changelog/test_init.py | from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy_core.events')
... | from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy_core.events')
... | Improve test coverage for changelog module | Improve test coverage for changelog module
| Python | agpl-3.0 | liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocra... | from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy_core.events')
... | from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy_core.events')
... | <commit_before>from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy... | from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy_core.events')
... | from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy_core.events')
... | <commit_before>from pytest import mark
from pytest import fixture
from pyramid import testing
def test_changelog_create():
from . import Changelog
from . import changelog_meta
inst = Changelog()
assert inst['/path/'] == changelog_meta
@fixture()
def integration(config):
config.include('adhocracy... |
179c13d3fe2589d43e260da86e0465901d149a80 | rsk_mind/datasource/datasource_csv.py | rsk_mind/datasource/datasource_csv.py | import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def read(self):
with open(self.path, 'rb') as infile:
reader = csv.reader(infile)
header = reader.next()
rows = []
for row in reader:
... | import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def __init__(self, path, target=None):
super(CSVDatasource, self).__init__(path)
self.target = target
def read(self):
with open(self.path, 'rb') as infile:
reader = ... | Set targe class on csv document | Set targe class on csv document
| Python | mit | rsk-mind/rsk-mind-framework | import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def read(self):
with open(self.path, 'rb') as infile:
reader = csv.reader(infile)
header = reader.next()
rows = []
for row in reader:
... | import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def __init__(self, path, target=None):
super(CSVDatasource, self).__init__(path)
self.target = target
def read(self):
with open(self.path, 'rb') as infile:
reader = ... | <commit_before>import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def read(self):
with open(self.path, 'rb') as infile:
reader = csv.reader(infile)
header = reader.next()
rows = []
for row in reader:... | import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def __init__(self, path, target=None):
super(CSVDatasource, self).__init__(path)
self.target = target
def read(self):
with open(self.path, 'rb') as infile:
reader = ... | import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def read(self):
with open(self.path, 'rb') as infile:
reader = csv.reader(infile)
header = reader.next()
rows = []
for row in reader:
... | <commit_before>import csv
from datasource import Datasource
from ..dataset import Dataset
class CSVDatasource(Datasource):
def read(self):
with open(self.path, 'rb') as infile:
reader = csv.reader(infile)
header = reader.next()
rows = []
for row in reader:... |
3e0ecb96845f7b2efbb9b62c5eb1372cbe1452c5 | s2motc.py | s2motc.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
print("PolyLine")
# srs = sf.shapeRecords()
mapping = {}
index = 0
for f in sf.fields:
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
import logging
log = logging.getLogger()
log.setLevel(logging.DEBUG)
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
log.debug("PolyLine")
# srs = sf.sh... | Use logging to keep debug message | Use logging to keep debug message
| Python | mit | GIS-FCU/sdi-converter | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
print("PolyLine")
# srs = sf.shapeRecords()
mapping = {}
index = 0
for f in sf.fields:
... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
import logging
log = logging.getLogger()
log.setLevel(logging.DEBUG)
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
log.debug("PolyLine")
# srs = sf.sh... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
print("PolyLine")
# srs = sf.shapeRecords()
mapping = {}
index = 0
for f in s... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
import logging
log = logging.getLogger()
log.setLevel(logging.DEBUG)
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
log.debug("PolyLine")
# srs = sf.sh... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
print("PolyLine")
# srs = sf.shapeRecords()
mapping = {}
index = 0
for f in sf.fields:
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Superbil'
__version__ = '0.1.0'
import shapefile
sf = shapefile.Reader("shapefiles/路網數值圖103年_西屯區道路路段")
# 確認 shapeType 種類
if sf.shapeType is 3:
print("PolyLine")
# srs = sf.shapeRecords()
mapping = {}
index = 0
for f in s... |
42c7b4c7b74a3aeccca73f368a16a2f96295ff3b | radar/radar/models/user_sessions.py | radar/radar/models/user_sessions.py | from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class UserSession(db.M... | from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship, backref
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class UserSes... | Delete user sessions with user | Delete user sessions with user
| Python | agpl-3.0 | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class UserSession(db.M... | from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship, backref
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class UserSes... | <commit_before>from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class U... | from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship, backref
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class UserSes... | from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class UserSession(db.M... | <commit_before>from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.users import User, AnonymousUser
from radar.models.logs import log_changes
@log_changes
class U... |
c2b53224eecd6b5651e75b821ba68a471ed558d6 | runapp.py | runapp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb(sys=None):
db.engine.execute("CREATE DATABASE downstream")
db.create_all()
def eval_args(args):
if a... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb():
db.create_all()
def eval_args(args):
if args.initdb:
initdb()
else:
app.run(debug... | Remove database engine command in initdb | Remove database engine command in initdb
| Python | mit | Storj/downstream-node,Storj/downstream-node | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb(sys=None):
db.engine.execute("CREATE DATABASE downstream")
db.create_all()
def eval_args(args):
if a... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb():
db.create_all()
def eval_args(args):
if args.initdb:
initdb()
else:
app.run(debug... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb(sys=None):
db.engine.execute("CREATE DATABASE downstream")
db.create_all()
def eval_args(... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb():
db.create_all()
def eval_args(args):
if args.initdb:
initdb()
else:
app.run(debug... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb(sys=None):
db.engine.execute("CREATE DATABASE downstream")
db.create_all()
def eval_args(args):
if a... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Runs the development server of the downstream_node app.
# Not for production use.
import argparse
from downstream_node.startup import app, db
def initdb(sys=None):
db.engine.execute("CREATE DATABASE downstream")
db.create_all()
def eval_args(... |
38d9a85bc23bfcf3e44081d3077bbd5ca333fdf3 | src/damis/api/serializers.py | src/damis/api/serializers.py | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class GroupSeria... | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class GroupSeria... | Allow modify experiment status via REST API. | Allow modify experiment status via REST API.
| Python | agpl-3.0 | InScience/DAMIS-old,InScience/DAMIS-old | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class GroupSeria... | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class GroupSeria... | <commit_before>from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
c... | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class GroupSeria... | from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
class GroupSeria... | <commit_before>from django.contrib.auth.models import User, Group
from rest_framework import serializers
from damis.models import Dataset, Algorithm, Experiment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'groups')
c... |
c265b49a5961f48542d22d8a4174ee885568c08c | luigi/tasks/export/fasta/__init__.py | luigi/tasks/export/fasta/__init__.py | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | Simplify the general Fasta export task | Simplify the general Fasta export task
It doesn't need to be so complicated, so we simplify it.
| Python | apache-2.0 | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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
Unl... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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
Unl... |
dcdfe91570e185df19daef49be9a368276e20483 | src/core/migrations/0039_fix_reviewer_url.py | src/core/migrations/0039_fix_reviewer_url.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_editor):
Settin... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_editor):
Settin... | Handle migrating non-string values (i.e.: NULL) | Handle migrating non-string values (i.e.: NULL)
| Python | agpl-3.0 | BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_editor):
Settin... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_editor):
Settin... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_edit... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_editor):
Settin... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_editor):
Settin... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-05-15 15:52
from __future__ import unicode_literals
import re
from django.db import migrations
REGEX = re.compile("({%\ ?journal_url 'do_review' review_assignment.id\ ?%})")
OUTPUT = "{{ review_url }}"
def replace_template(apps, schema_edit... |
43c62ea6d5558b0e6e5104eb05d45d89239e70b8 | q3/FindAllAbbreviations.py | q3/FindAllAbbreviations.py | import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1]]
else:
... | import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1]]
else:
... | Print usage if no word given | Print usage if no word given
| Python | mit | UW-UPL/InterviewPrepJan2016,UW-UPL/InterviewPrepJan2016,UW-UPL/InterviewPrepJan2016,UW-UPL/InterviewPrepJan2016 | import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1]]
else:
... | import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1]]
else:
... | <commit_before>import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1... | import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1]]
else:
... | import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1]]
else:
... | <commit_before>import sys
def prependAbbrev(front, abbr):
if type(front) is type(abbr[0]):
return [front + abbr[0]] + abbr[1:]
else:
return [front] + abbr
def prefixAll(p, lst):
return [prependAbbrev(p, l) for l in lst]
def findAllAbbrev(s):
if len(s) == 1:
return [[s], [1... |
a050d510bce159ba646de322de31b05fede349e7 | catwatch/blueprints/billing/forms.py | catwatch/blueprints/billing/forms.py | from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Length(1, 254)])
... | from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Length(1, 254)])
... | Fix typo in cancel subscription submit button | Fix typo in cancel subscription submit button
| Python | mit | nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask | from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Length(1, 254)])
... | from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Length(1, 254)])
... | <commit_before>from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Leng... | from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Length(1, 254)])
... | from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Length(1, 254)])
... | <commit_before>from flask_wtf import Form
from wtforms import StringField, HiddenField, SubmitField
from wtforms.validators import DataRequired, Length
from flask_babel import lazy_gettext as _
class CreditCardForm(Form):
stripe_key = HiddenField(_('Stripe key'),
[DataRequired(), Leng... |
d85d04da0f6ce283f53678bd81bd0987f59ce766 | curldrop/cli.py | curldrop/cli.py | import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if not specified th... | import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if not specified th... | Make gunicorn log to stdout/stderr | Make gunicorn log to stdout/stderr
| Python | mit | kennell/curldrop,kevvvvv/curldrop | import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if not specified th... | import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if not specified th... | <commit_before>import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if n... | import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if not specified th... | import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if not specified th... | <commit_before>import click
import os
from .app import app
from .server import StandaloneServer
@click.command()
@click.option(
'--port',
default=8000,
help='Port to listen on, default is 8000'
)
@click.option(
'--upload-dir',
default=os.getcwd(),
help='Directory where uploads are stored, if n... |
3e03d66c5351ac5e71f82a56aa01ba06865e1c25 | conda_verify/cli.py | conda_verify/cli.py | import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>",
descr... | import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>",
descr... | Change script run message output | Change script run message output
| Python | bsd-3-clause | mandeep/conda-verify | import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>",
descr... | import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>",
descr... | <commit_before>import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>"... | import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>",
descr... | import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>",
descr... | <commit_before>import os
import sys
from optparse import OptionParser
from conda_verify.errors import RecipeError
from conda_verify.verify import Verify
from conda_verify.utilities import render_metadata, iter_cfgs
def cli():
p = OptionParser(
usage="usage: %prog [options] <path to recipes or packages>"... |
67637039b95f4030a462edb35d614bb678426dd3 | conversion_check.py | conversion_check.py | def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This is because som... | def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This is because som... | Add ANDS RIF-CS conversion check function | Add ANDS RIF-CS conversion check function
| Python | mit | AustralianAntarcticDataCentre/metadata_xml_convert,AustralianAntarcticDataCentre/metadata_xml_convert | def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This is because som... | def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This is because som... | <commit_before>def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This... | def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This is because som... | def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This is because som... | <commit_before>def check_iso_mcp(input_file):
"""
Checks if MCP conversion is allowed for the given file.
MCP files are only created if the DIF has an ISO Topic Category of
"OCEANS".
"""
allowed = False
# Cannot use the following check:
# oceans_tag = '<ISO_Topic_Category>OCEANS</ISO_Topic_Category>'
# This... |
a57d4e3e1fa65b11b55d6f46dd778cdaf1ed8504 | webstack_django_sorting/middleware.py | webstack_django_sorting/middleware.py | def get_field(self):
try:
field = self.REQUEST['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.REQUEST['dir']
except (KeyError, ValueError, TypeError):
retu... | def get_field(self):
try:
field = self.GET['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.GET['dir']
except (KeyError, ValueError, TypeError):
return 'desc... | Fix deprecated use of REQUEST and only read the GET request | Fix deprecated use of REQUEST and only read the GET request
RemovedInDjango19Warning: `request.REQUEST` is deprecated, use
`request.GET` or `request.POST` instead.
| Python | bsd-3-clause | artscoop/webstack-django-sorting,artscoop/webstack-django-sorting | def get_field(self):
try:
field = self.REQUEST['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.REQUEST['dir']
except (KeyError, ValueError, TypeError):
retu... | def get_field(self):
try:
field = self.GET['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.GET['dir']
except (KeyError, ValueError, TypeError):
return 'desc... | <commit_before>def get_field(self):
try:
field = self.REQUEST['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.REQUEST['dir']
except (KeyError, ValueError, TypeError... | def get_field(self):
try:
field = self.GET['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.GET['dir']
except (KeyError, ValueError, TypeError):
return 'desc... | def get_field(self):
try:
field = self.REQUEST['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.REQUEST['dir']
except (KeyError, ValueError, TypeError):
retu... | <commit_before>def get_field(self):
try:
field = self.REQUEST['sort']
except (KeyError, ValueError, TypeError):
field = ''
return (self.direction == 'desc' and '-' or '') + field
def get_direction(self):
try:
return self.REQUEST['dir']
except (KeyError, ValueError, TypeError... |
1b44849f9fac68c6ce0732baded63681cbf58ccb | osmaxx-py/osmaxx/contrib/auth/tests/test_frontend_permissions.py | osmaxx-py/osmaxx/contrib/auth/tests/test_frontend_permissions.py | from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self):
an_admin = U... | from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_user_can_not_access_frontend_by_default(self):
a_user = User.objects.create_u... | Test that users can not access frontend by default | Test that users can not access frontend by default
| Python | mit | geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/drf-utm-zone-info,geometalab/osmaxx-frontend,geometalab/osmaxx,geometalab/drf-utm-zone-info,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx | from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self):
an_admin = U... | from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_user_can_not_access_frontend_by_default(self):
a_user = User.objects.create_u... | <commit_before>from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self):
... | from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_user_can_not_access_frontend_by_default(self):
a_user = User.objects.create_u... | from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self):
an_admin = U... | <commit_before>from django.test import TestCase
from django.contrib.auth.models import User, Group
from osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP
class TestFrontendPermissions(TestCase):
def test_superuser_can_access_frontend_even_if_not_in_osmaxx_group(self):
... |
428ff9d74f52d938b9ee5ac03aec975dd5af191a | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to go... | Fix pep257 - D211: No blank lines allowed before class docstring (found 1) | Fix pep257 - D211: No blank lines allowed before class docstring (found 1)
| Python | mit | sirreal/SublimeLinter-contrib-govet | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to go... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to go... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an... |
43c3a8a94c7783aadb440e529645f7db7c7913ff | successstories/forms.py | successstories/forms.py | from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
class Meta:
model = Story
fields = (
'name',
'company_name',
'company_url',
'category',
'aut... | from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
pull_quote = forms.CharField(widget=forms.Textarea(attrs={'rows': 5}))
class Meta:
model = Story
fields = (
'name',
'compan... | Reduce textarea height in Story form | Reduce textarea height in Story form
| Python | apache-2.0 | proevo/pythondotorg,manhhomienbienthuy/pythondotorg,manhhomienbienthuy/pythondotorg,Mariatta/pythondotorg,python/pythondotorg,python/pythondotorg,Mariatta/pythondotorg,manhhomienbienthuy/pythondotorg,proevo/pythondotorg,Mariatta/pythondotorg,python/pythondotorg,manhhomienbienthuy/pythondotorg,python/pythondotorg,Mariat... | from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
class Meta:
model = Story
fields = (
'name',
'company_name',
'company_url',
'category',
'aut... | from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
pull_quote = forms.CharField(widget=forms.Textarea(attrs={'rows': 5}))
class Meta:
model = Story
fields = (
'name',
'compan... | <commit_before>from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
class Meta:
model = Story
fields = (
'name',
'company_name',
'company_url',
'category',
... | from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
pull_quote = forms.CharField(widget=forms.Textarea(attrs={'rows': 5}))
class Meta:
model = Story
fields = (
'name',
'compan... | from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
class Meta:
model = Story
fields = (
'name',
'company_name',
'company_url',
'category',
'aut... | <commit_before>from django import forms
from .models import Story
from cms.forms import ContentManageableModelForm
class StoryForm(ContentManageableModelForm):
class Meta:
model = Story
fields = (
'name',
'company_name',
'company_url',
'category',
... |
e56e47828d381022cb2742b06f7f47d3fb64a499 | hiicart/gateway/braintree/tasks.py | hiicart/gateway/braintree/tasks.py | import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0):
"""Check the payment status of a Braintree... | import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0, cart_class=HiiCart):
"""Check the payment s... | Make cart class configurable for braintree task | Make cart class configurable for braintree task
| Python | mit | hiidef/hiicart,hiidef/hiicart | import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0):
"""Check the payment status of a Braintree... | import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0, cart_class=HiiCart):
"""Check the payment s... | <commit_before>import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0):
"""Check the payment status... | import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0, cart_class=HiiCart):
"""Check the payment s... | import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0):
"""Check the payment status of a Braintree... | <commit_before>import logging
from celery.decorators import task
from hiicart.models import HiiCart
from hiicart.gateway.braintree.ipn import BraintreeIPN
log = logging.getLogger('hiicart.gateway.braintree.tasks')
@task
def update_payment_status(hiicart_id, transaction_id, tries=0):
"""Check the payment status... |
2bedbab8eb7d2efb9ff8e39a821fd2796dd4ce3f | police_api/service.py | police_api/service.py | import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.police.uk/api/'... | import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.police.uk/api/'... | Fix GET params bug with BaseService.request | Fix GET params bug with BaseService.request
| Python | mit | rkhleics/police-api-client-python | import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.police.uk/api/'... | import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.police.uk/api/'... | <commit_before>import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.... | import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.police.uk/api/'... | import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.police.uk/api/'... | <commit_before>import logging
import requests
logger = logging.getLogger(__name__)
class APIError(Exception):
pass
class BaseService(object):
def __init__(self, api, **config):
self.api = api
self.requester = requests.session()
self.config = {
'base_url': 'http://data.... |
53d3adce196d38278ccbdf5e8223c3c1d4543ffc | app/handlers/__init__.py | app/handlers/__init__.py | __version__ = "2018.12.1"
__versionfull__ = __version__
| __version__ = "2018.12.2"
__versionfull__ = __version__
| Bump app version to 2018.12.2 | Bump app version to 2018.12.2
Signed-off-by: Guillaume Tucker <[email protected]>
| Python | lgpl-2.1 | kernelci/kernelci-backend,kernelci/kernelci-backend | __version__ = "2018.12.1"
__versionfull__ = __version__
Bump app version to 2018.12.2
Signed-off-by: Guillaume Tucker <[email protected]> | __version__ = "2018.12.2"
__versionfull__ = __version__
| <commit_before>__version__ = "2018.12.1"
__versionfull__ = __version__
<commit_msg>Bump app version to 2018.12.2
Signed-off-by: Guillaume Tucker <[email protected]><commit_after> | __version__ = "2018.12.2"
__versionfull__ = __version__
| __version__ = "2018.12.1"
__versionfull__ = __version__
Bump app version to 2018.12.2
Signed-off-by: Guillaume Tucker <[email protected]>__version__ = "2018.12.2"
__versionfull__ = __version__
| <commit_before>__version__ = "2018.12.1"
__versionfull__ = __version__
<commit_msg>Bump app version to 2018.12.2
Signed-off-by: Guillaume Tucker <[email protected]><commit_after>__version__ = "2018.12.2"
__versionfull__ = __version__
|
e960bf04d3885228c0df9c182c8d073e800ec122 | dbaas/dashboard/templatetags/menu.py | dbaas/dashboard/templatetags/menu.py | # -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {
'n... | # -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {
'n... | Fix change on raleted name (Plan x Environment) | Fix change on raleted name (Plan x Environment)
| Python | bsd-3-clause | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | # -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {
'n... | # -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {
'n... | <commit_before># -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {... | # -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {
'n... | # -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {
'n... | <commit_before># -*- coding: utf-8 -*-
from django import template
from physical.models import EngineType, Environment, Plan
register = template.Library()
@register.inclusion_tag('dashboard/menu.html')
def render_menu():
data_engines = []
for engine_type in EngineType.objects.all():
data_engine = {... |
a03f3ae483e7cdacbd50ad0646273b7e0c18b10f | manage.py | manage.py | import functools
import os
from flask.ext.debugtoolbar import DebugToolbarExtension
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', Mi... | import functools
import os
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', MigrateCommand)
_FROM_HERE = functools.partial(os.path.joi... | Fix DebugToolbar requirement in non-debug envs | Fix DebugToolbar requirement in non-debug envs
| Python | mit | getslash/mailboxer,getslash/mailboxer,vmalloc/mailboxer,getslash/mailboxer,Infinidat/lanister,Infinidat/lanister,vmalloc/mailboxer,vmalloc/mailboxer | import functools
import os
from flask.ext.debugtoolbar import DebugToolbarExtension
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', Mi... | import functools
import os
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', MigrateCommand)
_FROM_HERE = functools.partial(os.path.joi... | <commit_before>import functools
import os
from flask.ext.debugtoolbar import DebugToolbarExtension
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_c... | import functools
import os
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', MigrateCommand)
_FROM_HERE = functools.partial(os.path.joi... | import functools
import os
from flask.ext.debugtoolbar import DebugToolbarExtension
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', Mi... | <commit_before>import functools
import os
from flask.ext.debugtoolbar import DebugToolbarExtension
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from flask_app.app import app
from flask_app.models import db
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_c... |
cb9b7dcd01495999fac0671acd9e4bf138bd71ea | scripts/spotify-current.py | scripts/spotify-current.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('org.mpris.Media... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('org.mpris.Media... | Truncate spotify current song if it is too long | Truncate spotify current song if it is too long
| Python | mit | EllisV/dotfiles,EllisV/dotfiles | #!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('org.mpris.Media... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('org.mpris.Media... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('org.mpris.Media... | #!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('org.mpris.Media... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
metadata = spotify_properties.Get('... |
26de8a5b63d6da42bbafaa3d520fe0fbbb3a7d54 | cms/utils/encoder.py | cms/utils/encoder.py | # -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), self._recursive_... | # -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), self._recursive_... | Fix copy page when permission is disabled | Fix copy page when permission is disabled
| Python | bsd-3-clause | frnhr/django-cms,andyzsf/django-cms,jeffreylu9/django-cms,timgraham/django-cms,qnub/django-cms,leture/django-cms,mkoistinen/django-cms,chmberl/django-cms,saintbird/django-cms,datakortet/django-cms,keimlink/django-cms,josjevv/django-cms,youprofit/django-cms,Livefyre/django-cms,takeshineshiro/django-cms,chkir/django-cms,... | # -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), self._recursive_... | # -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), self._recursive_... | <commit_before># -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), s... | # -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), self._recursive_... | # -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), self._recursive_... | <commit_before># -*- coding: utf-8 -*-
from django.utils.html import conditional_escape
from django.core.serializers.json import DjangoJSONEncoder
class SafeJSONEncoder(DjangoJSONEncoder):
def _recursive_escape(self, o, esc=conditional_escape):
if isinstance(o, dict):
return type(o)((esc(k), s... |
ad2ec120cb890de622d54f61104353c9427c788a | src/sentry/rules/__init__.py | src/sentry/rules/__init__.py | """
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentry.constants imp... | """
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentry.constants imp... | Correct rules registry addition via plugin (refs GH-2404) | Correct rules registry addition via plugin (refs GH-2404)
| Python | bsd-3-clause | JamesMura/sentry,looker/sentry,jean/sentry,fotinakis/sentry,ifduyue/sentry,alexm92/sentry,fotinakis/sentry,mvaled/sentry,gencer/sentry,gencer/sentry,zenefits/sentry,ifduyue/sentry,BuildingLink/sentry,gencer/sentry,beeftornado/sentry,ifduyue/sentry,jean/sentry,BuildingLink/sentry,fotinakis/sentry,daevaorn/sentry,JamesMu... | """
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentry.constants imp... | """
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentry.constants imp... | <commit_before>"""
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentr... | """
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentry.constants imp... | """
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentry.constants imp... | <commit_before>"""
sentry.rules
~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from .base import * # NOQA
from .registry import RuleRegistry # NOQA
def init_registry():
from sentr... |
f74f46e4a3222fe0f6e10e38c204d2e3108bbf18 | git_reviewers/reviewers.py | git_reviewers/reviewers.py | #!/usr/bin/env python3
try:
import configparser
except ImportError:
raise ImportError("Must be using Python 3")
import argparse
import os
import subprocess
UBER=True
def extract_username(shortlog):
shortlog = shortlog.strip()
email = shortlog[shortlog.rfind("<")+1:]
email = email[:email.find("... | Add basic script to get most common committers | Add basic script to get most common committers
| Python | mit | albertyw/git-reviewers,albertyw/git-reviewers | Add basic script to get most common committers | #!/usr/bin/env python3
try:
import configparser
except ImportError:
raise ImportError("Must be using Python 3")
import argparse
import os
import subprocess
UBER=True
def extract_username(shortlog):
shortlog = shortlog.strip()
email = shortlog[shortlog.rfind("<")+1:]
email = email[:email.find("... | <commit_before><commit_msg>Add basic script to get most common committers<commit_after> | #!/usr/bin/env python3
try:
import configparser
except ImportError:
raise ImportError("Must be using Python 3")
import argparse
import os
import subprocess
UBER=True
def extract_username(shortlog):
shortlog = shortlog.strip()
email = shortlog[shortlog.rfind("<")+1:]
email = email[:email.find("... | Add basic script to get most common committers#!/usr/bin/env python3
try:
import configparser
except ImportError:
raise ImportError("Must be using Python 3")
import argparse
import os
import subprocess
UBER=True
def extract_username(shortlog):
shortlog = shortlog.strip()
email = shortlog[shortlog.... | <commit_before><commit_msg>Add basic script to get most common committers<commit_after>#!/usr/bin/env python3
try:
import configparser
except ImportError:
raise ImportError("Must be using Python 3")
import argparse
import os
import subprocess
UBER=True
def extract_username(shortlog):
shortlog = shortl... | |
ce25be4609f6206343cdcb34b5342843f09f557b | server.py | server.py | from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
auth = request.authorization
query = request.args.get('query')
if not auth is None and not query is N... | from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
return 'hello world'
@app.route('/sparql')
def do_sparql():
auth = request.authorization
query = requ... | Add test route for heroku | Add test route for heroku
| Python | apache-2.0 | jvdzwaan/visun-flask | from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
auth = request.authorization
query = request.args.get('query')
if not auth is None and not query is N... | from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
return 'hello world'
@app.route('/sparql')
def do_sparql():
auth = request.authorization
query = requ... | <commit_before>from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
auth = request.authorization
query = request.args.get('query')
if not auth is None and... | from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
return 'hello world'
@app.route('/sparql')
def do_sparql():
auth = request.authorization
query = requ... | from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
auth = request.authorization
query = request.args.get('query')
if not auth is None and not query is N... | <commit_before>from flask import Flask
from SPARQLWrapper import SPARQLWrapper, JSON
from flask import request, jsonify
from flask.ext.cors import CORS
app = Flask(__name__)
CORS(app)
@app.route('/')
def hello_world():
auth = request.authorization
query = request.args.get('query')
if not auth is None and... |
99be36b77741a9b2e3d330eb89e0e381b3a3081f | api.py | api.py | import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
for key, va... | import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
for key, va... | Add utility method to delete all documents of given resource | Add utility method to delete all documents of given resource
| Python | apache-2.0 | gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa | import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
for key, va... | import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
for key, va... | <commit_before>import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
... | import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
for key, va... | import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
for key, va... | <commit_before>import json
from os import environ
from eve import Eve
from eve.io.mongo import Validator
from settings import API_NAME, URL_PREFIX
class KeySchemaValidator(Validator):
def _validate_keyschema(self, schema, field, dct):
"Validate all keys of dictionary `dct` against schema `schema`."
... |
6be8e85b17d390abea25897bd7a2703fb3300261 | app.py | app.py | import logging
import os
import tornado.ioloop
import tornado.log
import tornado.web
def configure_tornado_logging():
fh = logging.handlers.RotatingFileHandler(
'/var/log/ipborg/tornado.log', maxBytes=2**29, backupCount=10)
fmt = logging.Formatter('%(asctime)s:%(levelname)s:%(name)s:%(message)s')
... | import logging
import os
import tornado.ioloop
import tornado.log
import tornado.options
import tornado.web
tornado.options.define('tornado_log_file',
default='/var/log/ipborg/torando.log',
type=str)
tornado.options.define('app_log_file',
default='... | Add Tornado settings and log location command line options. | Add Tornado settings and log location command line options.
| Python | mit | jiffyclub/ipythonblocks.org,jiffyclub/ipythonblocks.org | import logging
import os
import tornado.ioloop
import tornado.log
import tornado.web
def configure_tornado_logging():
fh = logging.handlers.RotatingFileHandler(
'/var/log/ipborg/tornado.log', maxBytes=2**29, backupCount=10)
fmt = logging.Formatter('%(asctime)s:%(levelname)s:%(name)s:%(message)s')
... | import logging
import os
import tornado.ioloop
import tornado.log
import tornado.options
import tornado.web
tornado.options.define('tornado_log_file',
default='/var/log/ipborg/torando.log',
type=str)
tornado.options.define('app_log_file',
default='... | <commit_before>import logging
import os
import tornado.ioloop
import tornado.log
import tornado.web
def configure_tornado_logging():
fh = logging.handlers.RotatingFileHandler(
'/var/log/ipborg/tornado.log', maxBytes=2**29, backupCount=10)
fmt = logging.Formatter('%(asctime)s:%(levelname)s:%(name)s:%... | import logging
import os
import tornado.ioloop
import tornado.log
import tornado.options
import tornado.web
tornado.options.define('tornado_log_file',
default='/var/log/ipborg/torando.log',
type=str)
tornado.options.define('app_log_file',
default='... | import logging
import os
import tornado.ioloop
import tornado.log
import tornado.web
def configure_tornado_logging():
fh = logging.handlers.RotatingFileHandler(
'/var/log/ipborg/tornado.log', maxBytes=2**29, backupCount=10)
fmt = logging.Formatter('%(asctime)s:%(levelname)s:%(name)s:%(message)s')
... | <commit_before>import logging
import os
import tornado.ioloop
import tornado.log
import tornado.web
def configure_tornado_logging():
fh = logging.handlers.RotatingFileHandler(
'/var/log/ipborg/tornado.log', maxBytes=2**29, backupCount=10)
fmt = logging.Formatter('%(asctime)s:%(levelname)s:%(name)s:%... |
fea4ef7bc124da42c00989d8e4d69ff463854f02 | bot.py | bot.py | #! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
if hasattr(i... | #! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
if hasattr(i... | Add helper on not-well-formed commands | Add helper on not-well-formed commands
| Python | mit | Zauberstuhl/foaasBot | #! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
if hasattr(i... | #! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
if hasattr(i... | <commit_before>#! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
... | #! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
if hasattr(i... | #! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
if hasattr(i... | <commit_before>#! /usr/bin/env python
from time import gmtime, strftime
from foaas import foaas
from diaspy_client import Client
import re
import urllib2
client = Client()
notify = client.notifications()
for n in notify:
if not n.unread: continue
idm = re.search('href=\\"/posts/(\d+?)\\"', n._data['note_html'])
... |
b8aaaeb454f933b642bcd3a5a5931ca0286addd2 | api.py | api.py | import simplejson as json
import os
import sys
import urllib2
from pprint import pprint
from collections import defaultdict
from flask import Flask, render_template, request, jsonify, redirect
import time
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/comment/ipsum/twit... | from flask import Flask, render_template, request, jsonify, redirect
import reddit
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/comment/ipsum/twitter/<source>")
def ipsum_from_twitter():
pass
@api.route("/api/comment/reddit", methods=["POST"])
def ipsum_from_redd... | Add reddit endpoint to API | Add reddit endpoint to API
| Python | mit | captainsafia/dont-read-the-ipsum,captainsafia/dont-read-the-ipsum,captainsafia/dont-read-the-ipsum | import simplejson as json
import os
import sys
import urllib2
from pprint import pprint
from collections import defaultdict
from flask import Flask, render_template, request, jsonify, redirect
import time
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/comment/ipsum/twit... | from flask import Flask, render_template, request, jsonify, redirect
import reddit
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/comment/ipsum/twitter/<source>")
def ipsum_from_twitter():
pass
@api.route("/api/comment/reddit", methods=["POST"])
def ipsum_from_redd... | <commit_before>import simplejson as json
import os
import sys
import urllib2
from pprint import pprint
from collections import defaultdict
from flask import Flask, render_template, request, jsonify, redirect
import time
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/com... | from flask import Flask, render_template, request, jsonify, redirect
import reddit
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/comment/ipsum/twitter/<source>")
def ipsum_from_twitter():
pass
@api.route("/api/comment/reddit", methods=["POST"])
def ipsum_from_redd... | import simplejson as json
import os
import sys
import urllib2
from pprint import pprint
from collections import defaultdict
from flask import Flask, render_template, request, jsonify, redirect
import time
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/comment/ipsum/twit... | <commit_before>import simplejson as json
import os
import sys
import urllib2
from pprint import pprint
from collections import defaultdict
from flask import Flask, render_template, request, jsonify, redirect
import time
api = Flask(__name__)
@api.route("/api")
def index():
return "API stats"
@api.route("/api/com... |
4c2c0e9da70459063c6f1f682a181e4d350e853c | do_the_tests.py | do_the_tests.py | # pop the current directory from search path
# python interpreter adds this to a top level script
# but we will likely have a name conflict (runtests.py .vs runtests package)
import sys; sys.path.pop(0)
from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")
tester.main(s... | from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")
tester.main(sys.argv[1:])
| Remove now not needed path munging | Remove now not needed path munging
| Python | mit | sbird/fake_spectra,sbird/fake_spectra,sbird/fake_spectra | # pop the current directory from search path
# python interpreter adds this to a top level script
# but we will likely have a name conflict (runtests.py .vs runtests package)
import sys; sys.path.pop(0)
from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")
tester.main(s... | from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")
tester.main(sys.argv[1:])
| <commit_before># pop the current directory from search path
# python interpreter adds this to a top level script
# but we will likely have a name conflict (runtests.py .vs runtests package)
import sys; sys.path.pop(0)
from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")... | from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")
tester.main(sys.argv[1:])
| # pop the current directory from search path
# python interpreter adds this to a top level script
# but we will likely have a name conflict (runtests.py .vs runtests package)
import sys; sys.path.pop(0)
from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")
tester.main(s... | <commit_before># pop the current directory from search path
# python interpreter adds this to a top level script
# but we will likely have a name conflict (runtests.py .vs runtests package)
import sys; sys.path.pop(0)
from runtests import Tester
import os.path
tester = Tester(os.path.abspath(__file__), "fake_spectra")... |
eb8862c6048dea7612bdb808156b42792669d61a | apps/bplan/models.py | apps/bplan/models.py | from django.contrib.auth.models import AnonymousUser
from django.db import models
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(ExternalProject):
office_worker_email = models.EmailField()
... | from django.contrib.auth.models import AnonymousUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(External... | Add bplan model field verbose names | Add bplan model field verbose names
| Python | agpl-3.0 | liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin | from django.contrib.auth.models import AnonymousUser
from django.db import models
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(ExternalProject):
office_worker_email = models.EmailField()
... | from django.contrib.auth.models import AnonymousUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(External... | <commit_before>from django.contrib.auth.models import AnonymousUser
from django.db import models
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(ExternalProject):
office_worker_email = model... | from django.contrib.auth.models import AnonymousUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(External... | from django.contrib.auth.models import AnonymousUser
from django.db import models
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(ExternalProject):
office_worker_email = models.EmailField()
... | <commit_before>from django.contrib.auth.models import AnonymousUser
from django.db import models
from adhocracy4.models.base import TimeStampedModel
from adhocracy4.modules import models as module_models
from apps.extprojects.models import ExternalProject
class Bplan(ExternalProject):
office_worker_email = model... |
563eb0c209a0cc75742d8acbae5dd6053e60636c | apps/welcome/urls.py | apps/welcome/urls.py | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
url(r'^2$', 'network.view... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
#url(r'^2$', 'network.vie... | Remove networks from welcome activation, replace with challenges | Remove networks from welcome activation, replace with challenges
| Python | bsd-3-clause | mfitzp/smrtr,mfitzp/smrtr | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
url(r'^2$', 'network.view... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
#url(r'^2$', 'network.vie... | <commit_before>from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
url(r'^2$'... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
#url(r'^2$', 'network.vie... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
url(r'^2$', 'network.view... | <commit_before>from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
# Smrtr
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^1$', 'welcome.views.profile', name='welcome-1' ),
url(r'^2$'... |
0c5165bdddbce057cc4777d91cb1e4fc661b5925 | zuora/transport.py | zuora/transport.py | """
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKeepAlive, self)._... | """
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKeepAlive, self)._... | Set timeout to 20 seconds | Set timeout to 20 seconds
| Python | bsd-3-clause | liberation/zuora-client | """
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKeepAlive, self)._... | """
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKeepAlive, self)._... | <commit_before>"""
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKee... | """
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKeepAlive, self)._... | """
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKeepAlive, self)._... | <commit_before>"""
Transport for Zuora SOAP API
"""
import httplib2
from suds.transport import Reply
from suds.transport.http import HttpTransport
from suds.transport.http import HttpAuthenticated
class HttpTransportWithKeepAlive(HttpAuthenticated, object):
def __init__(self):
super(HttpTransportWithKee... |
11f7c1ecadbbc68aa0a7d87570d25b24efb71fe6 | tests/run/ass2global.py | tests/run/ass2global.py | """
>>> getg()
5
>>> setg(42)
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent call last):
AttributeError: type object 'Test' has no attrib... | # mode: run
# tag: pyglobal
"""
>>> getg()
5
>>> getg()
5
>>> getg()
5
>>> setg(42)
>>> getg()
42
>>> getg()
42
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent c... | Extend test to see if global name caching actually works. | Extend test to see if global name caching actually works.
| Python | apache-2.0 | cython/cython,cython/cython,da-woods/cython,da-woods/cython,da-woods/cython,cython/cython,cython/cython,scoder/cython,scoder/cython,da-woods/cython,scoder/cython,scoder/cython | """
>>> getg()
5
>>> setg(42)
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent call last):
AttributeError: type object 'Test' has no attrib... | # mode: run
# tag: pyglobal
"""
>>> getg()
5
>>> getg()
5
>>> getg()
5
>>> setg(42)
>>> getg()
42
>>> getg()
42
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent c... | <commit_before>"""
>>> getg()
5
>>> setg(42)
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent call last):
AttributeError: type object 'Test... | # mode: run
# tag: pyglobal
"""
>>> getg()
5
>>> getg()
5
>>> getg()
5
>>> setg(42)
>>> getg()
42
>>> getg()
42
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent c... | """
>>> getg()
5
>>> setg(42)
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent call last):
AttributeError: type object 'Test' has no attrib... | <commit_before>"""
>>> getg()
5
>>> setg(42)
>>> getg()
42
"""
g = 5
def setg(a):
global g
g = a
def getg():
return g
class Test(object):
"""
>>> global_in_class
9
>>> Test.global_in_class
Traceback (most recent call last):
AttributeError: type object 'Test... |
fbc4154aeabd644390b9abca1a2382c0cc4298e0 | app.py | app.py | from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = get_filenames(item)
metadata = get_metadata(item)
return render_template("landing.html", file_id=item, files=f... | from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = sorted(get_filenames(item))
print files
metadata = get_metadata(item)
return render_template("landing.html", ... | Sort file names so they are displayed in alpha order | Sort file names so they are displayed in alpha order
| Python | mit | MITLibraries/ebooks,MITLibraries/ebooks | from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = get_filenames(item)
metadata = get_metadata(item)
return render_template("landing.html", file_id=item, files=f... | from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = sorted(get_filenames(item))
print files
metadata = get_metadata(item)
return render_template("landing.html", ... | <commit_before>from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = get_filenames(item)
metadata = get_metadata(item)
return render_template("landing.html", file_i... | from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = sorted(get_filenames(item))
print files
metadata = get_metadata(item)
return render_template("landing.html", ... | from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = get_filenames(item)
metadata = get_metadata(item)
return render_template("landing.html", file_id=item, files=f... | <commit_before>from flask import Flask
from flask import render_template
from queries import get_filenames, get_metadata
app = Flask(__name__)
@app.route("/")
@app.route("/<item>")
def index(item="002341336"):
files = get_filenames(item)
metadata = get_metadata(item)
return render_template("landing.html", file_i... |
c9ba5f2e402b46036f0b9a86bf34ac94db51edfb | server.py | server.py | from flask import Flask
from flask import render_template
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
return json.dumps(game_list)
if __name__ == "__main__"... | from flask import Flask
from flask import render_template
from flask import request
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
limit = request.args.get('limi... | Use query parameters to limit results | Use query parameters to limit results
| Python | bsd-3-clause | siggame/ng-games,siggame/ng-games,siggame/ng-games | from flask import Flask
from flask import render_template
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
return json.dumps(game_list)
if __name__ == "__main__"... | from flask import Flask
from flask import render_template
from flask import request
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
limit = request.args.get('limi... | <commit_before>from flask import Flask
from flask import render_template
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
return json.dumps(game_list)
if __name_... | from flask import Flask
from flask import render_template
from flask import request
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
limit = request.args.get('limi... | from flask import Flask
from flask import render_template
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
return json.dumps(game_list)
if __name__ == "__main__"... | <commit_before>from flask import Flask
from flask import render_template
import argparse
import games
import json
GAMES_COUNT = 100
app = Flask(__name__)
@app.route("/")
def index():
return render_template('games_list.html')
@app.route("/api/")
def games_api():
return json.dumps(game_list)
if __name_... |
98550946e8bc0da9a1ecdec8f0e53490f8fd5e91 | conftest.py | conftest.py | import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# non-ASCII filen... | import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# non-ASCII filen... | Make pytest autodiscover tests depending on the INSTALLED_APPS | Make pytest autodiscover tests depending on the INSTALLED_APPS
| Python | apache-2.0 | j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy | import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# non-ASCII filen... | import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# non-ASCII filen... | <commit_before>import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# ... | import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# non-ASCII filen... | import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# non-ASCII filen... | <commit_before>import shutil
import pytest
try:
import six
except ImportError:
from django.utils import six
from django.conf import settings
def teardown_assets_directory():
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# ... |
e6c91c06005c131805edeaf6b4980ff7f73b87b6 | conftest.py | conftest.py | '''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 5)
if not is_pylint_compatible:
args.remove('--pylint')
| '''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 6)
if not is_pylint_compatible:
args.remove('--pylint')
| Raise supported Python version for currently pinned pylint | Raise supported Python version for currently pinned pylint
| Python | bsd-3-clause | jvanasco/tldextract,john-kurkowski/tldextract | '''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 5)
if not is_pylint_compatible:
args.remove('--pylint')
Raise support... | '''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 6)
if not is_pylint_compatible:
args.remove('--pylint')
| <commit_before>'''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 5)
if not is_pylint_compatible:
args.remove('--pylint'... | '''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 6)
if not is_pylint_compatible:
args.remove('--pylint')
| '''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 5)
if not is_pylint_compatible:
args.remove('--pylint')
Raise support... | <commit_before>'''py.test standard config file.'''
import sys
# pylint: disable=invalid-name
collect_ignore = ('setup.py',)
# pylint: enable=invalid-name
def pytest_cmdline_preparse(args):
is_pylint_compatible = (2, 7) <= sys.version_info < (3, 5)
if not is_pylint_compatible:
args.remove('--pylint'... |
7de22e999bb63cd83f8af6065638a97eeb3ba2d6 | bongo/settings/travis.py | bongo/settings/travis.py | from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432',
},
}
IN... | from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432',
},
}
IN... | Throw this Raven DSN from the docs at Travis to make it shut up | Throw this Raven DSN from the docs at Travis to make it shut up
| Python | mit | BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo | from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432',
},
}
IN... | from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432',
},
}
IN... | <commit_before>from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432... | from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432',
},
}
IN... | from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432',
},
}
IN... | <commit_before>from prod import *
# The same settings as production, but no database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'bongo_test',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '127.0.0.1',
'PORT': '5432... |
9b4f83ec89c76d8a5b5d0502e2903e2821078271 | logger.py | logger.py | #! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
outfile.w... | #! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
print(lin... | Print lines that are logged | Print lines that are logged
| Python | mit | wapcaplet/ardiff | #! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
outfile.w... | #! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
print(lin... | <commit_before>#! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
... | #! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
print(lin... | #! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
outfile.w... | <commit_before>#! /usr/bin/env python
# logger.py
"""Log the serial output from the Arduino to a text file.
"""
import sys
import serial
def log_serial(filename, device='/dev/ttyACM0', baud=9600):
ser = serial.Serial(device, baud)
outfile = open(filename, 'w')
while True:
line = ser.readline()
... |
723efad0416dbc16a3a7f94a62236673e60dc5a3 | goodtablesio/utils/frontend.py | goodtablesio/utils/frontend.py | from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component props
Return... | from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component props
Return... | Handle users with no name | Handle users with no name
| Python | agpl-3.0 | frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io | from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component props
Return... | from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component props
Return... | <commit_before>from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component pr... | from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component props
Return... | from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component props
Return... | <commit_before>from flask import render_template
from flask_login import current_user
from goodtablesio import settings
# Module API
def render_component(component, props=None):
"""Render frontend component within html layout.
Args:
component (str): component name
props (dict): component pr... |
5238fed5b5557b8a282a9120380eee01abb49bc5 | fuzzers/038-cfg/add_constant_bits.py | fuzzers/038-cfg/add_constant_bits.py | import sys
constant_bits = {
"CFG_CENTER_MID.ALWAYS_ON_PROP1": "26_2206",
"CFG_CENTER_MID.ALWAYS_ON_PROP2": "26_2207",
"CFG_CENTER_MID.ALWAYS_ON_PROP3": "27_2205"
}
with open(sys.argv[1], "a") as f:
for bit_name, bit_value in constant_bits.items():
f.write(bit_name + " " + bit_value + "\n")
| """
Add bits that are considered always on to the db file.
This script is Zynq specific.
There are three bits that are present in all Zynq bitstreams.
The investigation that was done to reach this conclusion is captured on GH
(https://github.com/SymbiFlow/prjxray/issues/746)
In brief, these bits seem to be bitstream ... | Add background to script's purpose | Add background to script's purpose
Signed-off-by: Tomasz Michalak <[email protected]>
| Python | isc | SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray | import sys
constant_bits = {
"CFG_CENTER_MID.ALWAYS_ON_PROP1": "26_2206",
"CFG_CENTER_MID.ALWAYS_ON_PROP2": "26_2207",
"CFG_CENTER_MID.ALWAYS_ON_PROP3": "27_2205"
}
with open(sys.argv[1], "a") as f:
for bit_name, bit_value in constant_bits.items():
f.write(bit_name + " " + bit_value + "\n")
Ad... | """
Add bits that are considered always on to the db file.
This script is Zynq specific.
There are three bits that are present in all Zynq bitstreams.
The investigation that was done to reach this conclusion is captured on GH
(https://github.com/SymbiFlow/prjxray/issues/746)
In brief, these bits seem to be bitstream ... | <commit_before>import sys
constant_bits = {
"CFG_CENTER_MID.ALWAYS_ON_PROP1": "26_2206",
"CFG_CENTER_MID.ALWAYS_ON_PROP2": "26_2207",
"CFG_CENTER_MID.ALWAYS_ON_PROP3": "27_2205"
}
with open(sys.argv[1], "a") as f:
for bit_name, bit_value in constant_bits.items():
f.write(bit_name + " " + bit_v... | """
Add bits that are considered always on to the db file.
This script is Zynq specific.
There are three bits that are present in all Zynq bitstreams.
The investigation that was done to reach this conclusion is captured on GH
(https://github.com/SymbiFlow/prjxray/issues/746)
In brief, these bits seem to be bitstream ... | import sys
constant_bits = {
"CFG_CENTER_MID.ALWAYS_ON_PROP1": "26_2206",
"CFG_CENTER_MID.ALWAYS_ON_PROP2": "26_2207",
"CFG_CENTER_MID.ALWAYS_ON_PROP3": "27_2205"
}
with open(sys.argv[1], "a") as f:
for bit_name, bit_value in constant_bits.items():
f.write(bit_name + " " + bit_value + "\n")
Ad... | <commit_before>import sys
constant_bits = {
"CFG_CENTER_MID.ALWAYS_ON_PROP1": "26_2206",
"CFG_CENTER_MID.ALWAYS_ON_PROP2": "26_2207",
"CFG_CENTER_MID.ALWAYS_ON_PROP3": "27_2205"
}
with open(sys.argv[1], "a") as f:
for bit_name, bit_value in constant_bits.items():
f.write(bit_name + " " + bit_v... |
9e67babf85a46128b96dd6818fa860447b4052e7 | tests/integration/ssh/test_mine.py | tests/integration/ssh/test_mine.py | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows')
class SSHMineTest(SS... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import os
import shutil
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Window... | Add teardown to remove ssh dir | Add teardown to remove ssh dir
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows')
class SSHMineTest(SS... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import os
import shutil
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Window... | <commit_before># -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows')
class... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import os
import shutil
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Window... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows')
class SSHMineTest(SS... | <commit_before># -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows')
class... |
13e4d867e724f408b5d2dd21888b2f8a28d8fbc6 | fabfile.py | fabfile.py | # -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def test_basic():
"""Test with an empty context"""
docstring = 'A test'
content = oi.sphinxify(docstring, oi.generate_context())
page_nam... | # -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def _show_page(content, fname):
with open(fname, 'w') as f:
f.write(content)
webbrowser.open_new_tab(fname)
def test_basic():
"""Tes... | Add a test for math | Add a test for math
| Python | bsd-3-clause | techtonik/docrepr,spyder-ide/docrepr,techtonik/docrepr,techtonik/docrepr,spyder-ide/docrepr,spyder-ide/docrepr | # -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def test_basic():
"""Test with an empty context"""
docstring = 'A test'
content = oi.sphinxify(docstring, oi.generate_context())
page_nam... | # -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def _show_page(content, fname):
with open(fname, 'w') as f:
f.write(content)
webbrowser.open_new_tab(fname)
def test_basic():
"""Tes... | <commit_before># -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def test_basic():
"""Test with an empty context"""
docstring = 'A test'
content = oi.sphinxify(docstring, oi.generate_context(... | # -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def _show_page(content, fname):
with open(fname, 'w') as f:
f.write(content)
webbrowser.open_new_tab(fname)
def test_basic():
"""Tes... | # -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def test_basic():
"""Test with an empty context"""
docstring = 'A test'
content = oi.sphinxify(docstring, oi.generate_context())
page_nam... | <commit_before># -*- coding: utf-8 -*
"""
Simple fabric file to test oinspect output
"""
from __future__ import print_function
import webbrowser
import oinspect.sphinxify as oi
def test_basic():
"""Test with an empty context"""
docstring = 'A test'
content = oi.sphinxify(docstring, oi.generate_context(... |
c7ee6f0094535aa0ea37becfc4e9403a3d511304 | tests/src/core/views/test_index.py | tests/src/core/views/test_index.py | #/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 v... | #/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 v... | Add tests for core.views.index.py. The tests presently test only if the corresponding urls can be accessed. | Add tests for core.views.index.py. The tests presently test only if the corresponding urls can be accessed.
| Python | apache-2.0 | cidadania/e-cidadania,cidadania/e-cidadania | #/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 v... | #/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 v... | <commit_before>#/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 Found... | #/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 v... | #/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 v... | <commit_before>#/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania 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 Found... |
f9eeb75292f9a3f134f4b33849ee2d6a51bc4e4e | jasylibrary.py | jasylibrary.py | #import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(os.path.abspath... | #import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(os.path.abspath... | Add part loading command on profile instead of session | Add part loading command on profile instead of session
| Python | mit | fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur | #import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(os.path.abspath... | #import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(os.path.abspath... | <commit_before>#import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(... | #import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(os.path.abspath... | #import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(os.path.abspath... | <commit_before>#import os, json
#from jasy.core.Util import executeCommand
#import jasy.core.Console as Console
#import urllib.parse
# Little helper to allow python modules in current jasylibrarys path
import sys, os.path, inspect
filename = inspect.getframeinfo(inspect.currentframe()).filename
path = os.path.dirname(... |
a04a5a80057e86af2c5df0e87a7d2c3c221123ae | rpc_server/CouchDBViewDefinitions.py | rpc_server/CouchDBViewDefinitions.py | definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
}
... | definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
}
... | Add view to get project jobs. | Add view to get project jobs.
| Python | apache-2.0 | anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46 | definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
}
... | definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
}
... | <commit_before>definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
... | definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
}
... | definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
}
... | <commit_before>definitions = (
{ "doc": "basicStats", "view": "addCar",
"map": """
function(doc) {
// car creations
for (var id in doc.cars){
if (doc.cars[id].state && doc.cars[id].state === 'add') {
emit(id, {'time': doc.time});
... |
b7ce3042c67c17a203590dd78014590626abbc48 | fragdev/urls.py | fragdev/urls.py | from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog')),
# Handl... | from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
#url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog')),
# Hand... | Remove Debugging Paths, Comment Out Unfinished Portions | Remove Debugging Paths, Comment Out Unfinished Portions
| Python | agpl-3.0 | lo-windigo/fragdev,lo-windigo/fragdev | from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog')),
# Handl... | from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
#url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog')),
# Hand... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog... | from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
#url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog')),
# Hand... | from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog')),
# Handl... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Blog URLs
url(r'^blog/(?P<path>.*)', include('wiblog.urls', namespace='wiblog... |
e2a7e7c80ef4d9c82b0a57908398f43f24234c63 | setup.py | setup.py | import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read(),
packages... | import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read(),
packages... | Set python classifiers to py34 | Set python classifiers to py34
| Python | mit | kragniz/inidiff | import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read(),
packages... | import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read(),
packages... | <commit_before>import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read()... | import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read(),
packages... | import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read(),
packages... | <commit_before>import setuptools
setuptools.setup(
name="inidiff",
version="0.1.0",
url="https://github.com/kragniz/inidiff",
author="Louis Taylor",
author_email="[email protected]",
description="Find the differences between two ini config files",
long_description=open('README.rst').read()... |
bbba98884aff75e2b0d6af81150a3596a7c76038 | setup.py | setup.py | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pinax Team"
AUTHO... | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pinax Team"
AUTHO... | Use more recent packages as minimum requirements | Use more recent packages as minimum requirements
| Python | mit | swilcox/pinax-blog,cdvv7788/pinax-blog,miurahr/pinax-blog,salamer/pinax-blog,pinax/pinax-blog,swilcox/pinax-blog,miurahr/pinax-blog,easton402/pinax-blog,easton402/pinax-blog,pinax/pinax-blog,pinax/pinax-blog | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pinax Team"
AUTHO... | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pinax Team"
AUTHO... | <commit_before>import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pi... | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pinax Team"
AUTHO... | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pinax Team"
AUTHO... | <commit_before>import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
NAME = "pinax-blog"
DESCRIPTION = "a Django blog app"
AUTHOR = "Pi... |
11e89d42949ff49890cc380f72061aac0e6b02e0 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='2.0.0.dev0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual environments.',
... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='1.1.0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual environments.',
long... | Revert major version, bump minor version 1.1.0 | Revert major version, bump minor version 1.1.0 | Python | mit | jgosmann/pylint-venv | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='2.0.0.dev0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual environments.',
... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='1.1.0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual environments.',
long... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='2.0.0.dev0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual envi... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='1.1.0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual environments.',
long... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='2.0.0.dev0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual environments.',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as f:
long_description = f.read()
setup(
name='pylint-venv',
version='2.0.0.dev0',
description='pylint-venv provides a Pylint init-hook to use the same '
'Pylint installation with different virtual envi... |
7f226d265c65cca2d74988695502d2edff3aa6a3 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email='pmaupin@gmail... | #!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email='pmaupin@gmail... | Set development status to stable. | Set development status to stable. | Python | bsd-3-clause | berkerpeksag/astor,zackmdavis/astor | #!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email='pmaupin@gmail... | #!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email='pmaupin@gmail... | <commit_before>#!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email... | #!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email='pmaupin@gmail... | #!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email='pmaupin@gmail... | <commit_before>#!/usr/bin/env python
from setuptools import setup
from setuputils import find_version, read
setup(
name='astor',
version=find_version('astor/__init__.py'),
description='Read/rewrite/write Python ASTs',
long_description=read('README.rst'),
author='Patrick Maupin',
author_email... |
539c8cbb91465fe1aabc25452bce7067c7474da5 | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.1',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.2',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | Update the PyPI version to 8.0.2. | Update the PyPI version to 8.0.2.
| Python | mit | Doist/todoist-python | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.1',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.2',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | <commit_before># -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.1',
packages=['todoist', 'todoist.managers'],
auth... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.2',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.1',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | <commit_before># -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='8.0.1',
packages=['todoist', 'todoist.managers'],
auth... |
1cb261bce94e7eb5bccccd282f938074e758f5bc | setup.py | setup.py | #!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
setuptools.setup(
name="txkube",
version=_metadata["version_string"],
description="A Twisted-based Kubernete... | #!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
with open("README.rst") as f:
_metadata["description"] = f.read()
setuptools.setup(
name="txkube",
version=_... | Add the README as the long description. | Add the README as the long description.
| Python | mit | LeastAuthority/txkube | #!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
setuptools.setup(
name="txkube",
version=_metadata["version_string"],
description="A Twisted-based Kubernete... | #!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
with open("README.rst") as f:
_metadata["description"] = f.read()
setuptools.setup(
name="txkube",
version=_... | <commit_before>#!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
setuptools.setup(
name="txkube",
version=_metadata["version_string"],
description="A Twisted-... | #!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
with open("README.rst") as f:
_metadata["description"] = f.read()
setuptools.setup(
name="txkube",
version=_... | #!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
setuptools.setup(
name="txkube",
version=_metadata["version_string"],
description="A Twisted-based Kubernete... | <commit_before>#!/usr/bin/env python
# Copyright Least Authority Enterprises.
# See LICENSE for details.
import setuptools
_metadata = {}
with open("src/txkube/_metadata.py") as f:
exec(f.read(), _metadata)
setuptools.setup(
name="txkube",
version=_metadata["version_string"],
description="A Twisted-... |
b1a92e41e31e18d2a273c476414e702daf1c1847 | setup.py | setup.py | """Defines the setup for the declxml library"""
from setuptools import setup
setup(
name='declxml',
description='Declarative XML processing library',
version='0.11.0',
url='http://declxml.readthedocs.io/',
author='Greg Atkin',
author_email='[email protected]',
license='MIT',
py... | """Defines the setup for the declxml library"""
from io import open
import os.path
from setuptools import setup
readme_path = os.path.join(os.path.dirname(__file__), 'README.md')
with open(readme_path, encoding='utf-8') as readme:
long_description = readme.read()
setup(
name='declxml',
description='Decl... | Bump version for PyPi release | Bump version for PyPi release
| Python | mit | gatkin/declxml | """Defines the setup for the declxml library"""
from setuptools import setup
setup(
name='declxml',
description='Declarative XML processing library',
version='0.11.0',
url='http://declxml.readthedocs.io/',
author='Greg Atkin',
author_email='[email protected]',
license='MIT',
py... | """Defines the setup for the declxml library"""
from io import open
import os.path
from setuptools import setup
readme_path = os.path.join(os.path.dirname(__file__), 'README.md')
with open(readme_path, encoding='utf-8') as readme:
long_description = readme.read()
setup(
name='declxml',
description='Decl... | <commit_before>"""Defines the setup for the declxml library"""
from setuptools import setup
setup(
name='declxml',
description='Declarative XML processing library',
version='0.11.0',
url='http://declxml.readthedocs.io/',
author='Greg Atkin',
author_email='[email protected]',
licens... | """Defines the setup for the declxml library"""
from io import open
import os.path
from setuptools import setup
readme_path = os.path.join(os.path.dirname(__file__), 'README.md')
with open(readme_path, encoding='utf-8') as readme:
long_description = readme.read()
setup(
name='declxml',
description='Decl... | """Defines the setup for the declxml library"""
from setuptools import setup
setup(
name='declxml',
description='Declarative XML processing library',
version='0.11.0',
url='http://declxml.readthedocs.io/',
author='Greg Atkin',
author_email='[email protected]',
license='MIT',
py... | <commit_before>"""Defines the setup for the declxml library"""
from setuptools import setup
setup(
name='declxml',
description='Declarative XML processing library',
version='0.11.0',
url='http://declxml.readthedocs.io/',
author='Greg Atkin',
author_email='[email protected]',
licens... |
c89157c748bedb65d74f4109a7398cafc7e58f9d | neuroimaging/algorithms/tests/test_onesample.py | neuroimaging/algorithms/tests/test_onesample.py | from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.slow
@dec.data
def test_onesample1(self):
im1 = load_image('FIAC/fi... | from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.skipknownfailure
@dec.slow
@dec.data
def test_onesample1(self):
... | Update data file references. Skip known test failure to undefined image iterator. | Update data file references. Skip known test failure to undefined image iterator. | Python | bsd-3-clause | alexis-roche/nireg,arokem/nipy,arokem/nipy,alexis-roche/nipy,bthirion/nipy,nipy/nipy-labs,alexis-roche/nipy,bthirion/nipy,alexis-roche/register,alexis-roche/register,alexis-roche/nireg,bthirion/nipy,nipy/nireg,alexis-roche/register,nipy/nipy-labs,alexis-roche/nipy,alexis-roche/niseg,arokem/nipy,arokem/nipy,alexis-roche... | from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.slow
@dec.data
def test_onesample1(self):
im1 = load_image('FIAC/fi... | from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.skipknownfailure
@dec.slow
@dec.data
def test_onesample1(self):
... | <commit_before>from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.slow
@dec.data
def test_onesample1(self):
im1 = load... | from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.skipknownfailure
@dec.slow
@dec.data
def test_onesample1(self):
... | from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.slow
@dec.data
def test_onesample1(self):
im1 = load_image('FIAC/fi... | <commit_before>from neuroimaging.testing import *
from neuroimaging.algorithms.onesample import ImageOneSample
from neuroimaging.core.api import load_image
from neuroimaging.utils.tests.data import repository
class test_OneSample(TestCase):
@dec.slow
@dec.data
def test_onesample1(self):
im1 = load... |
3d04bb1774e286df4cda3695b938251e0a6266ae | grip/patcher.py | grip/patcher.py | import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<li>\[x\] (.*?)(<... | import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<li>\[x\] (.*?)(<... | Patch the GitHub API response to work around the header bug | Patch the GitHub API response to work around the header bug
| Python | mit | joeyespo/grip,joeyespo/grip | import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<li>\[x\] (.*?)(<... | import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<li>\[x\] (.*?)(<... | <commit_before>import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<l... | import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<li>\[x\] (.*?)(<... | import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<li>\[x\] (.*?)(<... | <commit_before>import re
INCOMPLETE_TASK_RE = re.compile(r'<li>\[ \] (.*?)(<ul.*?>|</li>)', re.DOTALL)
INCOMPLETE_TASK_SUB = (r'<li class="task-list-item">'
r'<input type="checkbox" '
r'class="task-list-item-checkbox" disabled=""> \1\2')
COMPLETE_TASK_RE = re.compile(r'<l... |
d5094e3b9ea2ff62483093e3415dee1044fd9974 | setup.py | setup.py | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name... | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name... | Add Python 3.8 to supported versions | Add Python 3.8 to supported versions
| Python | mit | Kankroc/pdf2image,Belval/pdf2image | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name... | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name... | <commit_before># Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
... | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name... | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name... | <commit_before># Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.