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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fdf559007b9596e8d075d3de7f6e9f27e8a24ed6 | rippl/legislature/api.py | rippl/legislature/api.py | from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both "lat" and "lng... | from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both "lat" and "lng... | Add district id to find_district response | Add district id to find_district response
| Python | mit | gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl | from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both "lat" and "lng... | from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both "lat" and "lng... | <commit_before>from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both... | from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both "lat" and "lng... | from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both "lat" and "lng... | <commit_before>from django.http import JsonResponse, HttpResponseBadRequest
from legislature.sunlight.district import DistrictMatcher
def find_district(request):
try:
latitude = request.GET['lat']
longitude = request.GET['lng']
except KeyError:
return HttpResponseBadRequest('Need both... |
c8068a60d4e0a2e4f3f272f5db19ced24fdd9b2a | glumpy/graphics/collection/__init__.py | glumpy/graphics/collection/__init__.py | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from . base_collect... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from . base_collect... | Fix wrong import in collection | Fix wrong import in collection
| Python | bsd-3-clause | glumpy/glumpy,glumpy/glumpy,duyuan11/glumpy,duyuan11/glumpy | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from . base_collect... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from . base_collect... | <commit_before># -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from . base_collect... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from . base_collect... | <commit_before># -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier. All rights reserved.
# Distributed under the terms of the new BSD License.
# -----------------------------------------------------------------------------
from... |
1849a7ce4e706c8f81a6f3f5b01e0f16c3beb35d | sahgutils/io/__init__.py | sahgutils/io/__init__.py | """Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be prepared to upda... | """Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be prepared to update your... | Change to Unix line endings | REF: Change to Unix line endings
| Python | bsd-3-clause | sahg/SAHGutils | """Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be prepared to upda... | """Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be prepared to update your... | <commit_before>"""Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be p... | """Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be prepared to update your... | """Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be prepared to upda... | <commit_before>"""Provides convenience utilities for assorted data files.
This package provides a means of organizing the code developed
at UKZN for handling the dataflow and processing of information
for the WRC funded research project K5-1683 "Soil Moisture from
Space".
The interface isn't stable yet so be p... |
eaff795bddb0e07f4ad4e4c9277c5c0f6f199380 | salt/beacons/__init__.py | salt/beacons/__init__.py | # -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
self.beaco... | # -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
self.beaco... | Add id tot he beacon event dataset | Add id tot he beacon event dataset
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
self.beaco... | # -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
self.beaco... | <commit_before># -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
... | # -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
self.beaco... | # -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
self.beaco... | <commit_before># -*- coding: utf-8 -*-
'''
This package contains the loader modules for the salt streams system
'''
# Import salt libs
import salt.loader
class Beacon(object):
'''
This class is used to eveluate and execute on the beacon system
'''
def __init__(self, opts):
self.opts = opts
... |
309439f65bb668aba85a31a46b2633a46ee55777 | apps/careeropportunity/migrations/0001_initial.py | apps/careeropportunity/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_squashed_0003_company_image'),
]
operations = [
migrations.CreateModel(
name='CareerOppor... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='CareerOpportunity',
... | Revert "Change careeropportunity migration dep" | Revert "Change careeropportunity migration dep"
This reverts commit 60fdfab7e3b557e46276c225ff159f5773930525.
| Python | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_squashed_0003_company_image'),
]
operations = [
migrations.CreateModel(
name='CareerOppor... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='CareerOpportunity',
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_squashed_0003_company_image'),
]
operations = [
migrations.CreateModel(
na... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='CareerOpportunity',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_squashed_0003_company_image'),
]
operations = [
migrations.CreateModel(
name='CareerOppor... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('companyprofile', '0001_squashed_0003_company_image'),
]
operations = [
migrations.CreateModel(
na... |
437623aee55fd68683126bd6852df52379837eaa | bash_command.py | bash_command.py | import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_view()
i... | import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_view()
i... | Print both output + error for bash command | Print both output + error for bash command
| Python | mit | ktuan89/sublimeplugins | import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_view()
i... | import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_view()
i... | <commit_before>import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_v... | import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_view()
i... | import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_view()
i... | <commit_before>import sublime, sublime_plugin
import os
from .common.utils import run_bash_for_output
from .common.utils import git_path_for_window
last_command = ""
class RunBash(sublime_plugin.WindowCommand):
def run(self):
global last_command
window = self.window
view = window.active_v... |
f070883acc64699c1673f1c1e3f81029f6dea4c2 | Python/Product/PythonTools/ptvsd/setup.py | Python/Product/PythonTools/ptvsd/setup.py | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | Update ptvsd package metadata for 2.1 beta. | Update ptvsd package metadata for 2.1 beta.
| Python | apache-2.0 | crwilcox/PTVS,bolabola/PTVS,modulexcite/PTVS,modulexcite/PTVS,juanyaw/PTVS,xNUTs/PTVS,denfromufa/PTVS,DEVSENSE/PTVS,modulexcite/PTVS,bolabola/PTVS,int19h/PTVS,fjxhkj/PTVS,msunardi/PTVS,DEVSENSE/PTVS,mlorbetske/PTVS,MetSystem/PTVS,huguesv/PTVS,christer155/PTVS,xNUTs/PTVS,gomiero/PTVS,christer155/PTVS,fivejjs/PTVS,MetSys... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | <commit_before>#!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | <commit_before>#!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain... |
6a0c619d743d57a1ff1684144c148c9b8cc9a0be | day-10/solution.py | day-10/solution.py | def lookandsay(line):
p = None
n = 0
result = []
for c in line:
if n > 0 and p is not c:
result.append(str(n))
result.append(p)
n = 0
p = c
n += 1
result.append(str(n))
result.append(p)
return ''.join(result)
line = "1321131112... | import itertools
def lookandsay(line):
return ''.join([str(len(list(it))) + c for c, it in itertools.groupby(line)])
line = "1321131112"
for x in range(40):
line = lookandsay(line)
print "40:", len(line)
for x in range(10):
line = lookandsay(line)
print "50:", len(line)
| Reimplement day 10 using itertools combine. | Reimplement day 10 using itertools combine.
Now it DOES run using pypy, and is faster again.
| Python | mit | bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adv... | def lookandsay(line):
p = None
n = 0
result = []
for c in line:
if n > 0 and p is not c:
result.append(str(n))
result.append(p)
n = 0
p = c
n += 1
result.append(str(n))
result.append(p)
return ''.join(result)
line = "1321131112... | import itertools
def lookandsay(line):
return ''.join([str(len(list(it))) + c for c, it in itertools.groupby(line)])
line = "1321131112"
for x in range(40):
line = lookandsay(line)
print "40:", len(line)
for x in range(10):
line = lookandsay(line)
print "50:", len(line)
| <commit_before>def lookandsay(line):
p = None
n = 0
result = []
for c in line:
if n > 0 and p is not c:
result.append(str(n))
result.append(p)
n = 0
p = c
n += 1
result.append(str(n))
result.append(p)
return ''.join(result)
lin... | import itertools
def lookandsay(line):
return ''.join([str(len(list(it))) + c for c, it in itertools.groupby(line)])
line = "1321131112"
for x in range(40):
line = lookandsay(line)
print "40:", len(line)
for x in range(10):
line = lookandsay(line)
print "50:", len(line)
| def lookandsay(line):
p = None
n = 0
result = []
for c in line:
if n > 0 and p is not c:
result.append(str(n))
result.append(p)
n = 0
p = c
n += 1
result.append(str(n))
result.append(p)
return ''.join(result)
line = "1321131112... | <commit_before>def lookandsay(line):
p = None
n = 0
result = []
for c in line:
if n > 0 and p is not c:
result.append(str(n))
result.append(p)
n = 0
p = c
n += 1
result.append(str(n))
result.append(p)
return ''.join(result)
lin... |
25a3de5e929e0c14d2cfce30013a199c33276cd5 | 001-xoxoxo-obj/harness.py | 001-xoxoxo-obj/harness.py | from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
self._outpu... | from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
self._outpu... | Fix nierozpoznawania bledu pierwszego ruchu v.2 | Fix nierozpoznawania bledu pierwszego ruchu v.2
| Python | mit | gynvael/stream,gynvael/stream,gynvael/stream,gynvael/stream,gynvael/stream,gynvael/stream | from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
self._outpu... | from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
self._outpu... | <commit_before>from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
... | from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
self._outpu... | from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
self._outpu... | <commit_before>from game import Game
from input_con import InputCon
from output_con import OutputCon
class Harness():
def __init__(self, output, inputs):
self._game = Game()
self._output = output
self._inputs = inputs
def Start(self):
self._output.show_welcome()
while True:
... |
53681ae30bdaccce2321601f1ebab09b4c572cc9 | sqlalchemy_mptt/__init__.py | sqlalchemy_mptt/__init__.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from .mixins import BaseNestedSets
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
| #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from sqlalchemy.orm import mapper
from .mixins import BaseNestedSets
from .events import TreesManager
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
__a... | Make a default tree manager importable from the package. | Make a default tree manager importable from the package.
| Python | mit | uralbash/sqlalchemy_mptt,ITCase/sqlalchemy_mptt,ITCase/sqlalchemy_mptt,uralbash/sqlalchemy_mptt | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from .mixins import BaseNestedSets
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
Make a default tree manager importable from the package. | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from sqlalchemy.orm import mapper
from .mixins import BaseNestedSets
from .events import TreesManager
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
__a... | <commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from .mixins import BaseNestedSets
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
<commit_msg>Make a default tree manager importable from ... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from sqlalchemy.orm import mapper
from .mixins import BaseNestedSets
from .events import TreesManager
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
__a... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from .mixins import BaseNestedSets
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
Make a default tree manager importable from the package.#! /usr/bin/env... | <commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
from .mixins import BaseNestedSets
__version__ = "0.0.8"
__mixins__ = [BaseNestedSets]
<commit_msg>Make a default tree manager importable from ... |
f032501126e7bb6d86441e38112c6bdf5035c62e | icekit/search_indexes.py | icekit/search_indexes.py | from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
class FluentPageIndex(indexes.SearchIndex, indexes.Indexable):
"""
Search index for a fluent page.
"""
text = indexes.CharField(document=True, use_te... | from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
from django.conf import settings
# Optional search indexes which can be used with the default FluentPage and FlatPage models.
if getattr(settings, 'ICEKIT_USE_SEARCH... | Add setting to turn of search indexes. | Add setting to turn of search indexes.
| Python | mit | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit | from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
class FluentPageIndex(indexes.SearchIndex, indexes.Indexable):
"""
Search index for a fluent page.
"""
text = indexes.CharField(document=True, use_te... | from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
from django.conf import settings
# Optional search indexes which can be used with the default FluentPage and FlatPage models.
if getattr(settings, 'ICEKIT_USE_SEARCH... | <commit_before>from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
class FluentPageIndex(indexes.SearchIndex, indexes.Indexable):
"""
Search index for a fluent page.
"""
text = indexes.CharField(docume... | from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
from django.conf import settings
# Optional search indexes which can be used with the default FluentPage and FlatPage models.
if getattr(settings, 'ICEKIT_USE_SEARCH... | from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
class FluentPageIndex(indexes.SearchIndex, indexes.Indexable):
"""
Search index for a fluent page.
"""
text = indexes.CharField(document=True, use_te... | <commit_before>from fluent_pages.pagetypes.flatpage.models import FlatPage
from fluent_pages.pagetypes.fluentpage.models import FluentPage
from haystack import indexes
class FluentPageIndex(indexes.SearchIndex, indexes.Indexable):
"""
Search index for a fluent page.
"""
text = indexes.CharField(docume... |
44843e5c719b18a9f45a60799d889a4a51dac91d | site/cgi-bin/csv-columns.py | site/cgi-bin/csv-columns.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.com/a/11764727
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.com/a/11764727
... | Add cache header for columns | Add cache header for columns
| Python | agpl-3.0 | alejosanchez/CSVBenford,alejosanchez/CSVBenford | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.com/a/11764727
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.com/a/11764727
... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.com/a/11764727
... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.com/a/11764727
... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Give back the columns of a CSV and the in
# http://www.tutorialspoint.com/python/python_cgi_programming.htm
import cgi
import csv
import sys
import codecs
import cgitb
CSV_DIR = '../csv/' # CSV upload directory
# UTF-8 hack
# from http://stackoverflow.... |
cca4c42e07ad7fc0c3e96284a6bfbf67d59860cb | sites/cozylan/config_dev.py | sites/cozylan/config_dev.py | # Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/byceps'
REDIS_URL =... | # Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/byceps'
REDIS_URL =... | Remove default email sender from CozyLAN config | Remove default email sender from CozyLAN config
Brand-specific emails should always use the sender from the
brand-specific email configuration.
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | # Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/byceps'
REDIS_URL =... | # Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/byceps'
REDIS_URL =... | <commit_before># Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/bycep... | # Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/byceps'
REDIS_URL =... | # Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/byceps'
REDIS_URL =... | <commit_before># Examplary development configuration for the "CozyLAN" demo site
DEBUG = True
SECRET_KEY = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
SESSION_COOKIE_SECURE = False
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://byceps:boioioing@127.0.0.1/bycep... |
08dc0ce7c44d0149b443261ff6d3708e28a928e7 | src/meshparser/__init__.py | src/meshparser/__init__.py | from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version
| from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version.decode('utf-8')
| Add decode to version read from pkg_resources. | Add decode to version read from pkg_resources.
| Python | apache-2.0 | ABI-Software/MeshParser | from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version
Add decode to version read from pkg_resources. | from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version.decode('utf-8')
| <commit_before>from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version
<commit_msg>Add decode to version read from pkg_resources.<commit_after> | from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version.decode('utf-8')
| from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version
Add decode to version read from pkg_resources.from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version.decode('utf-8')
| <commit_before>from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__version__ = version
<commit_msg>Add decode to version read from pkg_resources.<commit_after>from pkg_resources import resource_string
version = resource_string(__name__, 'version.txt').strip()
__ver... |
c67ea7029a8c8b9748c401dc4852f98f8bfc96a1 | opencontrail_netns/vrouter_control.py | opencontrail_netns/vrouter_control.py | import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import nova_contrail_vif.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from nova_contrail_vif.gen_py.instance_service import ttypes
data = ttypes.Port(
uuid... | import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import contrail_vrouter_api.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from contrail_vrouter_api.gen_py.instance_service import ttypes
data = ttypes.Port(
... | Use contrail_vrouter_api instead of nova_contrail_vif. | Use contrail_vrouter_api instead of nova_contrail_vif.
| Python | apache-2.0 | tonyliu0592/opencontrail-netns,DreamLab/opencontrail-netns,pedro-r-marques/opencontrail-netns | import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import nova_contrail_vif.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from nova_contrail_vif.gen_py.instance_service import ttypes
data = ttypes.Port(
uuid... | import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import contrail_vrouter_api.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from contrail_vrouter_api.gen_py.instance_service import ttypes
data = ttypes.Port(
... | <commit_before>import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import nova_contrail_vif.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from nova_contrail_vif.gen_py.instance_service import ttypes
data = ttypes.Por... | import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import contrail_vrouter_api.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from contrail_vrouter_api.gen_py.instance_service import ttypes
data = ttypes.Port(
... | import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import nova_contrail_vif.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from nova_contrail_vif.gen_py.instance_service import ttypes
data = ttypes.Port(
uuid... | <commit_before>import sys
import getopt
import logging
import socket
from contrail_lib import rpc_client_instance, uuid_from_string
import nova_contrail_vif.gen_py.instance_service
def add_interface(interface_name, vmi, vm, mac):
from nova_contrail_vif.gen_py.instance_service import ttypes
data = ttypes.Por... |
670bbf8758e63cfeafc1de6f9330403dec2517c2 | astrobin_apps_platesolving/utils.py | astrobin_apps_platesolving/utils.py | # Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
def encoded(path):
return urllib2.quote(path.encode('utf-8'))
url = image.thumbnail(alias)
if "://" in url... | # Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
url = image.thumbnail(alias)
if "://" in url:
url = url.split('://')[1]
else:
url = settings.BASE_UR... | Revert "Fix plate-solving on local development mode" | Revert "Fix plate-solving on local development mode"
This reverts commit 40897be402bd05ed5fb53e116f03d2d954720245.
| Python | agpl-3.0 | astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin | # Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
def encoded(path):
return urllib2.quote(path.encode('utf-8'))
url = image.thumbnail(alias)
if "://" in url... | # Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
url = image.thumbnail(alias)
if "://" in url:
url = url.split('://')[1]
else:
url = settings.BASE_UR... | <commit_before># Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
def encoded(path):
return urllib2.quote(path.encode('utf-8'))
url = image.thumbnail(alias)
... | # Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
url = image.thumbnail(alias)
if "://" in url:
url = url.split('://')[1]
else:
url = settings.BASE_UR... | # Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
def encoded(path):
return urllib2.quote(path.encode('utf-8'))
url = image.thumbnail(alias)
if "://" in url... | <commit_before># Python
import urllib2
# Django
from django.conf import settings
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
def getFromStorage(image, alias):
def encoded(path):
return urllib2.quote(path.encode('utf-8'))
url = image.thumbnail(alias)
... |
aaa6b6683e4ce46ec672899802c035c592d50b0e | app/initial_tables.py | app/initial_tables.py | from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload(
document_name TEXT
, time_uploaded TEXT DEFAULT now()
, filename TEXT NOT NULL
, word_... | from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload_meta(
document_name TEXT NOT NULL
, document_slug TEXT NOT NULL
, time_uploaded TEXT NOT NU... | Add slug field to file upload meta table, rename table | Add slug field to file upload meta table, rename table
| Python | mit | sprin/heroku-tut | from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload(
document_name TEXT
, time_uploaded TEXT DEFAULT now()
, filename TEXT NOT NULL
, word_... | from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload_meta(
document_name TEXT NOT NULL
, document_slug TEXT NOT NULL
, time_uploaded TEXT NOT NU... | <commit_before>from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload(
document_name TEXT
, time_uploaded TEXT DEFAULT now()
, filename TEXT NOT N... | from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload_meta(
document_name TEXT NOT NULL
, document_slug TEXT NOT NULL
, time_uploaded TEXT NOT NU... | from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload(
document_name TEXT
, time_uploaded TEXT DEFAULT now()
, filename TEXT NOT NULL
, word_... | <commit_before>from tables import engine
def create_tables():
"""
Create tables the lazy way... with raw SQL.
"""
conn = engine.raw_connection()
cur = conn.cursor()
cur.execute(
"""
CREATE TABLE file_upload(
document_name TEXT
, time_uploaded TEXT DEFAULT now()
, filename TEXT NOT N... |
5559e9f429e9019959f1c79fbc2a7f82c12f91c4 | src/hpp/utils.py | src/hpp/utils.py | # Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*args).wait()
class Se... | # Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
import hpp.corbaserver
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*... | Fix how hppcorbaserver is killed in ServerManager | Fix how hppcorbaserver is killed in ServerManager
| Python | bsd-2-clause | humanoid-path-planner/hpp-corbaserver,humanoid-path-planner/hpp-corbaserver | # Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*args).wait()
class Se... | # Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
import hpp.corbaserver
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*... | <commit_before># Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*args).wa... | # Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
import hpp.corbaserver
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*... | # Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*args).wait()
class Se... | <commit_before># Copyright (c) 2020, CNRS
# Authors: Guilhem Saurel <guilhem.saurel@laas.fr>
import os
import subprocess
import time
try:
from subprocess import DEVNULL, run
except ImportError: # Python2 fallback
DEVNULL = os.open(os.devnull, os.O_RDWR)
def run(*args):
subprocess.Popen(*args).wa... |
503cc29b03694d2b8daaf3427f2129312cfaf328 | beer/models.py | beer/models.py | from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
description = m... | from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
description = m... | Change the __unicode__ to __str__ | Change the __unicode__ to __str__
| Python | mit | OckiFals/crud-django,OckiFals/crud-django | from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
description = m... | from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
description = m... | <commit_before>from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
... | from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
description = m... | from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
description = m... | <commit_before>from django.db import models
BEER_CHOICES = (
(1, 'Domestic'),
(2, 'Import'),
)
class Beer(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
brewery = models.ForeignKey('Brewery')
locality = models.IntegerField(choices=BEER_CHOICES)
... |
c0a74ce4110d295b3662066e4d08c4ab65fb0905 | bills/views.py | bills/views.py |
from django.shortcuts import render, redirect
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill_subjects'):
filter_subjects = request.POST.getlist('bill_subjects')
... |
from django.db import transaction
from django.shortcuts import render, redirect
from preferences.views import _mark_selected
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill... | Mark pre-selected topics on form | Mark pre-selected topics on form
| Python | mit | jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot |
from django.shortcuts import render, redirect
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill_subjects'):
filter_subjects = request.POST.getlist('bill_subjects')
... |
from django.db import transaction
from django.shortcuts import render, redirect
from preferences.views import _mark_selected
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill... | <commit_before>
from django.shortcuts import render, redirect
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill_subjects'):
filter_subjects = request.POST.getlist('bil... |
from django.db import transaction
from django.shortcuts import render, redirect
from preferences.views import _mark_selected
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill... |
from django.shortcuts import render, redirect
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill_subjects'):
filter_subjects = request.POST.getlist('bill_subjects')
... | <commit_before>
from django.shortcuts import render, redirect
from bills.utils import get_all_subjects, get_all_locations
from opencivicdata.models import Bill
def bill_list(request):
subjects = get_all_subjects()
if request.POST.getlist('bill_subjects'):
filter_subjects = request.POST.getlist('bil... |
d78f1edd09b0d8c097d7fe79eb322bdc310e5604 | bsuite/baselines/jax/boot_dqn/run_test.py | bsuite/baselines/jax/boot_dqn/run_test.py | # python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | # python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | Tweak unit tests parameters for boot_dqn. | Tweak unit tests parameters for boot_dqn.
We can speed this up further by setting num_ensemble = 2 (anything >1 gives full coverage).
Setting num_episodes = 5 for consistency with other baseline unit tests.
PiperOrigin-RevId: 307000268
Change-Id: Id8c757c884860561e92c6d325264c75c51d0e0c4
| Python | apache-2.0 | deepmind/bsuite,deepmind/bsuite | # python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | # python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | <commit_before># python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:/... | # python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | # python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | <commit_before># python3
# pylint: disable=g-bad-file-header
# Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:/... |
c5496fddccffd2f16c0b4a140506b9d577d50b61 | eventlog/models.py | eventlog/models.py | from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
... | from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
... | Add property to provide template fragment name | Add property to provide template fragment name
| Python | mit | jawed123/pinax-eventlog,pinax/pinax-eventlog,KleeTaurus/pinax-eventlog,rosscdh/pinax-eventlog | from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
... | from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
... | <commit_before>from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=mo... | from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
... | from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
... | <commit_before>from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=mo... |
5a45840e81d612e1f743ad063fd32da4d19354d4 | cacheops/signals.py | cacheops/signals.py | import django.dispatch
cache_read = django.dispatch.Signal(providing_args=["func", "hit"])
cache_invalidated = django.dispatch.Signal(providing_args=["obj_dict"])
| import django.dispatch
cache_read = django.dispatch.Signal() # args: func, hit
cache_invalidated = django.dispatch.Signal() # args: obj_dict
| Stop using Signal(providing_args) deprected in Django 4.0 | Stop using Signal(providing_args) deprected in Django 4.0
Closes #393
| Python | bsd-3-clause | Suor/django-cacheops | import django.dispatch
cache_read = django.dispatch.Signal(providing_args=["func", "hit"])
cache_invalidated = django.dispatch.Signal(providing_args=["obj_dict"])
Stop using Signal(providing_args) deprected in Django 4.0
Closes #393 | import django.dispatch
cache_read = django.dispatch.Signal() # args: func, hit
cache_invalidated = django.dispatch.Signal() # args: obj_dict
| <commit_before>import django.dispatch
cache_read = django.dispatch.Signal(providing_args=["func", "hit"])
cache_invalidated = django.dispatch.Signal(providing_args=["obj_dict"])
<commit_msg>Stop using Signal(providing_args) deprected in Django 4.0
Closes #393<commit_after> | import django.dispatch
cache_read = django.dispatch.Signal() # args: func, hit
cache_invalidated = django.dispatch.Signal() # args: obj_dict
| import django.dispatch
cache_read = django.dispatch.Signal(providing_args=["func", "hit"])
cache_invalidated = django.dispatch.Signal(providing_args=["obj_dict"])
Stop using Signal(providing_args) deprected in Django 4.0
Closes #393import django.dispatch
cache_read = django.dispatch.Signal() # args: func, hit
cache... | <commit_before>import django.dispatch
cache_read = django.dispatch.Signal(providing_args=["func", "hit"])
cache_invalidated = django.dispatch.Signal(providing_args=["obj_dict"])
<commit_msg>Stop using Signal(providing_args) deprected in Django 4.0
Closes #393<commit_after>import django.dispatch
cache_read = django.d... |
b3b67fe0e68423fc2f85bccf1f20acdb779a38ba | pylxd/deprecated/tests/utils.py | pylxd/deprecated/tests/utils.py | # Copyright (c) 2015 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright (c) 2015 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Remove unused testing utility function | Remove unused testing utility function
Signed-off-by: Dougal Matthews <8f24f2c0fd825cfb6716a36822888c4a01678c88@dougalmatthews.com>
| Python | apache-2.0 | lxc/pylxd,lxc/pylxd | # Copyright (c) 2015 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright (c) 2015 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | <commit_before># Copyright (c) 2015 Canonical Ltd
#
# 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 app... | # Copyright (c) 2015 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright (c) 2015 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | <commit_before># Copyright (c) 2015 Canonical Ltd
#
# 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 app... |
57bb37d7579620005a49613ff90f0a2eec55a77e | backend/offers_web.py | backend/offers_web.py | import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get('limit', MAX_O... | import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get('limit', MAX_O... | Fix max elements in header | Fix max elements in header
| Python | agpl-3.0 | jilljenn/voyageavecmoi,jilljenn/voyageavecmoi,jilljenn/voyageavecmoi | import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get('limit', MAX_O... | import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get('limit', MAX_O... | <commit_before>import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get... | import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get('limit', MAX_O... | import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get('limit', MAX_O... | <commit_before>import falcon
import json
import rethinkdb as r
MAX_OFFERS = 100
class OfferListResource:
def __init__(self):
self._db = r.connect('localhost', 28015)
def on_get(self, req, resp):
"""Returns all offers available"""
try:
limit, page = map(int, (req.params.get... |
cd3b686204e48412765c633f61f02a6166141125 | citools/__init__.py | citools/__init__.py | """
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
| """
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
| Use standard three-digits for now | Use standard three-digits for now
| Python | bsd-3-clause | ella/citools,ella/citools | """
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
Use standard three-digits for now | """
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
| <commit_before>"""
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
<commit_msg>Use standard three-digits for now<commit_after> | """
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
| """
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
Use standard three-digits for now"""
CI tools is a collection of small configurations aimed to ease ... | <commit_before>"""
CI tools is a collection of small configurations aimed to ease setting up
complete CI system, targettet on django apps.
"""
VERSION = (0, 0, 1, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
<commit_msg>Use standard three-digits for now<commit_after>"""
CI tools is a collecti... |
fac7e7d8759aab7e2bea666e55d71e35da45c334 | groundstation/gref.py | groundstation/gref.py | import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel,
... | import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel,
... | Implement Gref.tips() to fetch it's tips. | Implement Gref.tips() to fetch it's tips.
| Python | mit | richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation | import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel,
... | import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel,
... | <commit_before>import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel... | import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel,
... | import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel,
... | <commit_before>import os
class Gref(object):
def __init__(self, store, channel, identifier):
self.store = store
self.channel = channel.replace("/", "_")
self.identifier = identifier
self._node_path = os.path.join(self.store.gref_path(),
self.channel... |
6e2cbb2da770d73e12dfae7d36fd6f1ef00c4ed7 | jpa/eclipselink.jpa.test/resource/weblogic/wls_start.py | jpa/eclipselink.jpa.test/resource/weblogic/wls_start.py | ############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
#############################################################... | ############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
#############################################################... | Change start-weblogic-server using jdk as default. | Change start-weblogic-server using jdk as default.
Code reviewed by Edwin Tang
| Python | epl-1.0 | gameduell/eclipselink.runtime,gameduell/eclipselink.runtime,gameduell/eclipselink.runtime,gameduell/eclipselink.runtime | ############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
#############################################################... | ############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
#############################################################... | <commit_before>############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
##############################################... | ############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
#############################################################... | ############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
#############################################################... | <commit_before>############################################################################
# Generic script applicable on any Operating Environments (Unix, Windows)
# ScriptName : wls_start.py
# Properties : weblogic.properties
# Author : Kevin Yuan
##############################################... |
06a19b5c693b2b5b808f8e7b00136bef6b1a04c3 | base/relengapi/app.py | base/relengapi/app.py | from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.from_envvar('REL... | import os
from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.from_e... | Set a random session key if none is configured | Set a random session key if none is configured
| Python | mpl-2.0 | mozilla-releng/services,andrei987/services,srfraser/services,andrei987/services,srfraser/services,lundjordan/services,mozilla/build-relengapi,garbas/mozilla-releng-services,garbas/mozilla-releng-services,lundjordan/services,andrei987/services,andrei987/services,garbas/mozilla-releng-services,srfraser/services,hwine/bui... | from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.from_envvar('REL... | import os
from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.from_e... | <commit_before>from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.f... | import os
from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.from_e... | from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.from_envvar('REL... | <commit_before>from flask import current_app
from flask import Flask
from flask import g
from flask import jsonify
from flask import redirect
from flask import url_for
from relengapi import celery
from relengapi import db
import pkg_resources
def create_app(cmdline=False):
app = Flask('relengapi')
app.config.f... |
1af37551cd8e68e84a25f77dc57e5c94b10d3b87 | btcx/common.py | btcx/common.py | from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
self.addObserver(event, cb)
... | import os
from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
self.listener = {}
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
... | Support for removing listeners by means of a listener id. | Support for removing listeners by means of a listener id.
| Python | mit | knowitnothing/btcx,knowitnothing/btcx | from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
self.addObserver(event, cb)
... | import os
from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
self.listener = {}
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
... | <commit_before>from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
self.addObserver(e... | import os
from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
self.listener = {}
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
... | from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
self.addObserver(event, cb)
... | <commit_before>from twisted.words.xish.utility import EventDispatcher
USER_AGENT = 'btcx-bot'
class ExchangeEvent(EventDispatcher):
def __init__(self, **kwargs):
EventDispatcher.__init__(self, **kwargs)
def listen(self, msg, cb):
event = "%s/%s" % (self.prefix, msg)
self.addObserver(e... |
a419f6dcb7968d6af1e3ef8eae29b723d96b5fd2 | stayput/jinja2/__init__.py | stayput/jinja2/__init__.py | from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item):
return self.env... | from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item, site, *args, **kwargs):
... | Update for stayput master and ensure forward compatibility | Update for stayput master and ensure forward compatibility
| Python | mit | veeti/stayput_jinja2 | from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item):
return self.env... | from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item, site, *args, **kwargs):
... | <commit_before>from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item):
... | from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item, site, *args, **kwargs):
... | from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item):
return self.env... | <commit_before>from jinja2 import Environment, FileSystemLoader
from stayput import Templater
class Jinja2Templater(Templater):
def __init__(self, site, *args, **kwargs):
self.site = site
self.env = Environment(loader=FileSystemLoader(site.templates_path))
def template(self, item):
... |
df690e4c2f19e30c619db90b8b2dfd77dab54159 | sympy/printing/__init__.py | sympy/printing/__init__.py | """Printing subsystem"""
from pretty import *
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, print_fcode
from jscode import jscode, print_jscode
from gtk import *
from preview import prev... | """Printing subsystem"""
from pretty import pager_print, pretty, pretty_print, pprint, \
pprint_use_unicode, pprint_try_use_unicode
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, prin... | Remove glob imports from sympy.printing. | Remove glob imports from sympy.printing.
| Python | bsd-3-clause | Designist/sympy,emon10005/sympy,farhaanbukhsh/sympy,mafiya69/sympy,kaushik94/sympy,atreyv/sympy,kmacinnis/sympy,Mitchkoens/sympy,aktech/sympy,sunny94/temp,grevutiu-gabriel/sympy,wanglongqi/sympy,AunShiLord/sympy,jamesblunt/sympy,emon10005/sympy,shikil/sympy,rahuldan/sympy,diofant/diofant,yashsharan/sympy,kmacinnis/symp... | """Printing subsystem"""
from pretty import *
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, print_fcode
from jscode import jscode, print_jscode
from gtk import *
from preview import prev... | """Printing subsystem"""
from pretty import pager_print, pretty, pretty_print, pprint, \
pprint_use_unicode, pprint_try_use_unicode
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, prin... | <commit_before>"""Printing subsystem"""
from pretty import *
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, print_fcode
from jscode import jscode, print_jscode
from gtk import *
from prev... | """Printing subsystem"""
from pretty import pager_print, pretty, pretty_print, pprint, \
pprint_use_unicode, pprint_try_use_unicode
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, prin... | """Printing subsystem"""
from pretty import *
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, print_fcode
from jscode import jscode, print_jscode
from gtk import *
from preview import prev... | <commit_before>"""Printing subsystem"""
from pretty import *
from latex import latex, print_latex
from mathml import mathml, print_mathml
from python import python, print_python
from ccode import ccode, print_ccode
from fcode import fcode, print_fcode
from jscode import jscode, print_jscode
from gtk import *
from prev... |
c0dac1383d8ea4847f08a06f997bbf80f1cafca1 | netbox/utilities/api.py | netbox/utilities/api.py | from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try again later."
... | from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try again later."
... | Fix retrieval of model under viewsets without a statically defined queryset | Fix retrieval of model under viewsets without a statically defined queryset
| Python | apache-2.0 | Alphalink/netbox,Alphalink/netbox,snazy2000/netbox,digitalocean/netbox,Alphalink/netbox,lampwins/netbox,lampwins/netbox,lampwins/netbox,snazy2000/netbox,digitalocean/netbox,Alphalink/netbox,lampwins/netbox,snazy2000/netbox,digitalocean/netbox,digitalocean/netbox,snazy2000/netbox | from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try again later."
... | from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try again later."
... | <commit_before>from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try... | from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try again later."
... | from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try again later."
... | <commit_before>from rest_framework.exceptions import APIException
from rest_framework.serializers import ModelSerializer
WRITE_OPERATIONS = ['create', 'update', 'partial_update', 'delete']
class ServiceUnavailable(APIException):
status_code = 503
default_detail = "Service temporarily unavailable, please try... |
ab889e99e78b16cacc2f1fbb86494b8a784c154a | icekit/plugins/image/admin.py | icekit/plugins/image/admin.py | from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal = ['categories... | from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal = ['categories... | Fix use of unicode() incompatible with Python 3 | Fix use of unicode() incompatible with Python 3
| Python | mit | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit | from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal = ['categories... | from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal = ['categories... | <commit_before>from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal... | from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal = ['categories... | from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal = ['categories... | <commit_before>from django.contrib import admin
from icekit.utils.admin.mixins import ThumbnailAdminMixin
from . import models
class ImageAdmin(ThumbnailAdminMixin, admin.ModelAdmin):
list_display = ['description', 'title', 'thumbnail']
list_display_links = ['description', 'thumbnail']
filter_horizontal... |
5d01c58aef7f101531ecc7a44a83d225fa2fdcc8 | npc/linters/__init__.py | npc/linters/__init__.py | from . import changeling
| """
Linters for verifying the correctness of certain character types
The `commands.lint` function can lint all basic files, but special character
types sometimes need extra checks. The linters in this package encapsulate that
logic.
All linter packages have a single main entry point `lint` which accepts a
character i... | Add docstring to linters package | Add docstring to linters package
| Python | mit | aurule/npc,aurule/npc | from . import changeling
Add docstring to linters package | """
Linters for verifying the correctness of certain character types
The `commands.lint` function can lint all basic files, but special character
types sometimes need extra checks. The linters in this package encapsulate that
logic.
All linter packages have a single main entry point `lint` which accepts a
character i... | <commit_before>from . import changeling
<commit_msg>Add docstring to linters package<commit_after> | """
Linters for verifying the correctness of certain character types
The `commands.lint` function can lint all basic files, but special character
types sometimes need extra checks. The linters in this package encapsulate that
logic.
All linter packages have a single main entry point `lint` which accepts a
character i... | from . import changeling
Add docstring to linters package"""
Linters for verifying the correctness of certain character types
The `commands.lint` function can lint all basic files, but special character
types sometimes need extra checks. The linters in this package encapsulate that
logic.
All linter packages have a s... | <commit_before>from . import changeling
<commit_msg>Add docstring to linters package<commit_after>"""
Linters for verifying the correctness of certain character types
The `commands.lint` function can lint all basic files, but special character
types sometimes need extra checks. The linters in this package encapsulate ... |
0228128b2878c4d5f6942e751b48c8e52192245b | exporters/writers/console_writer.py | exporters/writers/console_writer.py | import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
self.logg... | import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
self.logg... | Use sort_keys=True for the ConsoleWritter pretty printing | Use sort_keys=True for the ConsoleWritter pretty printing
| Python | bsd-3-clause | scrapinghub/exporters | import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
self.logg... | import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
self.logg... | <commit_before>import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
... | import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
self.logg... | import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
self.logg... | <commit_before>import json
from exporters.writers.base_writer import BaseWriter, ItemsLimitReached
class ConsoleWriter(BaseWriter):
"""
It is just a writer with testing purposes. It prints every item in console.
"""
def __init__(self, options):
super(ConsoleWriter, self).__init__(options)
... |
42389e796acba99fe12e30e6ca08672b889bd5f2 | infrastructure/serializers.py | infrastructure/serializers.py | from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
class BudgetPhaseSerializer(serializers.ModelSerializer... | from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
read_only_fields = ["budget_year"]
class Budget... | Make fields readonly, skips rest_framework, validation, speeds up queries | Make fields readonly, skips rest_framework, validation, speeds up queries
| Python | mit | Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data | from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
class BudgetPhaseSerializer(serializers.ModelSerializer... | from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
read_only_fields = ["budget_year"]
class Budget... | <commit_before>from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
class BudgetPhaseSerializer(serializers.... | from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
read_only_fields = ["budget_year"]
class Budget... | from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
class BudgetPhaseSerializer(serializers.ModelSerializer... | <commit_before>from rest_framework import serializers
from . import models
from scorecard.serializers import GeographySerializer
class FinancialYearSerializer(serializers.ModelSerializer):
class Meta:
model = models.FinancialYear
fields = ["budget_year"]
class BudgetPhaseSerializer(serializers.... |
53e961870da3aeebf62b39605dc2aab74639c0c7 | internode_ssl_test.py | internode_ssl_test.py | from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl enabled
... | from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl enabled
... | Add test for internode_compression: 'none' | Add test for internode_compression: 'none'
| Python | apache-2.0 | blerer/cassandra-dtest,carlyeks/cassandra-dtest,bdeggleston/cassandra-dtest,stef1927/cassandra-dtest,blerer/cassandra-dtest,riptano/cassandra-dtest,snazy/cassandra-dtest,stef1927/cassandra-dtest,beobal/cassandra-dtest,thobbs/cassandra-dtest,pauloricardomg/cassandra-dtest,spodkowinski/cassandra-dtest,krummas/cassandra-d... | from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl enabled
... | from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl enabled
... | <commit_before>from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl... | from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl enabled
... | from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl enabled
... | <commit_before>from dtest import Tester, debug
from tools import generate_ssl_stores, putget
class TestInternodeSSL(Tester):
def __init__(self, *args, **kwargs):
Tester.__init__(self, *args, **kwargs)
def putget_with_internode_ssl_test(self):
"""
Simple putget test with internode ssl... |
0f12f4a2e8b68cf48b9768a6b18a1a560068eac2 | app/timetables/models.py | app/timetables/models.py | from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid case
in... | from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid case
in... | Change meal name to charfield | Change meal name to charfield
| Python | mit | teamtaverna/core | from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid case
in... | from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid case
in... | <commit_before>from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid ... | from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid case
in... | from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid case
in... | <commit_before>from __future__ import unicode_literals
from django.db import models
class Weekday(models.Model):
"""Model representing the day of the week."""
name = models.CharField(max_length=60, unique=True)
def clean(self):
"""
Capitalize the first letter of the first word to avoid ... |
ead78c44dbf3d180ba4ea99a6e107539166025f2 | genes/java/main.py | genes/java/main.py | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config):
if is_debian() or is_ubuntu():
if config.is_... | from typing import Callable, Dict
from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config: Callable[[], Dict]):
... | Add typing to java. It's not right yet though :) | Add typing to java. It's not right yet though :)
| Python | mit | hatchery/Genepool2,hatchery/genepool | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config):
if is_debian() or is_ubuntu():
if config.is_... | from typing import Callable, Dict
from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config: Callable[[], Dict]):
... | <commit_before>from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config):
if is_debian() or is_ubuntu():
... | from typing import Callable, Dict
from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config: Callable[[], Dict]):
... | from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config):
if is_debian() or is_ubuntu():
if config.is_... | <commit_before>from genes.apt import commands as apt
from genes.brew import commands as brew
from genes.debconf import commands as debconf
from genes.debian.traits import is_debian
from genes.mac.traits import is_osx
from genes.ubuntu.traits import is_ubuntu
def main(config):
if is_debian() or is_ubuntu():
... |
8883f1a45595219ae843b3400df1f56ab07aa4fe | corehq/apps/userreports/document_stores.py | corehq/apps/userreports/document_stores.py | from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
def get_document_store(domain, doc_type):
use_sq... | from corehq.apps.locations.models import SQLLocation
from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
f... | Add document store for locations | Add document store for locations
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
def get_document_store(domain, doc_type):
use_sq... | from corehq.apps.locations.models import SQLLocation
from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
f... | <commit_before>from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
def get_document_store(domain, doc_ty... | from corehq.apps.locations.models import SQLLocation
from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
f... | from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
def get_document_store(domain, doc_type):
use_sq... | <commit_before>from corehq.form_processor.document_stores import ReadonlyFormDocumentStore, ReadonlyCaseDocumentStore
from corehq.form_processor.utils import should_use_sql_backend
from corehq.util.couch import get_db_by_doc_type
from pillowtop.dao.couch import CouchDocumentStore
def get_document_store(domain, doc_ty... |
7fd3e82c449ebf46e369d2a8c2bf534cb6b17607 | notebook/lib/pos_tags.py | notebook/lib/pos_tags.py | import nltk
class PosTags:
def tag(self, t):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
retval = []
for p in pos:
retval.append({"word": p[... | import nltk
class PosTags:
def tag(self, t, as_dicts=True):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
if as_dicts:
return self.to_dicts(pos)
... | Change return to allow for original tuples to come out since we'll need them for chunking | Change return to allow for original tuples to come out since we'll need them for chunking
| Python | mit | mjcollin/2016spr,mjcollin/2016spr,mjcollin/2016spr | import nltk
class PosTags:
def tag(self, t):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
retval = []
for p in pos:
retval.append({"word": p[... | import nltk
class PosTags:
def tag(self, t, as_dicts=True):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
if as_dicts:
return self.to_dicts(pos)
... | <commit_before>import nltk
class PosTags:
def tag(self, t):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
retval = []
for p in pos:
retval.app... | import nltk
class PosTags:
def tag(self, t, as_dicts=True):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
if as_dicts:
return self.to_dicts(pos)
... | import nltk
class PosTags:
def tag(self, t):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
retval = []
for p in pos:
retval.append({"word": p[... | <commit_before>import nltk
class PosTags:
def tag(self, t):
'''
With a list of tokens, mark their part of speech and return
a list dicts (no native tuple type in dataframes it seems).
'''
pos = nltk.pos_tag(t)
retval = []
for p in pos:
retval.app... |
6b515e671c33458d736c6639a8b3391f94dfee73 | buildPy2app.py | buildPy2app.py | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPTIONS = {
'icon... | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPTIONS = {
'icon... | Set 10.11.0 as minimum macOS version in the .app bundle | Set 10.11.0 as minimum macOS version in the .app bundle
| Python | apache-2.0 | Syncplay/syncplay,Syncplay/syncplay,NeverDecaf/syncplay,alby128/syncplay,alby128/syncplay,NeverDecaf/syncplay | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPTIONS = {
'icon... | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPTIONS = {
'icon... | <commit_before>"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPT... | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPTIONS = {
'icon... | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPTIONS = {
'icon... | <commit_before>"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
]
OPT... |
5ac75f5cf37b86a2b512c4fb9d64c122ccbfe557 | admin_interface/migrations/0025_theme_language_chooser_control.py | admin_interface/migrations/0025_theme_language_chooser_control.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
field=models.CharF... | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
field=models.CharF... | Fix `language_choose_control` migration default value. | Fix `language_choose_control` migration default value.
Co-Authored-By: Éric <34afff4eac2f9b94bd269db558876db6be315161@users.noreply.github.com>
| Python | mit | fabiocaccamo/django-admin-interface,fabiocaccamo/django-admin-interface,fabiocaccamo/django-admin-interface | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
field=models.CharF... | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
field=models.CharF... | <commit_before>from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
fie... | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
field=models.CharF... | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
field=models.CharF... | <commit_before>from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="language_chooser_control",
fie... |
8fb8a77dcad4aa657b7ddb637459a6279a21755e | alexandria/drivers.py | alexandria/drivers.py | # coding=utf-8
import types
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
pass
d... | # coding=utf-8
import types
import pprint
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
... | Copy reference object example. This commit is just implemented to validate the medhod. But this is not conveniant, because reference models must not be changed. So next step is to make them private attributes. | Copy reference object example.
This commit is just implemented to validate the medhod.
But this is not conveniant, because reference models must not be
changed.
So next step is to make them private attributes.
| Python | apache-2.0 | sl4shme/alexandria,sl4shme/alexandria,sl4shme/alexandria,uggla/alexandria | # coding=utf-8
import types
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
pass
d... | # coding=utf-8
import types
import pprint
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
... | <commit_before># coding=utf-8
import types
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
... | # coding=utf-8
import types
import pprint
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
... | # coding=utf-8
import types
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
pass
d... | <commit_before># coding=utf-8
import types
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
... |
138aa351b3dbe95f3cdebf01dbd3c75f1ce3fac2 | src/ggrc/fulltext/sql.py | src/ggrc/fulltext/sql.py | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Indexer):
def cr... | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Indexer):
def cr... | Fix test broken due to delete_record change | Fix test broken due to delete_record change
| Python | apache-2.0 | kr41/ggrc-core,uskudnik/ggrc-core,vladan-m/ggrc-core,AleksNeStu/ggrc-core,prasannav7/ggrc-core,josthkko/ggrc-core,vladan-m/ggrc-core,hyperNURb/ggrc-core,vladan-m/ggrc-core,uskudnik/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,hyperNURb/ggrc-core,andrei-karalionak/ggrc-core,hasanalom/ggrc-core,selahssea/ggrc-core,Alek... | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Indexer):
def cr... | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Indexer):
def cr... | <commit_before># Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Ind... | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Indexer):
def cr... | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Indexer):
def cr... | <commit_before># Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from . import Indexer
class SqlIndexer(Ind... |
756c9ae9487ac5c35f069b79e792043bca0af27e | panoptes_client/utils.py | panoptes_client/utils.py | import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batch(*args, **kwar... | import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batch(*args, **kwar... | Fix passing sets to batchable methods | Fix passing sets to batchable methods
Sets don't support indexing, so convert them to lists.
| Python | apache-2.0 | zooniverse/panoptes-python-client | import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batch(*args, **kwar... | import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batch(*args, **kwar... | <commit_before>import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batc... | import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batch(*args, **kwar... | import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batch(*args, **kwar... | <commit_before>import functools
ITERABLE_TYPES = (
list,
set,
tuple,
)
try:
from numpy import ndarray
ITERABLE_TYPES = ITERABLE_TYPES + (ndarray,)
except ImportError:
pass
def isiterable(v):
return isinstance(v, ITERABLE_TYPES)
def batchable(func=None, batch_size=100):
def do_batc... |
a8904432a53aa82f8c1f0efbdd88114663120802 | containers/containers.py | containers/containers.py | try:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
def simple_discovery(path, secure=True):
if secure:
protocol = 'https'
else:
protocol = 'http'
urlretrieve('{protocol}://{path}.aci'.format(path=path,
... | Add some sort of simple image discovery | Add some sort of simple image discovery
| Python | mit | kragniz/containers | Add some sort of simple image discovery | try:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
def simple_discovery(path, secure=True):
if secure:
protocol = 'https'
else:
protocol = 'http'
urlretrieve('{protocol}://{path}.aci'.format(path=path,
... | <commit_before><commit_msg>Add some sort of simple image discovery<commit_after> | try:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
def simple_discovery(path, secure=True):
if secure:
protocol = 'https'
else:
protocol = 'http'
urlretrieve('{protocol}://{path}.aci'.format(path=path,
... | Add some sort of simple image discoverytry:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
def simple_discovery(path, secure=True):
if secure:
protocol = 'https'
else:
protocol = 'http'
urlretrieve('{protocol}://{path}.aci'.format(path=pa... | <commit_before><commit_msg>Add some sort of simple image discovery<commit_after>try:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
def simple_discovery(path, secure=True):
if secure:
protocol = 'https'
else:
protocol = 'http'
urlretrieve... | |
e170666cbbc1f2a61c0ffa077c66da4556a6c5bb | app/packages/views.py | app/packages/views.py | import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["count"] = Packa... | import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["count"] = Packa... | Add my packages to featured list | Add my packages to featured list
| Python | bsd-2-clause | NikhilKalige/atom-website,NikhilKalige/atom-website,NikhilKalige/atom-website | import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["count"] = Packa... | import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["count"] = Packa... | <commit_before>import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["... | import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["count"] = Packa... | import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["count"] = Packa... | <commit_before>import requests
from . import packages
from models import Package, Downloads
from flask import jsonify
from datetime import timedelta
from app import cache
from utils import cache_timeout
@packages.route('/stats', methods=['GET'])
@cache_timeout
@cache.cached()
def stats():
resp = dict()
resp["... |
33f2636e1de536a633cec9332362252b0b614817 | serpent/templates/SerpentGamePlugin/files/serpent_game.py | serpent/templates/SerpentGamePlugin/files/serpent_game.py | from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.input_controller import InputControllers
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **kwargs):
... | from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **kwargs):
kwargs["platform"] = "PLATFORM"
kwargs["wind... | Remove kwargs["input_controller"] from the Game plugin template | Remove kwargs["input_controller"] from the Game plugin template
| Python | mit | SerpentAI/SerpentAI | from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.input_controller import InputControllers
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **kwargs):
... | from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **kwargs):
kwargs["platform"] = "PLATFORM"
kwargs["wind... | <commit_before>from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.input_controller import InputControllers
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **k... | from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **kwargs):
kwargs["platform"] = "PLATFORM"
kwargs["wind... | from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.input_controller import InputControllers
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **kwargs):
... | <commit_before>from serpent.game import Game
from .api.api import MyGameAPI
from serpent.utilities import Singleton
from serpent.input_controller import InputControllers
from serpent.game_launchers.web_browser_game_launcher import WebBrowser
class SerpentGame(Game, metaclass=Singleton):
def __init__(self, **k... |
d6433001f3660c9c4506fe5e1f62c0a52edd02f7 | project/djenerator/tests.py | project/djenerator/tests.py | #!/usr/bin/env python
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
| #!/usr/bin/env python
"""
This module contains tests for djenerator app.
"""
from django.test import TestCase
from model_reader import is_instance_of_model
from models import ExtendingModel
from models import NotExtendingModel
from models import TestModel0
from models import TestModel1
from models import TestModelA
fro... | Test Cases for is instance of Model function | Test Cases for is instance of Model function
| Python | mit | mostafa-mahmoud/djenerator,aelguindy/djenerator,mostafa-mahmoud/djenerator | #!/usr/bin/env python
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
Test Cases for is instance of Model function | #!/usr/bin/env python
"""
This module contains tests for djenerator app.
"""
from django.test import TestCase
from model_reader import is_instance_of_model
from models import ExtendingModel
from models import NotExtendingModel
from models import TestModel0
from models import TestModel1
from models import TestModelA
fro... | <commit_before>#!/usr/bin/env python
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
<commit_msg>Test Cases for is instance of Model function<commit_af... | #!/usr/bin/env python
"""
This module contains tests for djenerator app.
"""
from django.test import TestCase
from model_reader import is_instance_of_model
from models import ExtendingModel
from models import NotExtendingModel
from models import TestModel0
from models import TestModel1
from models import TestModelA
fro... | #!/usr/bin/env python
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
Test Cases for is instance of Model function#!/usr/bin/env python
"""
This module... | <commit_before>#!/usr/bin/env python
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
<commit_msg>Test Cases for is instance of Model function<commit_af... |
6631906fc126eadc114a7ee673194da4880dc960 | flask_admin/contrib/geoa/typefmt.py | flask_admin/contrib/geoa/typefmt.py | from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
import json
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
from flask import current_app
def geom_formatt... | from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
def geom_formatter(view, value):
params = html_params(... | Remove Flask-SQLAlchemy dependency It should be noted that the declarative base still has to be configured like this: | Remove Flask-SQLAlchemy dependency
It should be noted that the declarative base still has to be configured
like this:
```python
MyBase:
query = session.query_property()
```
Also decreased code duplication and removed unused imports.
| Python | bsd-3-clause | torotil/flask-admin,likaiguo/flask-admin,iurisilvio/flask-admin,toddetzel/flask-admin,mikelambert/flask-admin,lifei/flask-admin,likaiguo/flask-admin,rochacbruno/flask-admin,ArtemSerga/flask-admin,closeio/flask-admin,betterlife/flask-admin,jschneier/flask-admin,torotil/flask-admin,toddetzel/flask-admin,closeio/flask-adm... | from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
import json
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
from flask import current_app
def geom_formatt... | from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
def geom_formatter(view, value):
params = html_params(... | <commit_before>from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
import json
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
from flask import current_app
d... | from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
def geom_formatter(view, value):
params = html_params(... | from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
import json
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
from flask import current_app
def geom_formatt... | <commit_before>from flask_admin.contrib.sqla.typefmt import DEFAULT_FORMATTERS as BASE_FORMATTERS
import json
from jinja2 import Markup
from wtforms.widgets import html_params
from geoalchemy2.shape import to_shape
from geoalchemy2.elements import WKBElement
from sqlalchemy import func
from flask import current_app
d... |
e35ff2f0e45289c40a57c9488156829c60f9d3a0 | vumi_http_proxy/clickme.py | vumi_http_proxy/clickme.py | #!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
cli.interface = str(interface)
cli.port = port
"""This script runs vu... | #!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
"""This script runs vumi-http-proxy on <interface>:<port>"""
interface = ... | Change unicode ip to string | Change unicode ip to string
| Python | bsd-3-clause | praekelt/vumi-http-proxy,praekelt/vumi-http-proxy | #!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
cli.interface = str(interface)
cli.port = port
"""This script runs vu... | #!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
"""This script runs vumi-http-proxy on <interface>:<port>"""
interface = ... | <commit_before>#!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
cli.interface = str(interface)
cli.port = port
"""This... | #!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
"""This script runs vumi-http-proxy on <interface>:<port>"""
interface = ... | #!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
cli.interface = str(interface)
cli.port = port
"""This script runs vu... | <commit_before>#!/usr/bin/env python
import click
from vumi_http_proxy import http_proxy
@click.command()
@click.option('--interface', default="0.0.0.0", help='eg 0.0.0.0')
@click.option('--port', default=8080, help='eg 80')
def cli(interface, port):
cli.interface = str(interface)
cli.port = port
"""This... |
435b989d75b9e57cf2fe5fec6892c481a278a102 | examples/capabilities/selenoid_cap_file.py | examples/capabilities/selenoid_cap_file.py | # Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line with:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"screenResolution": "1280x1024x24",
"selenoid:options": {
"enableVNC": True,
"enableVideo": False,
... | # Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line. Eg:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"acceptSslCerts": True,
"acceptInsecureCerts": True,
"screenResolution": "1920x1080x24",
"selenoid:options":... | Update an example capabilities file | Update an example capabilities file
| Python | mit | mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase | # Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line with:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"screenResolution": "1280x1024x24",
"selenoid:options": {
"enableVNC": True,
"enableVideo": False,
... | # Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line. Eg:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"acceptSslCerts": True,
"acceptInsecureCerts": True,
"screenResolution": "1920x1080x24",
"selenoid:options":... | <commit_before># Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line with:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"screenResolution": "1280x1024x24",
"selenoid:options": {
"enableVNC": True,
"enable... | # Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line. Eg:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"acceptSslCerts": True,
"acceptInsecureCerts": True,
"screenResolution": "1920x1080x24",
"selenoid:options":... | # Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line with:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"screenResolution": "1280x1024x24",
"selenoid:options": {
"enableVNC": True,
"enableVideo": False,
... | <commit_before># Desired capabilities example file for Selenoid Grid
#
# The same result can be achieved on the command-line with:
# --cap-string='{"selenoid:options": {"enableVNC": true}}'
capabilities = {
"screenResolution": "1280x1024x24",
"selenoid:options": {
"enableVNC": True,
"enable... |
a26f3ee3df1f70302bc524e3a8decb1a1266aadd | devito/data/meta.py | devito/data/meta.py | from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO
FULL = DataReg... | from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO
FULL = DataReg... | Add static value to LEFT, CENTER, RIGHT | data: Add static value to LEFT, CENTER, RIGHT
| Python | mit | opesci/devito,opesci/devito | from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO
FULL = DataReg... | from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO
FULL = DataReg... | <commit_before>from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO... | from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO
FULL = DataReg... | from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO
FULL = DataReg... | <commit_before>from devito.tools import Tag
__all__ = ['DOMAIN', 'OWNED', 'HALO', 'NOPAD', 'FULL',
'LEFT', 'RIGHT', 'CENTER']
class DataRegion(Tag):
pass
DOMAIN = DataRegion('domain')
OWNED = DataRegion('owned') # within DOMAIN
HALO = DataRegion('halo')
NOPAD = DataRegion('nopad') # == DOMAIN+HALO... |
220748a5cc481b8df76af6a1301af94def603ee2 | paci/helpers/display_helper.py | paci/helpers/display_helper.py | """Helper to output stuff"""
from tabulate import tabulate
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(entries, header, tablefmt="grid"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(entries, tablefmt="plain"))
def std_input(text, default):
"""... | """Helper to output stuff"""
from tabulate import tabulate
import os
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(fix_descriptions(entries), header, tablefmt="presto"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(cleanup_entries(entries), tablefmt="p... | Fix how tables are printed on smaller screens | Fix how tables are printed on smaller screens
| Python | mit | tradebyte/paci,tradebyte/paci | """Helper to output stuff"""
from tabulate import tabulate
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(entries, header, tablefmt="grid"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(entries, tablefmt="plain"))
def std_input(text, default):
"""... | """Helper to output stuff"""
from tabulate import tabulate
import os
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(fix_descriptions(entries), header, tablefmt="presto"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(cleanup_entries(entries), tablefmt="p... | <commit_before>"""Helper to output stuff"""
from tabulate import tabulate
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(entries, header, tablefmt="grid"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(entries, tablefmt="plain"))
def std_input(text, de... | """Helper to output stuff"""
from tabulate import tabulate
import os
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(fix_descriptions(entries), header, tablefmt="presto"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(cleanup_entries(entries), tablefmt="p... | """Helper to output stuff"""
from tabulate import tabulate
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(entries, header, tablefmt="grid"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(entries, tablefmt="plain"))
def std_input(text, default):
"""... | <commit_before>"""Helper to output stuff"""
from tabulate import tabulate
def print_list(header, entries):
"""Prints out a list"""
print(tabulate(entries, header, tablefmt="grid"))
def print_table(entries):
"""Prints out a table"""
print(tabulate(entries, tablefmt="plain"))
def std_input(text, de... |
e42f77d374bab66fb1a90322c3b36c8f75f2499c | pft/errors.py | pft/errors.py | """Module that contains error handlers."""
from flask import render_template, Blueprint
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(500)
def internal_server_er... | """Module that contains error handlers."""
from flask import render_template, Blueprint
from .database import db
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(50... | Add database rollback to error handler | Add database rollback to error handler
| Python | unknown | gregcowell/PFT,gregcowell/BAM,gregcowell/BAM,gregcowell/PFT | """Module that contains error handlers."""
from flask import render_template, Blueprint
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(500)
def internal_server_er... | """Module that contains error handlers."""
from flask import render_template, Blueprint
from .database import db
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(50... | <commit_before>"""Module that contains error handlers."""
from flask import render_template, Blueprint
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(500)
def int... | """Module that contains error handlers."""
from flask import render_template, Blueprint
from .database import db
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(50... | """Module that contains error handlers."""
from flask import render_template, Blueprint
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(500)
def internal_server_er... | <commit_before>"""Module that contains error handlers."""
from flask import render_template, Blueprint
error = Blueprint('error', __name__)
@error.app_errorhandler(404)
def page_not_found(e):
"""Return page not found HTML page."""
return render_template('404.html'), 404
@error.app_errorhandler(500)
def int... |
b728253a668c7ff2fba12678d77344bfc645e40b | dusty/daemon.py | dusty/daemon.py | import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket():
try:
os.unlink(SOCKET_PATH)
except OSError:
if os.p... | import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket(socket_path):
try:
os.unlink(socket_path)
except OSError:
... | Make this easier to test, which we'll get to a bit later | Make this easier to test, which we'll get to a bit later
| Python | mit | gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty | import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket():
try:
os.unlink(SOCKET_PATH)
except OSError:
if os.p... | import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket(socket_path):
try:
os.unlink(socket_path)
except OSError:
... | <commit_before>import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket():
try:
os.unlink(SOCKET_PATH)
except OSError:
... | import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket(socket_path):
try:
os.unlink(socket_path)
except OSError:
... | import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket():
try:
os.unlink(SOCKET_PATH)
except OSError:
if os.p... | <commit_before>import os
import atexit
import logging
import socket
from .preflight import preflight_check
from .log import configure_logging
from .notifier import notify
from .constants import SOCKET_PATH, SOCKET_TERMINATOR
def _clean_up_existing_socket():
try:
os.unlink(SOCKET_PATH)
except OSError:
... |
fca363dec1ff73e34e25084322d5a31dd6fbc1ee | simplestatistics/statistics/coefficient_of_variation.py | simplestatistics/statistics/coefficient_of_variation.py | from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data):
"""
The `coefficient_of_variation`_ is the ratio of the standard deviation to the mean
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
Args:
data... | from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data, sample = True):
"""
The `coefficient of variation`_ is the ratio of the standard deviation to the mean.
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
A... | Add sample param to CV function | Add sample param to CV function
Boolean param to make possible to calculate coefficient of variation
for population (default is sample).
| Python | unknown | tmcw/simple-statistics-py,sheriferson/simplestatistics,sheriferson/simple-statistics-py | from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data):
"""
The `coefficient_of_variation`_ is the ratio of the standard deviation to the mean
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
Args:
data... | from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data, sample = True):
"""
The `coefficient of variation`_ is the ratio of the standard deviation to the mean.
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
A... | <commit_before>from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data):
"""
The `coefficient_of_variation`_ is the ratio of the standard deviation to the mean
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
Arg... | from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data, sample = True):
"""
The `coefficient of variation`_ is the ratio of the standard deviation to the mean.
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
A... | from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data):
"""
The `coefficient_of_variation`_ is the ratio of the standard deviation to the mean
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
Args:
data... | <commit_before>from .standard_deviation import standard_deviation
from .mean import mean
def coefficient_of_variation(data):
"""
The `coefficient_of_variation`_ is the ratio of the standard deviation to the mean
.. _`coefficient of variation`: https://en.wikipedia.org/wiki/Coefficient_of_variation
Arg... |
b62415c19459d9e5819b82f464731b166157811d | gym/envs/tests/test_registration.py | gym/envs/tests/test_registration.py | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = envs.spec('CartPo... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = envs.spec('CartPo... | Fix exception message formatting in Python3 | Fix exception message formatting in Python3
| Python | mit | d1hotpep/openai_gym,machinaut/gym,machinaut/gym,d1hotpep/openai_gym,dianchen96/gym,Farama-Foundation/Gymnasium,dianchen96/gym,Farama-Foundation/Gymnasium | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = envs.spec('CartPo... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = envs.spec('CartPo... | <commit_before># -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = en... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = envs.spec('CartPo... | # -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = envs.spec('CartPo... | <commit_before># -*- coding: utf-8 -*-
from gym import error, envs
from gym.envs import registration
from gym.envs.classic_control import cartpole
def test_make():
env = envs.make('CartPole-v0')
assert env.spec.id == 'CartPole-v0'
assert isinstance(env, cartpole.CartPoleEnv)
def test_spec():
spec = en... |
c0ed918e09bcb0c0eb1aec20e375c7da8c7466ef | tests/NongeneratingSymbolsRemove/RecursiveTest.py | tests/NongeneratingSymbolsRemove/RecursiveTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class RecursiveTest(TestCase):
pass
if __name__ == '__main__':
main()
| #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class A(Nonterminal):
pass
class B(Nonterminal):
pass
class C(Nonterminal):
pass
clas... | Add grammar for test of recursive grammar | Add grammar for test of recursive grammar
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class RecursiveTest(TestCase):
pass
if __name__ == '__main__':
main()
Add grammar for test of... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class A(Nonterminal):
pass
class B(Nonterminal):
pass
class C(Nonterminal):
pass
clas... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class RecursiveTest(TestCase):
pass
if __name__ == '__main__':
main()
<commit_... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class A(Nonterminal):
pass
class B(Nonterminal):
pass
class C(Nonterminal):
pass
clas... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class RecursiveTest(TestCase):
pass
if __name__ == '__main__':
main()
Add grammar for test of... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy-transforms
"""
from unittest import TestCase, main
from grammpy import *
from grammpy_transforms import *
class RecursiveTest(TestCase):
pass
if __name__ == '__main__':
main()
<commit_... |
3c29c4db6ca107bb4bf7fb0ffcd2ebbb4f9330b9 | saleor/discount/forms.py | saleor/discount/forms.py | from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', 'Discount code i... | from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', 'Discount code i... | Fix unicode error when showing voucher error message | Fix unicode error when showing voucher error message
| Python | bsd-3-clause | car3oon/saleor,car3oon/saleor,itbabu/saleor,itbabu/saleor,itbabu/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,KenMutemi/saleor,KenMutemi/saleor,HyperManTT/ECommerceSaleor,tfroehlich82/saleor,car3oon/saleor,HyperManTT/ECommerceSaleor,maferelo/saleor,maferelo/saleor,tfroehlich82/saleor,KenMutemi/saleor,HyperManTT... | from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', 'Discount code i... | from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', 'Discount code i... | <commit_before>from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', '... | from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', 'Discount code i... | from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', 'Discount code i... | <commit_before>from django import forms
from django.utils.translation import pgettext_lazy
from .models import Voucher, NotApplicable
class VoucherField(forms.ModelChoiceField):
default_error_messages = {
'invalid_choice': pgettext_lazy(
'voucher', pgettext_lazy(
'voucher', '... |
1e078b88b4eecaa5a9d0a2ada9a64237fe3c4f09 | users/management/commands/social_auth_migrate.py | users/management/commands/social_auth_migrate.py | from allauth.socialaccount.models import SocialAccount
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def handle(self, *args, **options):... | from allauth.socialaccount.models import SocialAccount, SocialApp
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def add_arguments(self, ... | Implement app secret printing to social_auth migration tool | Implement app secret printing to social_auth migration tool
| Python | mit | mikkokeskinen/tunnistamo,mikkokeskinen/tunnistamo | from allauth.socialaccount.models import SocialAccount
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def handle(self, *args, **options):... | from allauth.socialaccount.models import SocialAccount, SocialApp
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def add_arguments(self, ... | <commit_before>from allauth.socialaccount.models import SocialAccount
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def handle(self, *ar... | from allauth.socialaccount.models import SocialAccount, SocialApp
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def add_arguments(self, ... | from allauth.socialaccount.models import SocialAccount
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def handle(self, *args, **options):... | <commit_before>from allauth.socialaccount.models import SocialAccount
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from social_django.models import UserSocialAuth
class Command(BaseCommand):
help = 'Migrate allauth social logins to social auth'
def handle(self, *ar... |
7bef391ef605716a02cdc9bb572234ff26082ba4 | antxetamedia/archive/templatetags/absolute_urls.py | antxetamedia/archive/templatetags/absolute_urls.py | from django import template
register = template.Library()
@register.assignment_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
| from django import template
register = template.Library()
@register.simple_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
| Use simple_tag decorators as those tags can now also be used for assignments | Use simple_tag decorators as those tags can now also be used for assignments
| Python | agpl-3.0 | GISAElkartea/amv2,GISAElkartea/amv2,GISAElkartea/amv2 | from django import template
register = template.Library()
@register.assignment_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
Use simple_tag decorators as those tags can now also be used for assignments | from django import template
register = template.Library()
@register.simple_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
| <commit_before>from django import template
register = template.Library()
@register.assignment_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
<commit_msg>Use simple_tag decorators as those tags can now also be used for assignments<c... | from django import template
register = template.Library()
@register.simple_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
| from django import template
register = template.Library()
@register.assignment_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
Use simple_tag decorators as those tags can now also be used for assignmentsfrom django import template
... | <commit_before>from django import template
register = template.Library()
@register.assignment_tag(takes_context=True)
def build_absolute_uri(context, url):
if url:
return context['request'].build_absolute_uri(url)
<commit_msg>Use simple_tag decorators as those tags can now also be used for assignments<c... |
314d45476bd079fe3b9bb97af181b2b6f306fe73 | cozify/test/test_config.py | cozify/test/test_config.py | #!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["XDG_CONFIG_HOME... | #!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["XDG_CONFIG_HOME... | Test for XDG basedir creation | Test for XDG basedir creation
| Python | mit | Artanicus/python-cozify,Artanicus/python-cozify | #!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["XDG_CONFIG_HOME... | #!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["XDG_CONFIG_HOME... | <commit_before>#!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["... | #!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["XDG_CONFIG_HOME... | #!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["XDG_CONFIG_HOME... | <commit_before>#!/usr/bin/env python3
import os, tempfile
from cozify import config
from cozify.test import debug
from cozify.test.fixtures import tmp_hub
def test_config_XDG(tmp_hub):
assert config._initXDG()
def test_config_XDG_env(tmp_hub):
with tempfile.TemporaryDirectory() as td:
os.environ["... |
2d067d0dbf4f04203c9bda2d8fb48d58fae3913d | datapoints/sql_queries.py | datapoints/sql_queries.py |
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.full_name
FROM region_relationship rr
INNER JOIN datapoint d
... |
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.name
FROM region_relationship rr
INNER JOIN datapoint d
... | Fix a bug in the region aggregation query. | Fix a bug in the region aggregation query.
There is no full_name column for regions; it is just name.
| Python | agpl-3.0 | SeedScientific/polio,unicef/rhizome,unicef/polio,unicef/polio,unicef/rhizome,unicef/rhizome,SeedScientific/polio,unicef/rhizome,SeedScientific/polio,SeedScientific/polio,unicef/polio,unicef/polio,SeedScientific/polio |
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.full_name
FROM region_relationship rr
INNER JOIN datapoint d
... |
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.name
FROM region_relationship rr
INNER JOIN datapoint d
... | <commit_before>
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.full_name
FROM region_relationship rr
INNER JOIN dat... |
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.name
FROM region_relationship rr
INNER JOIN datapoint d
... |
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.full_name
FROM region_relationship rr
INNER JOIN datapoint d
... | <commit_before>
## this should show in red if the COUNT is less than the total
## number of regions that exist for that relationshiop
show_region_aggregation = '''
SELECT
i.name
, SUM(d.value) as value
, r.full_name
FROM region_relationship rr
INNER JOIN dat... |
af848bfd9f50fe8d5272be927c8d93c26e45c3cd | dask_ndmeasure/__init__.py | dask_ndmeasure/__init__.py | # -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| # -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| Add another newline before author/date info | Add another newline before author/date info
| Python | bsd-3-clause | dask-image/dask-ndmeasure | # -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Add another newline before author/date info | # -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| <commit_before># -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
<commit_msg>Add another newline before author/date info<commit_after> | # -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
| # -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Add another newline before author/date info# -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.... | <commit_before># -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
<commit_msg>Add another newline before author/date info<commit_after># -*- coding: utf-8 -*-
__author__ = """John ... |
9a9ecde6f88a6c969f23dbcfc5bbc7e611f7f138 | version_info/get_version.py | version_info/get_version.py | import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.tags:
if tag.commit == head_commit:
return tag.name, head_commit.hexsha
return ... | import collections
import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
VersionSpec = collections.namedtuple('VersionSpec', ('name', 'tag', 'commit'))
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.ta... | Make find_versions return a namedtuple as documented | Make find_versions return a namedtuple as documented
| Python | mit | TyMaszWeb/python-version-info | import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.tags:
if tag.commit == head_commit:
return tag.name, head_commit.hexsha
return ... | import collections
import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
VersionSpec = collections.namedtuple('VersionSpec', ('name', 'tag', 'commit'))
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.ta... | <commit_before>import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.tags:
if tag.commit == head_commit:
return tag.name, head_commit.hex... | import collections
import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
VersionSpec = collections.namedtuple('VersionSpec', ('name', 'tag', 'commit'))
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.ta... | import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.tags:
if tag.commit == head_commit:
return tag.name, head_commit.hexsha
return ... | <commit_before>import git
import version_info.exceptions
__all__ = (
'get_git_version',
'find_versions',
)
def get_git_version(path):
repo = git.Repo(path)
head_commit = repo.head.ref.commit
for tag in repo.tags:
if tag.commit == head_commit:
return tag.name, head_commit.hex... |
01036133ed749d96a74bafb6b3f8670c06c63a84 | 1selfOpenDashboardCommand.py | 1selfOpenDashboardCommand.py | import sublime, sublime_plugin, webbrowser
QD_URL = "https://app.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_id = SETTINGS.ge... | import sublime, sublime_plugin, webbrowser
QD_URL = "http://www.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_id = SETTINGS.get... | Change landing URLs to website | Change landing URLs to website
| Python | apache-2.0 | 1self/sublime-text-plugin,1self/sublime-text-plugin,1self/sublime-text-plugin | import sublime, sublime_plugin, webbrowser
QD_URL = "https://app.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_id = SETTINGS.ge... | import sublime, sublime_plugin, webbrowser
QD_URL = "http://www.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_id = SETTINGS.get... | <commit_before>import sublime, sublime_plugin, webbrowser
QD_URL = "https://app.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_i... | import sublime, sublime_plugin, webbrowser
QD_URL = "http://www.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_id = SETTINGS.get... | import sublime, sublime_plugin, webbrowser
QD_URL = "https://app.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_id = SETTINGS.ge... | <commit_before>import sublime, sublime_plugin, webbrowser
QD_URL = "https://app.1self.co"
class GoTo1selfDashboardCommand(sublime_plugin.TextCommand):
def run(self,edit):
SETTINGS = {}
SETTINGS_FILE = "1self.sublime-settings"
SETTINGS = sublime.load_settings(SETTINGS_FILE)
stream_i... |
29421f62acae813097ab84973cc352ebd9ff70c6 | blockbuster/example_config_files/example_config.py | blockbuster/example_config_files/example_config.py | # General Settings
timerestriction = False
debug_mode = True
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Services Auth
basic_auth = 'ba... | # General Settings
timerestriction = False
debug_mode = True
log_directory = './logs'
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Servi... | Add new configuration setting for log_directory | Add new configuration setting for log_directory
| Python | mit | mattstibbs/blockbuster-server,mattstibbs/blockbuster-server | # General Settings
timerestriction = False
debug_mode = True
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Services Auth
basic_auth = 'ba... | # General Settings
timerestriction = False
debug_mode = True
log_directory = './logs'
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Servi... | <commit_before># General Settings
timerestriction = False
debug_mode = True
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Services Auth
b... | # General Settings
timerestriction = False
debug_mode = True
log_directory = './logs'
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Servi... | # General Settings
timerestriction = False
debug_mode = True
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Services Auth
basic_auth = 'ba... | <commit_before># General Settings
timerestriction = False
debug_mode = True
# Email Settings
# emailtype = "Gmail"
emailtype = "Console"
# SMS Settings
# outboundsmstype = "WebService"
outboundsmstype = "Console"
# Twilio Auth Keys
account_sid = "twilio sid here"
auth_token = "auth token here"
# SMS Services Auth
b... |
c5609fe1b48cdd5740215c1d0783eaafdfe2e76b | listen/__init__.py | listen/__init__.py | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | Remove requirement on python > 2.7 | Remove requirement on python > 2.7
| Python | mit | antevens/listen,antevens/listen | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | <commit_before>#!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includin... | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | #!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | <commit_before>#!/usr/bin/python
# -*- coding: utf8 -*-
"""
The MIT License (MIT)
Copyright (c) 2014 Jarl Stefansson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includin... |
1b179405245bc7d7d6157528bd64e2b399491090 | quantecon/optimize/__init__.py | quantecon/optimize/__init__.py | """
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import *
| """
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import newton, newton_halley, newton_secant, bisect, brentq
| Fix import to list items | Fix import to list items
| Python | bsd-3-clause | oyamad/QuantEcon.py,QuantEcon/QuantEcon.py,oyamad/QuantEcon.py,QuantEcon/QuantEcon.py | """
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import *
Fix import to list items | """
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import newton, newton_halley, newton_secant, bisect, brentq
| <commit_before>"""
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import *
<commit_msg>Fix import to list items<commit_after> | """
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import newton, newton_halley, newton_secant, bisect, brentq
| """
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import *
Fix import to list items"""
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import newton, newton_halley, newton_secant, bisect, brentq
| <commit_before>"""
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import *
<commit_msg>Fix import to list items<commit_after>"""
Initialization of the optimize subpackage
"""
from .scalar_maximization import brent_max
from .root_finding import newton, newto... |
fa7172a5e3231e738d85df3baba130fdec7497d1 | derrida/outwork/views.py | derrida/outwork/views.py | from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_queryset(self):
... | from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean, Raw
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_queryset(self):
... | Fix outwork list view to properly filter on published=true in Solr | Fix outwork list view to properly filter on published=true in Solr
| Python | apache-2.0 | Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django | from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_queryset(self):
... | from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean, Raw
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_queryset(self):
... | <commit_before>from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_querys... | from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean, Raw
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_queryset(self):
... | from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_queryset(self):
... | <commit_before>from django.views.generic import ListView
from haystack.query import SearchQuerySet
from haystack.inputs import Clean
from derrida.outwork.models import Outwork
class OutworkListView(ListView):
model = Outwork
template_name = 'outwork/outwork_list.html'
paginate_by = 16
def get_querys... |
0c8ab03600fa806a109861f0e560e3b3a6850a66 | nbgrader/apps/formgradeapp.py | nbgrader/apps/formgradeapp.py | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | Use default IPython profile when converting to HTML | Use default IPython profile when converting to HTML
| Python | bsd-3-clause | ellisonbg/nbgrader,ellisonbg/nbgrader,jupyter/nbgrader,modulexcite/nbgrader,jhamrick/nbgrader,jdfreder/nbgrader,jhamrick/nbgrader,ellisonbg/nbgrader,jupyter/nbgrader,EdwardJKim/nbgrader,EdwardJKim/nbgrader,MatKallada/nbgrader,alope107/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,dementrock/nbgrader,dementrock/nbgrader,j... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | <commit_before>from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templat... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | <commit_before>from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templat... |
037e15f383c326f1f4e7de59bc3ec3520ac6ce40 | pystachio/__init__.py | pystachio/__init__.py | __author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import MustacheParser
from pystachio.naming import Namable, Ref
from pystachio.basic import (
Float,
Integer,
S... | __author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
import sys
if sys.version_info < (2, 6, 5):
raise ImportError("pystachio requires Python >= 2.6.5")
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import Mustache... | Add check for minimum Python version | Add check for minimum Python version
| Python | mit | wickman/pystachio | __author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import MustacheParser
from pystachio.naming import Namable, Ref
from pystachio.basic import (
Float,
Integer,
S... | __author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
import sys
if sys.version_info < (2, 6, 5):
raise ImportError("pystachio requires Python >= 2.6.5")
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import Mustache... | <commit_before>__author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import MustacheParser
from pystachio.naming import Namable, Ref
from pystachio.basic import (
Float,... | __author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
import sys
if sys.version_info < (2, 6, 5):
raise ImportError("pystachio requires Python >= 2.6.5")
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import Mustache... | __author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import MustacheParser
from pystachio.naming import Namable, Ref
from pystachio.basic import (
Float,
Integer,
S... | <commit_before>__author__ = 'Brian Wickman'
__version__ = '0.5.2'
__license__ = 'MIT'
from pystachio.typing import (
Type,
TypeCheck,
TypeFactory)
from pystachio.base import Environment
from pystachio.parsing import MustacheParser
from pystachio.naming import Namable, Ref
from pystachio.basic import (
Float,... |
d5b8018d1d722f3b1e980425af79934265b0f3eb | tests/test_navigation.py | tests/test_navigation.py | def test_right_arrows(page):
page.goto("index.html")
while(True):
# Keeps going to the next page until there is no right arrow
right_arrow = page.query_selector("//*[@id='relations-next']/a")
if(right_arrow):
page.click("//*[@id='relations-next']/a")
page.wait_for... | def get_menu_titles(page) -> list:
page.goto("index.html")
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
menu_titles = []
for i in menu_list:
menu_item = i.as_element().inner_text()
menu_titles.append(menu_item)
... | Implement assertions and a for instead of a while loop | Implement assertions and a for instead of a while loop
| Python | agpl-3.0 | PyAr/PyZombis,PyAr/PyZombis,PyAr/PyZombis | def test_right_arrows(page):
page.goto("index.html")
while(True):
# Keeps going to the next page until there is no right arrow
right_arrow = page.query_selector("//*[@id='relations-next']/a")
if(right_arrow):
page.click("//*[@id='relations-next']/a")
page.wait_for... | def get_menu_titles(page) -> list:
page.goto("index.html")
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
menu_titles = []
for i in menu_list:
menu_item = i.as_element().inner_text()
menu_titles.append(menu_item)
... | <commit_before>def test_right_arrows(page):
page.goto("index.html")
while(True):
# Keeps going to the next page until there is no right arrow
right_arrow = page.query_selector("//*[@id='relations-next']/a")
if(right_arrow):
page.click("//*[@id='relations-next']/a")
... | def get_menu_titles(page) -> list:
page.goto("index.html")
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
menu_titles = []
for i in menu_list:
menu_item = i.as_element().inner_text()
menu_titles.append(menu_item)
... | def test_right_arrows(page):
page.goto("index.html")
while(True):
# Keeps going to the next page until there is no right arrow
right_arrow = page.query_selector("//*[@id='relations-next']/a")
if(right_arrow):
page.click("//*[@id='relations-next']/a")
page.wait_for... | <commit_before>def test_right_arrows(page):
page.goto("index.html")
while(True):
# Keeps going to the next page until there is no right arrow
right_arrow = page.query_selector("//*[@id='relations-next']/a")
if(right_arrow):
page.click("//*[@id='relations-next']/a")
... |
c709c58fc128076af5f58d33dcd0983436573d79 | tests/test_parsingapi.py | tests/test_parsingapi.py | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)
method... | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)
method... | Add a test to verify plugin_parsing clears selected parsers after task | Add a test to verify plugin_parsing clears selected parsers after task
| Python | mit | tobinjt/Flexget,Flexget/Flexget,jawilson/Flexget,sean797/Flexget,OmgOhnoes/Flexget,poulpito/Flexget,antivirtel/Flexget,ianstalk/Flexget,JorisDeRieck/Flexget,tarzasai/Flexget,Pretagonist/Flexget,malkavi/Flexget,dsemi/Flexget,sean797/Flexget,tobinjt/Flexget,Pretagonist/Flexget,crawln45/Flexget,Danfocus/Flexget,tobinjt/Fl... | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)
method... | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)
method... | <commit_before>from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)... | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)
method... | from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)
method... | <commit_before>from __future__ import unicode_literals, division, absolute_import
from flexget.plugin import get_plugin_by_name, get_plugins
from flexget.plugins.parsers import plugin_parsing
class TestParsingAPI(object):
def test_all_types_handled(self):
declared_types = set(plugin_parsing.PARSER_TYPES)... |
278b17859e4ad7464098a715777fcb755acf258c | doTranscode.py | doTranscode.py | #!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
#Decode the... | #!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
#Decode the... | Make sure that the temporary file has a `wav` extension because a certain encoder was designed for Windows and thinks that you would never possibly have a file without an extension so adds `.wav` if it's not there on the input file | Make sure that the temporary file has a `wav` extension because a certain encoder was designed for Windows and thinks that you would never possibly have a file without an extension so adds `.wav` if it's not there on the input file | Python | isc | jeffayle/Transcode | #!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
#Decode the... | #!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
#Decode the... | <commit_before>#!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
... | #!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
#Decode the... | #!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
#Decode the... | <commit_before>#!/usr/bin/env python
import encoders
import decoders
import config
import tempfile
import os
def transcode(inF, outF, options, type=None):
"Transcodes a file"
if type == None:
type = os.path.splitext(outF)[1][1:].lower()
#Get the file's metadata
meta = decoders.getMetadata(inF)
... |
81069682d724c0a1e2cd292e286e4148cd9c3d9d | scraping/IEEE/main.py | scraping/IEEE/main.py | """IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [default: ""]
-... | """IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [default: ""]
-... | Fix loop to delete branches from xml. | Fix loop to delete branches from xml.
| Python | mit | ArcasProject/Arcas | """IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [default: ""]
-... | """IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [default: ""]
-... | <commit_before>"""IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [def... | """IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [default: ""]
-... | """IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [default: ""]
-... | <commit_before>"""IEEE Xplore API Request.
Usage:
IEEE/main.py -h [-au AUTHOR] [-ti TITLE] [-ab ABSTRACT] [-py YEAR] [-hc
NUMBER]
Options:
-h --help show this
-au AUTHOR Terms to search for in Author [default: ""]
-ti TITLE Terms to search for in Title [def... |
4b6ca2d806d31daa77825f015c6047c8ec3b16d6 | python/startup.py | python/startup.py | # pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.environ["HOME"], '.... | # pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.environ["HOME"], 'p... | Move python rl history file | Move python rl history file
just to help clean up ~/
| Python | mit | rwstauner/run_control,rwstauner/run_control,rwstauner/run_control,rwstauner/run_control,rwstauner/run_control | # pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.environ["HOME"], '.... | # pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.environ["HOME"], 'p... | <commit_before># pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.envi... | # pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.environ["HOME"], 'p... | # pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.environ["HOME"], '.... | <commit_before># pylint: disable=unused-import, unused-variable, missing-docstring
def _readline():
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
import os
histfile = os.path.join(os.envi... |
ae897509ecc7f190b31cc34085aacf81e45bc36e | nflpool/data/secret-config.py | nflpool/data/secret-config.py | from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_url = ''
| from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_url = ''
msf_a... | Add the MSF API key and password fields | Add the MSF API key and password fields
| Python | mit | prcutler/nflpool,prcutler/nflpool | from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_url = ''
Add th... | from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_url = ''
msf_a... | <commit_before>from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_... | from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_url = ''
msf_a... | from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_url = ''
Add th... | <commit_before>from nflpool.data.dbsession import DbSessionFactory
# You will need an account from MySportsFeed to access their API. They offer free access to developers
# Edit below with your credentials and then save as secret.py
msf_username = 'YOURUSERNAME'
msf_pw = 'YOURPASSWORD'
su_email = ''
slack_webhook_... |
df4c12d9e2b07db9aa9a1406f61020eb78998bef | nickenbot/command/__init__.py | nickenbot/command/__init__.py | import os
import string
import importlib
import traceback
from .. import irc
def execute(**kwargs):
module_string = string.join([__name__, kwargs['command']], '.')
module = None
try:
module = importlib.import_module(module_string)
except ImportError as e:
traceback.print_exc()
... | import os
import fnmatch
import string
import importlib
import traceback
from .. import irc
def get_all():
files = os.listdir('./nickenbot/command')
files.remove('__init__.py')
commands = [os.path.splitext(f)[0] for f in files if fnmatch.fnmatch(f, '*.py')]
commands = [string.replace(c, '_', '-') for c... | Add support for hyphens, and list of commands | Add support for hyphens, and list of commands
Adds a function to retrieve all commands, and converts incoming commands
from hyphenated to underscored form.
| Python | mit | brlafreniere/nickenbot,brlafreniere/nickenbot | import os
import string
import importlib
import traceback
from .. import irc
def execute(**kwargs):
module_string = string.join([__name__, kwargs['command']], '.')
module = None
try:
module = importlib.import_module(module_string)
except ImportError as e:
traceback.print_exc()
... | import os
import fnmatch
import string
import importlib
import traceback
from .. import irc
def get_all():
files = os.listdir('./nickenbot/command')
files.remove('__init__.py')
commands = [os.path.splitext(f)[0] for f in files if fnmatch.fnmatch(f, '*.py')]
commands = [string.replace(c, '_', '-') for c... | <commit_before>import os
import string
import importlib
import traceback
from .. import irc
def execute(**kwargs):
module_string = string.join([__name__, kwargs['command']], '.')
module = None
try:
module = importlib.import_module(module_string)
except ImportError as e:
traceback.print... | import os
import fnmatch
import string
import importlib
import traceback
from .. import irc
def get_all():
files = os.listdir('./nickenbot/command')
files.remove('__init__.py')
commands = [os.path.splitext(f)[0] for f in files if fnmatch.fnmatch(f, '*.py')]
commands = [string.replace(c, '_', '-') for c... | import os
import string
import importlib
import traceback
from .. import irc
def execute(**kwargs):
module_string = string.join([__name__, kwargs['command']], '.')
module = None
try:
module = importlib.import_module(module_string)
except ImportError as e:
traceback.print_exc()
... | <commit_before>import os
import string
import importlib
import traceback
from .. import irc
def execute(**kwargs):
module_string = string.join([__name__, kwargs['command']], '.')
module = None
try:
module = importlib.import_module(module_string)
except ImportError as e:
traceback.print... |
18059a0515ea5f6edf87e8485200f001503459cd | info-txt.py | info-txt.py | # XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to store a single mess... | # XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to store a single mess... | Determine response time for messages | Determine response time for messages
| Python | mit | 2nd47/info-txt | # XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to store a single mess... | # XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to store a single mess... | <commit_before># XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to stor... | # XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to store a single mess... | # XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to store a single mess... | <commit_before># XML Parsing
import xml.etree.ElementTree as ET
# HTML output
import dominate as dom
from dominate.tags import *
# Interact with user machine
import datetime
from sys import argv
import os
import time
import webbrowser
second = 1000
minute = 60000
hour = 3600000
class SMS:
'''base SMS class to stor... |
d9b06edb63d20550c4b3fa0fa6924d99724dc11a | examples/image_resize.py | examples/image_resize.py | from __future__ import print_function
from transloadit.client import Transloadit
tl = Transloadit('TRANSLOADIT_KEY', 'TRANSLOADIT_SECRET')
ass = tl.new_assembly()
ass.add_file(open('fixtures/lol_cat.jpg', 'rb'))
ass.add_step('resize', '/image/resize', {'width': 70, 'height': 70})
response = ass.create(wait=True)
res... | from transloadit.client import Transloadit
tl = Transloadit("TRANSLOADIT_KEY", "TRANSLOADIT_SECRET")
ass = tl.new_assembly()
ass.add_file(open("fixtures/lol_cat.jpg", "rb"))
ass.add_step("resize", "/image/resize", {"width": 70, "height": 70})
response = ass.create(wait=True)
result_url = response.data.get("results").... | Update example syntax to python3 | Update example syntax to python3
| Python | mit | ifedapoolarewaju/transloadit-python-sdk | from __future__ import print_function
from transloadit.client import Transloadit
tl = Transloadit('TRANSLOADIT_KEY', 'TRANSLOADIT_SECRET')
ass = tl.new_assembly()
ass.add_file(open('fixtures/lol_cat.jpg', 'rb'))
ass.add_step('resize', '/image/resize', {'width': 70, 'height': 70})
response = ass.create(wait=True)
res... | from transloadit.client import Transloadit
tl = Transloadit("TRANSLOADIT_KEY", "TRANSLOADIT_SECRET")
ass = tl.new_assembly()
ass.add_file(open("fixtures/lol_cat.jpg", "rb"))
ass.add_step("resize", "/image/resize", {"width": 70, "height": 70})
response = ass.create(wait=True)
result_url = response.data.get("results").... | <commit_before>from __future__ import print_function
from transloadit.client import Transloadit
tl = Transloadit('TRANSLOADIT_KEY', 'TRANSLOADIT_SECRET')
ass = tl.new_assembly()
ass.add_file(open('fixtures/lol_cat.jpg', 'rb'))
ass.add_step('resize', '/image/resize', {'width': 70, 'height': 70})
response = ass.create(... | from transloadit.client import Transloadit
tl = Transloadit("TRANSLOADIT_KEY", "TRANSLOADIT_SECRET")
ass = tl.new_assembly()
ass.add_file(open("fixtures/lol_cat.jpg", "rb"))
ass.add_step("resize", "/image/resize", {"width": 70, "height": 70})
response = ass.create(wait=True)
result_url = response.data.get("results").... | from __future__ import print_function
from transloadit.client import Transloadit
tl = Transloadit('TRANSLOADIT_KEY', 'TRANSLOADIT_SECRET')
ass = tl.new_assembly()
ass.add_file(open('fixtures/lol_cat.jpg', 'rb'))
ass.add_step('resize', '/image/resize', {'width': 70, 'height': 70})
response = ass.create(wait=True)
res... | <commit_before>from __future__ import print_function
from transloadit.client import Transloadit
tl = Transloadit('TRANSLOADIT_KEY', 'TRANSLOADIT_SECRET')
ass = tl.new_assembly()
ass.add_file(open('fixtures/lol_cat.jpg', 'rb'))
ass.add_step('resize', '/image/resize', {'width': 70, 'height': 70})
response = ass.create(... |
b2b84adc6af10757f48845e830a55b40a9fa7ead | breakpad.py | breakpad.py | # Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import traceback
impor... | # Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import traceback
impor... | Disable braekpad automatic registration while we figure out stuff | Disable braekpad automatic registration while we figure out stuff
Review URL: http://codereview.chromium.org/462022
git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@33686 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| Python | bsd-3-clause | svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools | # Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import traceback
impor... | # Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import traceback
impor... | <commit_before># Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import ... | # Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import traceback
impor... | # Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import traceback
impor... | <commit_before># Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Breakpad for Python.
Sends a notification when a process stops on an exception."""
import atexit
import getpass
import urllib
import ... |
3dcece1bb4e2490168b21d4298e297e61bdde901 | corehq/ex-submodules/casexml/apps/case/fixtures.py | corehq/ex-submodules/casexml/apps/case/fixtures.py | from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a regular sync op... | from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a regular sync op... | Add links to fixture and casedb specs | Add links to fixture and casedb specs
| Python | bsd-3-clause | qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq | from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a regular sync op... | from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a regular sync op... | <commit_before>from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a ... | from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a regular sync op... | from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a regular sync op... | <commit_before>from casexml.apps.case.xml.generator import safe_element
from casexml.apps.phone.xml import get_casedb_element
class CaseDBFixture(object):
"""Used to provide a casedb-like structure as a fixture
Does not follow the standard FixtureGenerator pattern since it is currently
not used during a ... |
28e67e04a88b0195184bf43f013c11ea7f320c4f | conveyor/processor.py | conveyor/processor.py | from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xmlrpc2.Client(sel... | from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xmlrpc2.Client(sel... | Add a method for getting a list of releases to fetch | Add a method for getting a list of releases to fetch
| Python | bsd-2-clause | crateio/carrier | from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xmlrpc2.Client(sel... | from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xmlrpc2.Client(sel... | <commit_before>from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xml... | from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xmlrpc2.Client(sel... | from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xmlrpc2.Client(sel... | <commit_before>from __future__ import absolute_import
from __future__ import division
from xmlrpc2 import client as xmlrpc2
class BaseProcessor(object):
def __init__(self, index, *args, **kwargs):
super(BaseProcessor, self).__init__(*args, **kwargs)
self.index = index
self.client = xml... |
c694ac630f36c53c130a63908c6c3576f220a6bd | django-openstack/django_openstack/auth/__init__.py | django-openstack/django_openstack/auth/__init__.py | import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if not roles:
... | import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if not roles:
... | Return 'user' role as default value | Return 'user' role as default value
| Python | apache-2.0 | griddynamics/osc-robot-openstack-dashboard,griddynamics/osc-robot-openstack-dashboard,griddynamics/osc-robot-openstack-dashboard | import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if not roles:
... | import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if not roles:
... | <commit_before>import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if... | import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if not roles:
... | import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if not roles:
... | <commit_before>import django_openstack.urls
class Roles:
USER = 'user'
PROJECT_ADMIN = 'projadmin'
SOFTWARE_ADMIN = 'softadmin'
HARDWARE_ADMIN = 'hardadmin'
ALL_ROLES = (HARDWARE_ADMIN, SOFTWARE_ADMIN,
PROJECT_ADMIN, USER)
@staticmethod
def get_max_role(roles):
if... |
2a986d7c0bab1612e96cace5ce54a188e22af2aa | services/wordpress.py | services/wordpress.py | import json
import foauth
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
authorize_url... | import json
import foauth.providers
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
aut... | Fix the import for Wordpress | Fix the import for Wordpress
| Python | bsd-3-clause | foauth/foauth.org,foauth/foauth.org,foauth/foauth.org | import json
import foauth
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
authorize_url... | import json
import foauth.providers
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
aut... | <commit_before>import json
import foauth
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
... | import json
import foauth.providers
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
aut... | import json
import foauth
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
authorize_url... | <commit_before>import json
import foauth
class Wordpress(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.wordpress.com/'
favicon_url = 'http://s2.wp.com/i/favicon.ico'
docs_url = 'http://developer.wordpress.com/docs/api/'
# URLs to interact with the API
... |
fbad3c0b80258b02cc2ba81ff1408d24cd69c69d | src/iconclassserver/util.py | src/iconclassserver/util.py | import redis
import json
from django.conf import settings
import iconclass
import requests
import time
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data)
... | import redis
import json
from django.conf import settings
import iconclass
import requests
import time
import os
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data) ... | Handle filenames with path prefixes in git commit logs | Handle filenames with path prefixes in git commit logs
| Python | mit | epoz/iconclass-server,epoz/iconclass-server | import redis
import json
from django.conf import settings
import iconclass
import requests
import time
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data)
... | import redis
import json
from django.conf import settings
import iconclass
import requests
import time
import os
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data) ... | <commit_before>import redis
import json
from django.conf import settings
import iconclass
import requests
import time
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data)... | import redis
import json
from django.conf import settings
import iconclass
import requests
import time
import os
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data) ... | import redis
import json
from django.conf import settings
import iconclass
import requests
import time
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data)
... | <commit_before>import redis
import json
from django.conf import settings
import iconclass
import requests
import time
def handle_githubpushes():
redis_c = redis.StrictRedis()
while True:
data = redis_c.lpop(settings.REDIS_PREFIX + '_gitpushes')
if not data: break
data = json.loads(data)... |
78ebec64e51c43005488bc1b9ce84fca65d069e4 | planet_alignment/app/app_factory.py | planet_alignment/app/app_factory.py | """
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignment.config.bunc... | """
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignment.config.bunc... | Document the AppFactory, add the doc headers. | Document the AppFactory, add the doc headers.
| Python | mit | paulfanelli/planet_alignment | """
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignment.config.bunc... | """
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignment.config.bunc... | <commit_before>"""
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignm... | """
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignment.config.bunc... | """
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignment.config.bunc... | <commit_before>"""
.. module:: app_factory
:platform: linux
:synopsis:
.. moduleauthor:: Paul Fanelli <paul.fanelli@gmail.com>
.. modulecreated:: 6/27/15
"""
from zope.interface import implements
from planet_alignment.app.app import App
from planet_alignment.app.interface import IAppFactory
from planet_alignm... |
e7e35e3b40acb1d9b23538631a1b2a37f7723dfc | tests/util.py | tests/util.py | # -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
from six import ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
from six import ... | Make Internet connection check a little faster | Make Internet connection check a little faster
Testing whether Internet connect is available only cares about if the
remote server is able to response something, but not the concrete
content returned. So, when remote server responses 301, it's enough, no
need to wait for a 200 response with the real content from redir... | Python | bsd-3-clause | projectatomic/atomic-reactor,fr34k8/atomic-reactor,fr34k8/atomic-reactor,projectatomic/atomic-reactor,DBuildService/atomic-reactor,DBuildService/atomic-reactor | # -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
from six import ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
from six import ... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
f... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
from six import ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
from six import ... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals, absolute_import
import pytest
import requests
import uuid
f... |
edad01902f8c9d23da106c538d118e28da286821 | lesion/lifio.py | lesion/lifio.py | import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '256M', '64k', and '2G... | import numpy as np
import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '25... | Add function to determine metadata length | Add function to determine metadata length
| Python | bsd-3-clause | jni/lesion | import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '256M', '64k', and '2G... | import numpy as np
import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '25... | <commit_before>import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '256M',... | import numpy as np
import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '25... | import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '256M', '64k', and '2G... | <commit_before>import javabridge as jv
import bioformats as bf
def start(max_heap_size='8G'):
"""Start the Java Virtual Machine, enabling bioformats IO.
Parameters
----------
max_heap_size : string, optional
The maximum memory usage by the virtual machine. Valid strings
include '256M',... |
6a7a61d514ac738f8de29efe280ecfedfaf72685 | ttrss/auth.py | ttrss/auth.py | from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
if int(j[... | from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
if int(j[... | Clean up cookie lookup in TTRAuth | Clean up cookie lookup in TTRAuth
| Python | mit | Vassius/ttrss-python | from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
if int(j[... | from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
if int(j[... | <commit_before>from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
... | from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
if int(j[... | from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
if int(j[... | <commit_before>from requests.auth import AuthBase
import requests
import json
from exceptions import raise_on_error
class TTRAuth(AuthBase):
def __init__(self, user, password):
self.user = user
self.password = password
def response_hook(self, r, **kwargs):
j = json.loads(r.content)
... |
3aff93b43f880eab72ca205e1f354e7179907132 | fix_removal.py | fix_removal.py | import os
from distutils import sysconfig
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
python_lib_dir = sysconfig.get_python_lib()
fixed = False
for dir_path, dir_names, file_names in os.walk(python_lib_dir):
for dir_name in dir_na... | import os
import site
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
package_directories = site.PREFIXES
if site.USER_SITE:
package_directories.append(site.USER_SITE)
for package_dir in package_directories:
print 'Checking %s ... | Make the script check all the site package directories | Make the script check all the site package directories
| Python | bsd-3-clause | notnmeyer/newrelic-plugin-agent,whiteear/newrelic-plugin-agent,alonisser/newrelic-plugin-agent,NewRelic-Python-Plugins/newrelic-python-agent,alonisser/newrelic-plugin-agent,whiteear/newrelic-plugin-agent,NewRelic-Python-Plugins/newrelic-python-agent,MeetMe/newrelic-plugin-agent,rounds/newrelic-plugin-agent,whiteear/new... | import os
from distutils import sysconfig
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
python_lib_dir = sysconfig.get_python_lib()
fixed = False
for dir_path, dir_names, file_names in os.walk(python_lib_dir):
for dir_name in dir_na... | import os
import site
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
package_directories = site.PREFIXES
if site.USER_SITE:
package_directories.append(site.USER_SITE)
for package_dir in package_directories:
print 'Checking %s ... | <commit_before>import os
from distutils import sysconfig
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
python_lib_dir = sysconfig.get_python_lib()
fixed = False
for dir_path, dir_names, file_names in os.walk(python_lib_dir):
for dir... | import os
import site
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
package_directories = site.PREFIXES
if site.USER_SITE:
package_directories.append(site.USER_SITE)
for package_dir in package_directories:
print 'Checking %s ... | import os
from distutils import sysconfig
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
python_lib_dir = sysconfig.get_python_lib()
fixed = False
for dir_path, dir_names, file_names in os.walk(python_lib_dir):
for dir_name in dir_na... | <commit_before>import os
from distutils import sysconfig
# Check to see if the previous version was installed and clean up
# installed-files.txt
prune = ['var/', 'var/run/', 'var/log/']
python_lib_dir = sysconfig.get_python_lib()
fixed = False
for dir_path, dir_names, file_names in os.walk(python_lib_dir):
for dir... |
a275068193c87c5a27758c17d7699e963a0bdfa8 | llvmpy/src/Support/FormattedStream.py | llvmpy/src/Support/FormattedStream.py | from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
new = Constructor(ref(raw_ostream), cast(bool, Bool))
| from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
_new = Constructor(ref(raw_ostream), cast(bool, Bool))
@CustomPythonStaticMethod
def new(stream, destroy=False):
... | Fix formatted_raw_ostream ownership error with the underlying stream. | Fix formatted_raw_ostream ownership error with the underlying stream.
| Python | bsd-3-clause | llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy | from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
new = Constructor(ref(raw_ostream), cast(bool, Bool))
Fix formatted_raw_ostream ownership error with the underlying stream. | from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
_new = Constructor(ref(raw_ostream), cast(bool, Bool))
@CustomPythonStaticMethod
def new(stream, destroy=False):
... | <commit_before>from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
new = Constructor(ref(raw_ostream), cast(bool, Bool))
<commit_msg>Fix formatted_raw_ostream ownership error w... | from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
_new = Constructor(ref(raw_ostream), cast(bool, Bool))
@CustomPythonStaticMethod
def new(stream, destroy=False):
... | from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
new = Constructor(ref(raw_ostream), cast(bool, Bool))
Fix formatted_raw_ostream ownership error with the underlying stream.f... | <commit_before>from binding import *
from ..namespace import llvm
from raw_ostream import raw_ostream
@llvm.Class(raw_ostream)
class formatted_raw_ostream:
_include_ = 'llvm/Support/FormattedStream.h'
new = Constructor(ref(raw_ostream), cast(bool, Bool))
<commit_msg>Fix formatted_raw_ostream ownership error w... |
4f8aed6ed3491e62911619eaa9aa4b86b30065e4 | leonardo/module/leonardo_auth/widget/userlogin/models.py | leonardo/module/leonardo_auth/widget/userlogin/models.py | # -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbose_name=_(
... | # -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbose_name=_(
... | Fix missing next in context. | Fix missing next in context.
| Python | bsd-3-clause | django-leonardo/django-leonardo,django-leonardo/django-leonardo,django-leonardo/django-leonardo,django-leonardo/django-leonardo | # -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbose_name=_(
... | # -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbose_name=_(
... | <commit_before># -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbos... | # -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbose_name=_(
... | # -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbose_name=_(
... | <commit_before># -#- coding: utf-8 -#-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget
LOGIN_TYPE_CHOICES = (
(1, _("Admin")),
(2, _("Public")),
)
class UserLoginWidget(Widget):
type = models.PositiveIntegerField(verbos... |
ba378a1c151017ad6bd3ab6351fdbf534c731229 | vanth/main.py | vanth/main.py | import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.connection.store(eng... | import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.connection.store(eng... | Make SGML less chatty in normal operation | Make SGML less chatty in normal operation
| Python | agpl-3.0 | EliRibble/vanth,EliRibble/vanth,EliRibble/vanth,EliRibble/vanth | import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.connection.store(eng... | import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.connection.store(eng... | <commit_before>import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.conne... | import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.connection.store(eng... | import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.connection.store(eng... | <commit_before>import logging
import os
import chryso.connection
import sepiida.config
import sepiida.log
import vanth.config
import vanth.server
import vanth.tables
LOGGER = logging.getLogger(__name__)
def create_db_connection(config):
engine = chryso.connection.Engine(config.db, vanth.tables)
chryso.conne... |
3c12a453a9686e998662fea822f85fb307f1d746 | emma2/msm/flux/__init__.py | emma2/msm/flux/__init__.py | from .api import *
| r"""
===================================================================
flux - Reactive flux an transition pathways (:mod:`emma2.msm.flux`)
===================================================================
.. currentmodule:: emma2.msm.flux
This module contains functions to compute reactive flux networks and
find ... | Include flux package in doc | [msm/flux] Include flux package in doc
| Python | bsd-2-clause | arokem/PyEMMA,trendelkampschroer/PyEMMA,trendelkampschroer/PyEMMA,arokem/PyEMMA | from .api import *
[msm/flux] Include flux package in doc | r"""
===================================================================
flux - Reactive flux an transition pathways (:mod:`emma2.msm.flux`)
===================================================================
.. currentmodule:: emma2.msm.flux
This module contains functions to compute reactive flux networks and
find ... | <commit_before>from .api import *
<commit_msg>[msm/flux] Include flux package in doc<commit_after> | r"""
===================================================================
flux - Reactive flux an transition pathways (:mod:`emma2.msm.flux`)
===================================================================
.. currentmodule:: emma2.msm.flux
This module contains functions to compute reactive flux networks and
find ... | from .api import *
[msm/flux] Include flux package in docr"""
===================================================================
flux - Reactive flux an transition pathways (:mod:`emma2.msm.flux`)
===================================================================
.. currentmodule:: emma2.msm.flux
This module conta... | <commit_before>from .api import *
<commit_msg>[msm/flux] Include flux package in doc<commit_after>r"""
===================================================================
flux - Reactive flux an transition pathways (:mod:`emma2.msm.flux`)
===================================================================
.. currentm... |
79bb94f51cd2dca65479cb39f6c365c4c372b0ca | forumuser/models.py | forumuser/models.py | from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
'email': self.email
}
| from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
items_per_page = models.PositiveSmallIntegerField(blank=True, null=True)
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
... | Add items per page as a preference to the forumm user model | Add items per page as a preference to the forumm user model
| Python | mit | hellsgate1001/thatforum_django,hellsgate1001/thatforum_django,hellsgate1001/thatforum_django | from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
'email': self.email
}
Add items per page as a preference to the for... | from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
items_per_page = models.PositiveSmallIntegerField(blank=True, null=True)
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
... | <commit_before>from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
'email': self.email
}
<commit_msg>Add items per page... | from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
items_per_page = models.PositiveSmallIntegerField(blank=True, null=True)
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
... | from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
'email': self.email
}
Add items per page as a preference to the for... | <commit_before>from django.contrib.auth.models import AbstractUser, Group
from django.db import models
class ForumUser(AbstractUser):
def __unicode__(self):
return '%(username)s (%(email)s)' % {
'username': self.username,
'email': self.email
}
<commit_msg>Add items per page... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.