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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41df71518ba23460194194cb82d9dbb183afcc19 | gtlaunch.py | gtlaunch.py | #/usr/bin/env python
import json
import os
import subprocess
def run():
with open('gtlaunch.json', 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(project['cwd'])])
for idx, tab in e... | #/usr/bin/env python
import argparse
import json
import os
import subprocess
def run(args):
with open(os.path.expanduser(args.config), 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(pro... | Use argparse to locate config file. | Use argparse to locate config file.
| Python | mit | GoldenLine/gtlaunch | #/usr/bin/env python
import json
import os
import subprocess
def run():
with open('gtlaunch.json', 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(project['cwd'])])
for idx, tab in e... | #/usr/bin/env python
import argparse
import json
import os
import subprocess
def run(args):
with open(os.path.expanduser(args.config), 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(pro... | <commit_before>#/usr/bin/env python
import json
import os
import subprocess
def run():
with open('gtlaunch.json', 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(project['cwd'])])
fo... | #/usr/bin/env python
import argparse
import json
import os
import subprocess
def run(args):
with open(os.path.expanduser(args.config), 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(pro... | #/usr/bin/env python
import json
import os
import subprocess
def run():
with open('gtlaunch.json', 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(project['cwd'])])
for idx, tab in e... | <commit_before>#/usr/bin/env python
import json
import os
import subprocess
def run():
with open('gtlaunch.json', 'r') as fp:
config = json.load(fp)
project = config['test']
args = ['gnome-terminal', '--maximize']
args.extend(['--working-directory', os.path.expanduser(project['cwd'])])
fo... |
7531fbb5cea5ef71f75e344c6a9e84e05377573a | jarn/mkrelease/process.py | jarn/mkrelease/process.py | import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = echo2 = False
... | import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = echo2 = False
... | Remove NotEmpty filter from Process.system. | Remove NotEmpty filter from Process.system.
| Python | bsd-2-clause | Jarn/jarn.mkrelease | import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = echo2 = False
... | import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = echo2 = False
... | <commit_before>import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = ec... | import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = echo2 = False
... | import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = echo2 = False
... | <commit_before>import os
import tee
class Process(object):
"""Process related functions using the tee module (mostly)."""
def __init__(self, quiet=False, env=None):
self.quiet = quiet
self.env = env
def popen(self, cmd, echo=True, echo2=True):
if self.quiet:
echo = ec... |
3864ef6773000d516ee6542a11db3c3b636d5b49 | test/framework/killer.py | test/framework/killer.py | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
def _killer(pid, sleep_time, num_kills):
print("\nKiller going to sleep for", sleep_time, "sec... | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
sys.path.append('../../..')
from jenkinsflow.mocked import hyperspeed
def _killer(pid, sleep_time... | Prepare kill test for mock - use hyperspeed | Prepare kill test for mock - use hyperspeed
| Python | bsd-3-clause | lhupfeldt/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
def _killer(pid, sleep_time, num_kills):
print("\nKiller going to sleep for", sleep_time, "sec... | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
sys.path.append('../../..')
from jenkinsflow.mocked import hyperspeed
def _killer(pid, sleep_time... | <commit_before># Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
def _killer(pid, sleep_time, num_kills):
print("\nKiller going to sleep for", s... | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
sys.path.append('../../..')
from jenkinsflow.mocked import hyperspeed
def _killer(pid, sleep_time... | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
def _killer(pid, sleep_time, num_kills):
print("\nKiller going to sleep for", sleep_time, "sec... | <commit_before># Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from __future__ import print_function
import sys, os, signal, time, subprocess32
def _killer(pid, sleep_time, num_kills):
print("\nKiller going to sleep for", s... |
7d9e3dd9a3eca107ddcdb7304e0b0c3f61b0af18 | test/mitmproxy/addons/test_intercept.py | test/mitmproxy/addons/test_intercept.py | import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept="~q")
a... | import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept="~q")
a... | Add tests for TCP flow interception | Add tests for TCP flow interception
| Python | mit | mitmproxy/mitmproxy,mitmproxy/mitmproxy,mhils/mitmproxy,vhaupert/mitmproxy,Kriechi/mitmproxy,mitmproxy/mitmproxy,Kriechi/mitmproxy,mhils/mitmproxy,Kriechi/mitmproxy,mhils/mitmproxy,vhaupert/mitmproxy,Kriechi/mitmproxy,mitmproxy/mitmproxy,mitmproxy/mitmproxy,mhils/mitmproxy,vhaupert/mitmproxy,mhils/mitmproxy,vhaupert/mi... | import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept="~q")
a... | import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept="~q")
a... | <commit_before>import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept=... | import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept="~q")
a... | import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept="~q")
a... | <commit_before>import pytest
from mitmproxy.addons import intercept
from mitmproxy import exceptions
from mitmproxy.test import taddons
from mitmproxy.test import tflow
def test_simple():
r = intercept.Intercept()
with taddons.context(r) as tctx:
assert not r.filt
tctx.configure(r, intercept=... |
ca4a312e09138d295932d200cebf787b911cd2b2 | blog/tests.py | blog/tests.py | from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
def test_p... | from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
def test_p... | Test fail not to deploy | Test fail not to deploy
| Python | mit | graycarl/iamhhb,graycarl/iamhhb,graycarl/iamhhb,graycarl/iamhhb | from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
def test_p... | from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
def test_p... | <commit_before>from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
... | from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
def test_p... | from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
def test_p... | <commit_before>from django.test import TestCase
from django.urls import reverse
from .models import Post
# Create your tests here.
class PostModelTest(TestCase):
def test_render_markdown(self):
p = Post(content='aa')
self.assertEqual(p.html_content, '<p>aa</p>\n')
class PostViewTest(TestCase):
... |
ae600fdf602d12f1a2f8082df49693117fba2596 | test/test_cxx_imports.py | test/test_cxx_imports.py | def test_cxx_import():
from microscopes.mixture.model import \
state, fixed_state, \
bind, bind_fixed, \
initialize, initialize_fixed, \
deserialize, deserialize_fixed
assert state and fixed_state
assert bind and bind_fixed
assert initialize and initialize_fixed
asser... | def test_cxx_import():
from microscopes.mixture.model import \
state, \
bind, \
initialize, \
deserialize
assert state
assert bind
assert initialize
assert deserialize
| Remove fixed references from test_cxx.py | Remove fixed references from test_cxx.py
| Python | bsd-3-clause | datamicroscopes/mixturemodel,datamicroscopes/mixturemodel,datamicroscopes/mixturemodel | def test_cxx_import():
from microscopes.mixture.model import \
state, fixed_state, \
bind, bind_fixed, \
initialize, initialize_fixed, \
deserialize, deserialize_fixed
assert state and fixed_state
assert bind and bind_fixed
assert initialize and initialize_fixed
asser... | def test_cxx_import():
from microscopes.mixture.model import \
state, \
bind, \
initialize, \
deserialize
assert state
assert bind
assert initialize
assert deserialize
| <commit_before>def test_cxx_import():
from microscopes.mixture.model import \
state, fixed_state, \
bind, bind_fixed, \
initialize, initialize_fixed, \
deserialize, deserialize_fixed
assert state and fixed_state
assert bind and bind_fixed
assert initialize and initialize_... | def test_cxx_import():
from microscopes.mixture.model import \
state, \
bind, \
initialize, \
deserialize
assert state
assert bind
assert initialize
assert deserialize
| def test_cxx_import():
from microscopes.mixture.model import \
state, fixed_state, \
bind, bind_fixed, \
initialize, initialize_fixed, \
deserialize, deserialize_fixed
assert state and fixed_state
assert bind and bind_fixed
assert initialize and initialize_fixed
asser... | <commit_before>def test_cxx_import():
from microscopes.mixture.model import \
state, fixed_state, \
bind, bind_fixed, \
initialize, initialize_fixed, \
deserialize, deserialize_fixed
assert state and fixed_state
assert bind and bind_fixed
assert initialize and initialize_... |
dea384bf25e48c0f9a5dd7bc324a1a611e41c7dd | flask_jq.py | flask_jq.py | from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callbac... | from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callbac... | Add route for commenting page test | Add route for commenting page test
| Python | mit | avidas/flask-jquery,avidas/flask-jquery,avidas/flask-jquery | from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callbac... | from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callbac... | <commit_before>from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', Fals... | from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callbac... | from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', False)
if callbac... | <commit_before>from flask import Flask, jsonify, render_template, request, current_app, redirect, flash
from functools import wraps
import json
app = Flask(__name__)
def jsonp(f):
'''Wrap JSONified output for JSONP'''
@wraps(f)
def decorated_function(*args, **kwargs):
callback = request.args.get('callback', Fals... |
1685dcf871e529220f98f92a75833c388223f2c8 | features.py | features.py | from re import search
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content'):
def result(datum):
if search(substring, datum.__dict__[field]):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):
return [str(len(datum.content) % 8)... | from re import search, IGNORECASE
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content', flags=IGNORECASE):
def result(datum):
if search(substring, datum.__dict__[field], flags):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):... | Allow for case insensitivity (and any other flag). | Allow for case insensitivity (and any other flag).
| Python | isc | aftran/classify-outbreak | from re import search
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content'):
def result(datum):
if search(substring, datum.__dict__[field]):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):
return [str(len(datum.content) % 8)... | from re import search, IGNORECASE
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content', flags=IGNORECASE):
def result(datum):
if search(substring, datum.__dict__[field], flags):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):... | <commit_before>from re import search
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content'):
def result(datum):
if search(substring, datum.__dict__[field]):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):
return [str(len(datu... | from re import search, IGNORECASE
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content', flags=IGNORECASE):
def result(datum):
if search(substring, datum.__dict__[field], flags):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):... | from re import search
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content'):
def result(datum):
if search(substring, datum.__dict__[field]):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):
return [str(len(datum.content) % 8)... | <commit_before>from re import search
"Some baseline features for testing the classifier."
def make_searcher(substring, field='content'):
def result(datum):
if search(substring, datum.__dict__[field]):
return ['has_substring_' + substring]
else:
return []
return result
def f2(datum):
return [str(len(datu... |
04fcf7d4e4cb0abefd4f6bd4ab0c1b034d43c111 | dbcollection/__init__.py | dbcollection/__init__.py | """
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows for huge datase... | """
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows for huge datase... | Improve visually how methods are Imported | Improve visually how methods are Imported
| Python | mit | farrajota/dbcollection,dbcollection/dbcollection | """
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows for huge datase... | """
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows for huge datase... | <commit_before>"""
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows ... | """
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows for huge datase... | """
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows for huge datase... | <commit_before>"""
Dataset collection package.
This package allows to easily manage and load pre-processed datasets in an easy
way by using hdf5 files as metadata storage. By storing all the necessary metadata
on disk, memory RAM can be allocated to other functionalities without noticable
performance lost, and allows ... |
ddc6a446a5b728d0ae6190cfca5b8962cac89b7c | twisted/plugins/vumi_worker_starter.py | twisted/plugins/vumi_worker_starter.py | from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IServiceMaker, IP... | from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IServiceMaker, IP... | Make vumi worker service available as vumi_worker and deprecate start_worker. | Make vumi worker service available as vumi_worker and deprecate start_worker.
| Python | bsd-3-clause | TouK/vumi,harrissoerja/vumi,TouK/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix | from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IServiceMaker, IP... | from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IServiceMaker, IP... | <commit_before>from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IS... | from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IServiceMaker, IP... | from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IServiceMaker, IP... | <commit_before>from zope.interface import implements
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from vumi.start_worker import VumiService, StartWorkerOptions
# This create the service, runnable on command line with twistd
class VumiServiceMaker(object):
implements(IS... |
380f565231997353faa30f77bbe84d0ed6bbf009 | pal/services/__init__.py | pal/services/__init__.py | # from .directory_service import DirectoryService
from .omdb_service import OMDBService
ALL_SERVICES = [
# DirectoryService()
OMDBService()
]
| from .directory_service import DirectoryService
# from .omdb_service import OMDBService
ALL_SERVICES = [
DirectoryService()
# OMDBService()
]
| Make directory service the only service | Make directory service the only service
| Python | bsd-3-clause | Machyne/pal,Machyne/pal,Machyne/pal,Machyne/pal | # from .directory_service import DirectoryService
from .omdb_service import OMDBService
ALL_SERVICES = [
# DirectoryService()
OMDBService()
]
Make directory service the only service | from .directory_service import DirectoryService
# from .omdb_service import OMDBService
ALL_SERVICES = [
DirectoryService()
# OMDBService()
]
| <commit_before># from .directory_service import DirectoryService
from .omdb_service import OMDBService
ALL_SERVICES = [
# DirectoryService()
OMDBService()
]
<commit_msg>Make directory service the only service<commit_after> | from .directory_service import DirectoryService
# from .omdb_service import OMDBService
ALL_SERVICES = [
DirectoryService()
# OMDBService()
]
| # from .directory_service import DirectoryService
from .omdb_service import OMDBService
ALL_SERVICES = [
# DirectoryService()
OMDBService()
]
Make directory service the only servicefrom .directory_service import DirectoryService
# from .omdb_service import OMDBService
ALL_SERVICES = [
DirectoryService()
... | <commit_before># from .directory_service import DirectoryService
from .omdb_service import OMDBService
ALL_SERVICES = [
# DirectoryService()
OMDBService()
]
<commit_msg>Make directory service the only service<commit_after>from .directory_service import DirectoryService
# from .omdb_service import OMDBService
... |
f374ac8bb3789ed533a2371eae78a9f98e1def60 | tests/integrations/current/test_read.py | tests/integrations/current/test_read.py | import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
| import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
def test_read_from_a_file(self):
with open("%s/current/testing" % self.mount_path) as f:
ass... | Test file reading for current view | Test file reading for current view
| Python | apache-2.0 | PressLabs/gitfs,ksmaheshkumar/gitfs,bussiere/gitfs,rowhit/gitfs,PressLabs/gitfs | import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
Test file reading for current view | import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
def test_read_from_a_file(self):
with open("%s/current/testing" % self.mount_path) as f:
ass... | <commit_before>import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
<commit_msg>Test file reading for current view<commit_after> | import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
def test_read_from_a_file(self):
with open("%s/current/testing" % self.mount_path) as f:
ass... | import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
Test file reading for current viewimport os
from tests.integrations.base import BaseTest
class TestReadCurrentView... | <commit_before>import os
from tests.integrations.base import BaseTest
class TestReadCurrentView(BaseTest):
def test_listdirs(self):
assert os.listdir("%s/current" % self.mount_path) == ['testing', 'me']
<commit_msg>Test file reading for current view<commit_after>import os
from tests.integrations.base im... |
c4f51fd3c030f3d88f8545a94698ed4e9f5ef9bc | timpani/webserver/webhelpers.py | timpani/webserver/webhelpers.py | import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.request.url).path
re... | import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.request.url).path
re... | Remove unneeded recoverFromRedirect and add markRedirectAsRecovered | Remove unneeded recoverFromRedirect and add markRedirectAsRecovered
| Python | mit | ollien/Timpani,ollien/Timpani,ollien/Timpani | import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.request.url).path
re... | import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.request.url).path
re... | <commit_before>import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.reques... | import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.request.url).path
re... | import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.request.url).path
re... | <commit_before>import flask
from .. import auth
import urllib.parse
def checkForSession():
if "uid" in flask.session:
session = auth.validateSession(flask.session["uid"])
if session != None:
return session
return None
def redirectAndSave(path):
flask.session["donePage"] = urllib.parse.urlparse(flask.reques... |
a017c75c7e2b8915cd2ab0bce29a0ed68c306f38 | get_data.py | get_data.py | import urllib, json
import numpy as np
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
return data
d... | import urllib, json
import numpy as np
import time
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
re... | Save the data fron cron | Save the data fron cron
| Python | mit | Evarin/velib-exp | import urllib, json
import numpy as np
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
return data
d... | import urllib, json
import numpy as np
import time
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
re... | <commit_before>import urllib, json
import numpy as np
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
... | import urllib, json
import numpy as np
import time
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
re... | import urllib, json
import numpy as np
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
return data
d... | <commit_before>import urllib, json
import numpy as np
from secrets import API_KEY # JCDECAUX's API KEY
def retrieve_data(contract="paris"):
url = "https://api.jcdecaux.com/vls/v1/stations?apiKey={}&contract={}".format(API_KEY, contract)
response = urllib.urlopen(url)
data = json.loads(response.read())
... |
34abe198ccfb906735e68ae95ad36e603a4001ca | integration-test/1147-bicycle-ramps.py | integration-test/1147-bicycle-ramps.py | # Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# Footway with ram... | # Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# Footway with ram... | Use z16 test to ensure no merging is done which would remove the id. | Use z16 test to ensure no merging is done which would remove the id.
| Python | mit | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | # Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# Footway with ram... | # Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# Footway with ram... | <commit_before># Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# F... | # Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# Footway with ram... | # Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# Footway with ram... | <commit_before># Add ramp properties to paths in roads layer
# Steps with ramp:bicycle=yes in Copenhagen
# https://www.openstreetmap.org/way/91275149
assert_has_feature(
15, 17527, 10257, 'roads',
{ 'id': 91275149, 'kind': 'path', 'kind_detail': 'steps', 'is_bicycle_related': True, 'ramp_bicycle': 'yes'})
# F... |
1e16c3810e41df7a4d6273750c713c086ad82c14 | weaveserver/core/plugins/virtualenv.py | weaveserver/core/plugins/virtualenv.py | import os
import subprocess
import virtualenv
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def install(self, requirements_file=None):
if os.path.exists(self.venv_home):
return True
virtualenv.create_environment(self.venv_home)
... | import os
import subprocess
import virtualenv
def execute_file(path):
global_vars = {"__file__": path}
with open(path, 'rb') as pyfile:
exec(compile(pyfile.read(), path, 'exec'), global_vars)
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def inst... | Replace execfile with something compatible with both Py2/3. | Replace execfile with something compatible with both Py2/3.
| Python | mit | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | import os
import subprocess
import virtualenv
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def install(self, requirements_file=None):
if os.path.exists(self.venv_home):
return True
virtualenv.create_environment(self.venv_home)
... | import os
import subprocess
import virtualenv
def execute_file(path):
global_vars = {"__file__": path}
with open(path, 'rb') as pyfile:
exec(compile(pyfile.read(), path, 'exec'), global_vars)
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def inst... | <commit_before>import os
import subprocess
import virtualenv
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def install(self, requirements_file=None):
if os.path.exists(self.venv_home):
return True
virtualenv.create_environment(self.venv... | import os
import subprocess
import virtualenv
def execute_file(path):
global_vars = {"__file__": path}
with open(path, 'rb') as pyfile:
exec(compile(pyfile.read(), path, 'exec'), global_vars)
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def inst... | import os
import subprocess
import virtualenv
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def install(self, requirements_file=None):
if os.path.exists(self.venv_home):
return True
virtualenv.create_environment(self.venv_home)
... | <commit_before>import os
import subprocess
import virtualenv
class VirtualEnvManager(object):
def __init__(self, path):
self.venv_home = path
def install(self, requirements_file=None):
if os.path.exists(self.venv_home):
return True
virtualenv.create_environment(self.venv... |
c673c562836c207d25d799bfd9e7189a25f51fea | tests/test_swagger-tester.py | tests/test_swagger-tester.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localhost"""
s = s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import time
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localhost"... | Make sure the server has starded before launching tests | Make sure the server has starded before launching tests
| Python | mit | Trax-air/swagger-tester | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localhost"""
s = s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import time
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localhost"... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localho... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import time
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localhost"... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localhost"""
s = s... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import socket
import threading
import connexion
from swagger_tester import swagger_test
def test_swagger_test():
swagger_test(os.path.join(os.path.dirname(__file__), 'swagger.yaml'))
def get_open_port():
"""Get an open port on localho... |
fb8fb61303dd567038ca812a61e6702b8b3f4edc | tests/test_exceptions.py | tests/test_exceptions.py | # -*- coding: utf-8 -*-
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
exceptions.CookiecutterException('Errors should never pass silently'),
{'cookiecutter': {'foo': ... | # -*- coding: utf-8 -*-
from jinja2.exceptions import UndefinedError
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
UndefinedError('Errors should never pass silently'),
... | Create a jinja2 error in the test to ensure it has a message attribute | Create a jinja2 error in the test to ensure it has a message attribute
| Python | bsd-3-clause | hackebrot/cookiecutter,dajose/cookiecutter,dajose/cookiecutter,willingc/cookiecutter,audreyr/cookiecutter,Springerle/cookiecutter,terryjbates/cookiecutter,hackebrot/cookiecutter,Springerle/cookiecutter,willingc/cookiecutter,pjbull/cookiecutter,stevepiercy/cookiecutter,michaeljoseph/cookiecutter,luzfcb/cookiecutter,audr... | # -*- coding: utf-8 -*-
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
exceptions.CookiecutterException('Errors should never pass silently'),
{'cookiecutter': {'foo': ... | # -*- coding: utf-8 -*-
from jinja2.exceptions import UndefinedError
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
UndefinedError('Errors should never pass silently'),
... | <commit_before># -*- coding: utf-8 -*-
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
exceptions.CookiecutterException('Errors should never pass silently'),
{'cookiecu... | # -*- coding: utf-8 -*-
from jinja2.exceptions import UndefinedError
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
UndefinedError('Errors should never pass silently'),
... | # -*- coding: utf-8 -*-
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
exceptions.CookiecutterException('Errors should never pass silently'),
{'cookiecutter': {'foo': ... | <commit_before># -*- coding: utf-8 -*-
from cookiecutter import exceptions
def test_undefined_variable_to_str():
undefined_var_error = exceptions.UndefinedVariableInTemplate(
'Beautiful is better than ugly',
exceptions.CookiecutterException('Errors should never pass silently'),
{'cookiecu... |
031e7e584a6566586c1ee7758a4f619bb161f4cd | utils/parse_worksheet.py | utils/parse_worksheet.py | def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
| def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
def parse_worksheet():
pass
| Add code to fix failing test | Add code to fix failing test
| Python | mit | jdgillespie91/trackerSpend,jdgillespie91/trackerSpend | def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
Add code to fix failing test | def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
def parse_worksheet():
pass
| <commit_before>def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
<commit_msg>Add code to fix failing test<commit_after> | def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
def parse_worksheet():
pass
| def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
Add code to fix failing testdef __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
def parse_worksheet():
pass
| <commit_before>def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
<commit_msg>Add code to fix failing test<commit_after>def __open_worksheet():
pass
def __get_data():
pass
def __write_data():
pass
def parse_worksheet():
pass
|
bb4bff73a1eefad6188f1d1544f3b4106b606d36 | driller/LibcSimProc.py | driller/LibcSimProc.py | import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... | import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... | Update libc's DrillerRead to use the new posix read calling convention to support variable read | Update libc's DrillerRead to use the new posix read calling convention to support variable read
| Python | bsd-2-clause | shellphish/driller | import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... | import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... | <commit_before>import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... | import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... | import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... | <commit_before>import simuvex
from simuvex.s_type import SimTypeFd, SimTypeChar, SimTypeArray, SimTypeLength
class DrillerRead(simuvex.SimProcedure):
'''
A custom version of read which has a symbolic return value.
'''
def run(self, fd, dst, length):
self.argument_types = {0: SimTypeFd(),
... |
d01217875a1c720b3c6fabe05fd3b0c2b0d3b287 | qtpy/QtWebEngineQuick.py | qtpy/QtWebEngineQuick.py | # -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtWebEngineQuick c... | # -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtWebEngineQuick c... | Replace generic PythonQtError with QtModuleNotInstalledError | Replace generic PythonQtError with QtModuleNotInstalledError
| Python | mit | spyder-ide/qtpy | # -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtWebEngineQuick c... | # -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtWebEngineQuick c... | <commit_before># -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtW... | # -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtWebEngineQuick c... | # -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtWebEngineQuick c... | <commit_before># -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""
Provides QtW... |
d7598e96ba5bd0bb53635a62b61df077280967cc | jenkins/scripts/xstatic_check_version.py | jenkins/scripts/xstatic_check_version.py | #! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | #! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | Fix script to include repos in PYTHONPATH | Fix script to include repos in PYTHONPATH
The repos checkout needs to be in the PYTHONPATH for the
import of the xstatic module to work. Since we invoke
the xstatic_check_version.py by absolute path, Python
does not include the cwd() in the PYTHONPATH.
Change-Id: Idd4f8db6334c9f29168e3bc39de3ed95a4e1c60f
| Python | apache-2.0 | dongwenjuan/project-config,Tesora/tesora-project-config,dongwenjuan/project-config,openstack-infra/project-config,openstack-infra/project-config,Tesora/tesora-project-config | #! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | #! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | <commit_before>#! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | #! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | #! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | <commit_before>#! /usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
ec85333da83e1c7de16dd7a5a3551dc9a1f660b4 | mediachain/reader/main.py | mediachain/reader/main.py | import sys
import argparse
import os
import mediachain.reader.api
from mediachain.reader.api import Config
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader CLI'
)
... | import sys
import argparse
import os
import mediachain.reader.api
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader CLI'
)
parser.add_argument('-h', '--host',
... | Remove ref to dead Config class | Remove ref to dead Config class
| Python | mit | mediachain/mediachain-client,mediachain/mediachain-client | import sys
import argparse
import os
import mediachain.reader.api
from mediachain.reader.api import Config
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader CLI'
)
... | import sys
import argparse
import os
import mediachain.reader.api
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader CLI'
)
parser.add_argument('-h', '--host',
... | <commit_before>import sys
import argparse
import os
import mediachain.reader.api
from mediachain.reader.api import Config
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader ... | import sys
import argparse
import os
import mediachain.reader.api
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader CLI'
)
parser.add_argument('-h', '--host',
... | import sys
import argparse
import os
import mediachain.reader.api
from mediachain.reader.api import Config
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader CLI'
)
... | <commit_before>import sys
import argparse
import os
import mediachain.reader.api
from mediachain.reader.api import Config
def main(arguments=None):
if arguments == None:
arguments = sys.argv[1:]
parser = argparse.ArgumentParser(
prog='mediachain-reader',
description='Mediachain Reader ... |
a2af3446bbb9ff2cc46fdde4a96c539f57a972f9 | tests/integration/directconnect/test_directconnect.py | tests/integration/directconnect/test_directconnect.py | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights... | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights... | Fix integration test for Python 2.6 | Fix integration test for Python 2.6
| Python | mit | Asana/boto,vijaylbais/boto,felix-d/boto,zachmullen/boto,vishnugonela/boto,weka-io/boto,revmischa/boto,weebygames/boto,nexusz99/boto,TiVoMaker/boto,garnaat/boto,alex/boto,ocadotechnology/boto,campenberger/boto,alex/boto,ddzialak/boto,awatts/boto,appneta/boto,clouddocx/boto,disruptek/boto,j-carl/boto,kouk/boto,darjus-amz... | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights... | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights... | <commit_before># Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# 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 limita... | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights... | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights... | <commit_before># Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# 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 limita... |
3b1a04b20dee933792f3f9da78c2d76941beb54f | davstorage/storage.py | davstorage/storage.py | from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trailing_slash(inte... | from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trailing_slash(inte... | Handle situation where dav does not send length | Handle situation where dav does not send length
| Python | bsd-2-clause | oinopion/davstorage,oinopion/davstorage,oinopion/davstorage | from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trailing_slash(inte... | from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trailing_slash(inte... | <commit_before>from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trai... | from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trailing_slash(inte... | from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trailing_slash(inte... | <commit_before>from __future__ import unicode_literals
import requests
from django.core.files import File
from django.core.files.storage import Storage
from davstorage.utils import trim_trailing_slash
class DavStorage(Storage):
def __init__(self, internal_url, external_url):
self._internal_url = trim_trai... |
eb4c308bbe2824acc1016be761dd2a9713a909a3 | vlcclient/vlcmessages.py | vlcclient/vlcmessages.py | '''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcast input "' + in... | '''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcast input "' + in... | Include all audio, video and subtitles streams | Include all audio, video and subtitles streams
| Python | mit | deseven/aceproxy,pepsik-kiev/aceproxy,cosynus/python,Ivshti/aceproxy,ValdikSS/aceproxy | '''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcast input "' + in... | '''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcast input "' + in... | <commit_before>'''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcas... | '''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcast input "' + in... | '''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcast input "' + in... | <commit_before>'''
Minimal VLC client for AceProxy. Messages class.
'''
class VlcMessage(object):
class request(object):
SHUTDOWN = 'shutdown'
@staticmethod
def startBroadcast(stream_name, input, out_port, muxer='ts', pre_access=''):
return 'new "' + stream_name + '" broadcas... |
4df17e8a4d4ce48fac9c66876dc4aeb981044655 | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | Test suite requires me to spell contenttypes correctly | Test suite requires me to spell contenttypes correctly
| Python | apache-2.0 | budlight/django-bitfield,mattcaldwell/django-bitfield,joshowen/django-bitfield,disqus/django-bitfield,moggers87/django-bitfield,Elec/django-bitfield | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | <commit_before>#!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'djang... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | <commit_before>#!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'djang... |
c8c0f6ec8abbcc845df38bfbba36b5ae916f77cd | vinotes/apps/api/urls.py | vinotes/apps/api/urls.py | from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.NoteDetail.as_view()),
url(r'^traits/$', views.TraitList.as_view()),
url(r'^traits/(?P<pk... | from django.conf.urls import include, url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.Note... | Add login to browsable API. | Add login to browsable API.
| Python | unlicense | rcutmore/vinotes-api,rcutmore/vinotes-api | from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.NoteDetail.as_view()),
url(r'^traits/$', views.TraitList.as_view()),
url(r'^traits/(?P<pk... | from django.conf.urls import include, url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.Note... | <commit_before>from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.NoteDetail.as_view()),
url(r'^traits/$', views.TraitList.as_view()),
url(r... | from django.conf.urls import include, url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.Note... | from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.NoteDetail.as_view()),
url(r'^traits/$', views.TraitList.as_view()),
url(r'^traits/(?P<pk... | <commit_before>from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
urlpatterns = [
url(r'^notes/$', views.NoteList.as_view()),
url(r'^notes/(?P<pk>[0-9]+)/$', views.NoteDetail.as_view()),
url(r'^traits/$', views.TraitList.as_view()),
url(r... |
2e4b4afd3b70543df7c72b81ce5c5318d00e3ff3 | opps/sitemaps/sitemaps.py | opps/sitemaps/sitemaps.py | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
container = Container.objects.filter(date... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
containers = Contai... | Fix var name, is plural in site map | Fix var name, is plural in site map
| Python | mit | jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
container = Container.objects.filter(date... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
containers = Contai... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
container = Container.obje... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
containers = Contai... | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
container = Container.objects.filter(date... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone
from opps.containers.models import Container
def InfoDisct(googlenews=False):
container = Container.obje... |
b3808c39c942bcc2c1701a1dcb61db47c69f1daa | notebooks/machine_learning/track_meta.py | notebooks/machine_learning/track_meta.py | # See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='How Models Work'),
dict(topic='Explore Your Data')
]
notebooks = [
dict(
filename='tut1.ipynb',
lesson_idx=0,
type='tu... | # See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='how models work'),
dict(topic='exploring your data'),
dict(topic='building your first machine learning model'),
]
notebooks = [
dict(
... | Add third lesson and reword lesson topics | Add third lesson and reword lesson topics
| Python | apache-2.0 | Kaggle/learntools,Kaggle/learntools | # See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='How Models Work'),
dict(topic='Explore Your Data')
]
notebooks = [
dict(
filename='tut1.ipynb',
lesson_idx=0,
type='tu... | # See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='how models work'),
dict(topic='exploring your data'),
dict(topic='building your first machine learning model'),
]
notebooks = [
dict(
... | <commit_before># See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='How Models Work'),
dict(topic='Explore Your Data')
]
notebooks = [
dict(
filename='tut1.ipynb',
lesson_idx=0,
... | # See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='how models work'),
dict(topic='exploring your data'),
dict(topic='building your first machine learning model'),
]
notebooks = [
dict(
... | # See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='How Models Work'),
dict(topic='Explore Your Data')
]
notebooks = [
dict(
filename='tut1.ipynb',
lesson_idx=0,
type='tu... | <commit_before># See also examples/example_track/example_meta.py for a longer, commented example
track = dict(
author_username='dansbecker',
)
lessons = [
dict(topic='How Models Work'),
dict(topic='Explore Your Data')
]
notebooks = [
dict(
filename='tut1.ipynb',
lesson_idx=0,
... |
9a9100e201603e185965fff94de92db13caf45ae | wagtail/images/checks.py | wagtail/images/checks.py | import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") as f:
t... | import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") as f:
t... | Remove broken reference to Image.LoaderError | Remove broken reference to Image.LoaderError
This exception has not existed since Willow 0.3. Type checking on the 'except' line only happens when an exception occurs, so most of the time this is harmless, but if an unrelated exception occurs here (such as that caused by a faulty filetype library: https://github.com/h... | Python | bsd-3-clause | wagtail/wagtail,wagtail/wagtail,zerolab/wagtail,zerolab/wagtail,thenewguy/wagtail,wagtail/wagtail,rsalmaso/wagtail,wagtail/wagtail,rsalmaso/wagtail,thenewguy/wagtail,thenewguy/wagtail,rsalmaso/wagtail,thenewguy/wagtail,wagtail/wagtail,rsalmaso/wagtail,thenewguy/wagtail,zerolab/wagtail,zerolab/wagtail,zerolab/wagtail,rs... | import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") as f:
t... | import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") as f:
t... | <commit_before>import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") ... | import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") as f:
t... | import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") as f:
t... | <commit_before>import os
from functools import lru_cache
from django.core.checks import Warning, register
from willow.image import Image
@lru_cache()
def has_jpeg_support():
wagtail_jpg = os.path.join(os.path.dirname(__file__), "check_files", "wagtail.jpg")
succeeded = True
with open(wagtail_jpg, "rb") ... |
090e89aae1a3663646167658dba242222369458f | source/bark/logger/classic.py | source/bark/logger/classic.py | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *name*.'''
... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *name*.'''
... | Add common level convenience methods to Classic logger. | Add common level convenience methods to Classic logger.
| Python | apache-2.0 | 4degrees/sawmill,4degrees/mill | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *name*.'''
... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *name*.'''
... | <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *n... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *name*.'''
... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *name*.'''
... | <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from .base import Logger
class Classic(Logger):
'''Classic logger compatible with standard Python logger.'''
def __init__(self, name, **kw):
'''Initialise logger with identifying *n... |
af072319100be47415613d39c6b2eab22b8b4f34 | froide/helper/utils.py | froide/helper/utils.py | from django.shortcuts import render
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d.html" % code, context,
status=code)
def render_400(request):
retu... | from django.shortcuts import render, redirect
from django.urls import reverse
from django.utils.http import is_safe_url
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d... | Add get_redirect_url and get_redirect helper | Add get_redirect_url and get_redirect helper | Python | mit | stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide | from django.shortcuts import render
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d.html" % code, context,
status=code)
def render_400(request):
retu... | from django.shortcuts import render, redirect
from django.urls import reverse
from django.utils.http import is_safe_url
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d... | <commit_before>from django.shortcuts import render
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d.html" % code, context,
status=code)
def render_400(req... | from django.shortcuts import render, redirect
from django.urls import reverse
from django.utils.http import is_safe_url
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d... | from django.shortcuts import render
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d.html" % code, context,
status=code)
def render_400(request):
retu... | <commit_before>from django.shortcuts import render
def get_next(request):
# This is not a view
return request.GET.get("next", request.META.get("HTTP_REFERER", "/"))
def render_code(code, request, context={}):
return render(request, "%d.html" % code, context,
status=code)
def render_400(req... |
d041c9244a36db5aef29412824e9346aceb53c9f | editorconfig/__init__.py | editorconfig/__init__.py | """
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['handler', 'exceptions', 'main']
__version__ = j... | """
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['get_properties', 'EditorConfigError', 'handler',... | Add get_properties class for simpler plugin usage | Add get_properties class for simpler plugin usage
| Python | bsd-2-clause | VictorBjelkholm/editorconfig-vim,VictorBjelkholm/editorconfig-vim,pocke/editorconfig-vim,dublebuble/editorconfig-gedit,benjifisher/editorconfig-vim,benjifisher/editorconfig-vim,dublebuble/editorconfig-gedit,johnfraney/editorconfig-vim,dublebuble/editorconfig-gedit,VictorBjelkholm/editorconfig-vim,johnfraney/editorconfi... | """
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['handler', 'exceptions', 'main']
__version__ = j... | """
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['get_properties', 'EditorConfigError', 'handler',... | <commit_before>"""
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['handler', 'exceptions', 'main']
... | """
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['get_properties', 'EditorConfigError', 'handler',... | """
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['handler', 'exceptions', 'main']
__version__ = j... | <commit_before>"""
Modules exported by ``editorconfig`` package:
- handler: used by plugins for locating and parsing EditorConfig files
- exceptions: provides special exceptions used by other modules
"""
from versiontools import join_version
VERSION = (0, 9, 0, "alpha")
__all__ = ['handler', 'exceptions', 'main']
... |
898ce6f5c77b6a63b0c34bd2a858483d0cb7083a | schedule.py | schedule.py | #!/usr/bin/python
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Configurable number of enum members
print "(declare-datatypes () ((TEAM "
for i in range(N... | #!/usr/bin/python
# More flexible parameters
NUMROUNDS = 2
NUMMATCHES = 3
# More built in parameters.
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Config... | Prepare to distinct all slots per round. | Prepare to distinct all slots per round.
| Python | bsd-2-clause | jmorse/numbness | #!/usr/bin/python
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Configurable number of enum members
print "(declare-datatypes () ((TEAM "
for i in range(N... | #!/usr/bin/python
# More flexible parameters
NUMROUNDS = 2
NUMMATCHES = 3
# More built in parameters.
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Config... | <commit_before>#!/usr/bin/python
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Configurable number of enum members
print "(declare-datatypes () ((TEAM "
f... | #!/usr/bin/python
# More flexible parameters
NUMROUNDS = 2
NUMMATCHES = 3
# More built in parameters.
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Config... | #!/usr/bin/python
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Configurable number of enum members
print "(declare-datatypes () ((TEAM "
for i in range(N... | <commit_before>#!/usr/bin/python
NUMTEAMS = 12
ROUNDBITS = 4
MATCHBITS = 4
SLOTBITS = 2
print "(set-info :status unknown)"
print "(set-option :produce-models true)"
print "; Logic is now \"Whatever Z3 accepts\" (set-logic AUFBV)"
print ""
# Configurable number of enum members
print "(declare-datatypes () ((TEAM "
f... |
0a73d75d5b58c3326d248875cac46ab1bc95bea3 | viper/parser/grammar_parsing/production.py | viper/parser/grammar_parsing/production.py | from .production_part import ProductionPart
from typing import List
class Production:
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
self.name = rule_name
def __repr__(self):
return "<" + self.name + ">"
class N... | from .production_part import ProductionPart
from typing import List
class Production:
def __init__(self, name: str):
self.name = name
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
super().__init__(rule_name)
... | Move name field to Production superclass | Move name field to Production superclass
| Python | apache-2.0 | pdarragh/Viper | from .production_part import ProductionPart
from typing import List
class Production:
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
self.name = rule_name
def __repr__(self):
return "<" + self.name + ">"
class N... | from .production_part import ProductionPart
from typing import List
class Production:
def __init__(self, name: str):
self.name = name
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
super().__init__(rule_name)
... | <commit_before>from .production_part import ProductionPart
from typing import List
class Production:
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
self.name = rule_name
def __repr__(self):
return "<" + self.name ... | from .production_part import ProductionPart
from typing import List
class Production:
def __init__(self, name: str):
self.name = name
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
super().__init__(rule_name)
... | from .production_part import ProductionPart
from typing import List
class Production:
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
self.name = rule_name
def __repr__(self):
return "<" + self.name + ">"
class N... | <commit_before>from .production_part import ProductionPart
from typing import List
class Production:
def __str__(self):
return repr(self)
class RuleAliasProduction(Production):
def __init__(self, rule_name: str):
self.name = rule_name
def __repr__(self):
return "<" + self.name ... |
97c9cb7e80e72f13befc4cc7effb11402b238df9 | i3pystatus/pianobar.py | i3pystatus/pianobar.py | from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
Mouse events:
- Left click play/pauses
- Right ... | from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
For the event_cmd use:
https://github.com/jlucchese... | Add optional event_cmd bash file into the docs | Add optional event_cmd bash file into the docs
| Python | mit | onkelpit/i3pystatus,paulollivier/i3pystatus,opatut/i3pystatus,ismaelpuerto/i3pystatus,fmarchenko/i3pystatus,paulollivier/i3pystatus,schroeji/i3pystatus,asmikhailov/i3pystatus,facetoe/i3pystatus,opatut/i3pystatus,yang-ling/i3pystatus,plumps/i3pystatus,claria/i3pystatus,richese/i3pystatus,ncoop/i3pystatus,MaicoTimmerman/... | from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
Mouse events:
- Left click play/pauses
- Right ... | from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
For the event_cmd use:
https://github.com/jlucchese... | <commit_before>from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
Mouse events:
- Left click play/paus... | from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
For the event_cmd use:
https://github.com/jlucchese... | from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
Mouse events:
- Left click play/pauses
- Right ... | <commit_before>from i3pystatus import IntervalModule
class Pianobar(IntervalModule):
"""
Shows the title and artist name of the current music
In pianobar config file must be setted the fifo and event_command options
(see man pianobar for more information)
Mouse events:
- Left click play/paus... |
c83f088e6f2b577aae9eceded2a8f7c3c82948b9 | hszinc/__init__.py | hszinc/__init__.py | # -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, Ref
__all__ = ['Grid'... | # -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, REMOVE, Ref
__all__ =... | Add missed import for 'REMOVE' object | hszinc: Add missed import for 'REMOVE' object
| Python | bsd-2-clause | vrtsystems/hszinc,vrtsystems/hszinc | # -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, Ref
__all__ = ['Grid'... | # -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, REMOVE, Ref
__all__ =... | <commit_before># -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, Ref
__... | # -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, REMOVE, Ref
__all__ =... | # -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, Ref
__all__ = ['Grid'... | <commit_before># -*- coding: utf-8 -*-
# Zinc dumping and parsing module
# (C) 2016 VRT Systems
#
# vim: set ts=4 sts=4 et tw=78 sw=4 si:
from .grid import Grid
from .dumper import dump
from .parser import parse
from .metadata import MetadataObject
from .datatypes import Quantity, Coordinate, Uri, Bin, MARKER, Ref
__... |
e3a63e686714e888f5c393924fb98e0eea70f8eb | djangocms_spa/apps.py | djangocms_spa/apps.py | from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_field
Che... | from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_field
Che... | Add default for 'initial' parameter on Select monkeypatch | Add default for 'initial' parameter on Select monkeypatch
| Python | mit | dreipol/djangocms-spa,dreipol/djangocms-spa | from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_field
Che... | from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_field
Che... | <commit_before>from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_fie... | from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_field
Che... | from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_field
Che... | <commit_before>from django.apps import AppConfig
class DjangoCmsSpaConfig(AppConfig):
name = 'djangocms_spa'
def ready(self):
from django.forms import CheckboxInput, RadioSelect, Select, SelectMultiple
from .form_helpers import get_placeholder_for_choices_field, get_serialized_choices_for_fie... |
0c6480390f7984b2a85649bb539e7d6231506ef9 | oneflow/base/templatetags/base_utils.py | oneflow/base/templatetags/base_utils.py | # -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, vars, variable_name=None):
self.vars = vars
self.variable_name =... | # -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, args, variable_name=None):
self.vars = args
self.variable_name =... | Fix the `firstofas` template tag returning '' too early. | Fix the `firstofas` template tag returning '' too early. | Python | agpl-3.0 | WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow | # -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, vars, variable_name=None):
self.vars = vars
self.variable_name =... | # -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, args, variable_name=None):
self.vars = args
self.variable_name =... | <commit_before># -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, vars, variable_name=None):
self.vars = vars
self.... | # -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, args, variable_name=None):
self.vars = args
self.variable_name =... | # -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, vars, variable_name=None):
self.vars = vars
self.variable_name =... | <commit_before># -*- coding: utf-8 -*-
from django import template
from django.template.base import Node, TemplateSyntaxError
from django.utils.encoding import smart_text
register = template.Library()
class FirstOfAsNode(Node):
def __init__(self, vars, variable_name=None):
self.vars = vars
self.... |
aa6c638f6aac2f452049f6314e5885c8e02fd874 | quotations/apps/api/v1.py | quotations/apps/api/v1.py | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | Allow filtering by author name | Allow filtering by author name
| Python | mit | jessamynsmith/underquoted,jessamynsmith/socialjusticebingo,jessamynsmith/underquoted,jessamynsmith/underquoted,jessamynsmith/socialjusticebingo,jessamynsmith/socialjusticebingo,jessamynsmith/underquoted | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | <commit_before>from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers imp... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers import Serializer
... | <commit_before>from tastypie.authorization import DjangoAuthorization
from tastypie import fields
from tastypie.resources import ModelResource, ALL_WITH_RELATIONS
from quotations.apps.quotations import models as quotations_models
from quotations.libs.auth import MethodAuthentication
from quotations.libs.serializers imp... |
a3bc13ed4943dae80928da4e09765002bb0db60c | nbsetuptools/tests/test_nbsetuptools.py | nbsetuptools/tests/test_nbsetuptools.py | import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'static': os.pat... | import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'static': os.pat... | Comment out test that doesn't pass on Windows | Comment out test that doesn't pass on Windows
It appears to be assuming unix paths, so I'm going on the assumption
that it's not a valid test case on Windows.
| Python | bsd-3-clause | Anaconda-Server/nbsetuptools,Anaconda-Server/nbsetuptools,Anaconda-Server/nbsetuptools | import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'static': os.pat... | import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'static': os.pat... | <commit_before>import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'... | import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'static': os.pat... | import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'static': os.pat... | <commit_before>import os
import tempfile
import unittest
from jupyter_core.paths import jupyter_config_dir
from ..nbsetuptools import NBSetup
class NBSetupTestCase(unittest.TestCase):
def setUp(self):
self.prefix = tempfile.mkdtemp()
self.params = {
'prefix': self.prefix,
'... |
66a0f13ab145056ab38cc63c7a5a1d4b3be13030 | radar/radar/validation/reset_password.py | radar/radar/validation/reset_password.py | from radar.validation.core import Field, Validation
from radar.validation.validators import required
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
| from radar.validation.core import Field, Validation, ValidationError
from radar.validation.validators import required
from radar.auth.passwords import is_strong_password
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
... | Check password strength when resetting password | Check password strength when resetting password
| Python | agpl-3.0 | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | from radar.validation.core import Field, Validation
from radar.validation.validators import required
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
Check password strength when resetting password | from radar.validation.core import Field, Validation, ValidationError
from radar.validation.validators import required
from radar.auth.passwords import is_strong_password
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
... | <commit_before>from radar.validation.core import Field, Validation
from radar.validation.validators import required
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
<commit_msg>Check password strength when resetting passwo... | from radar.validation.core import Field, Validation, ValidationError
from radar.validation.validators import required
from radar.auth.passwords import is_strong_password
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
... | from radar.validation.core import Field, Validation
from radar.validation.validators import required
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
Check password strength when resetting passwordfrom radar.validation.cor... | <commit_before>from radar.validation.core import Field, Validation
from radar.validation.validators import required
class ResetPasswordValidation(Validation):
token = Field([required()])
username = Field([required()])
password = Field([required()])
<commit_msg>Check password strength when resetting passwo... |
3dbdac519e89985b910720092ee6bf2ad1ac8fb0 | litecord.py | litecord.py | #!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
app = web.Application()
asyn... | #!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
handler = logging.FileHandler... | Add file handler for logs | Add file handler for logs
| Python | mit | nullpixel/litecord,nullpixel/litecord | #!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
app = web.Application()
asyn... | #!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
handler = logging.FileHandler... | <commit_before>#!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
app = web.Appl... | #!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
handler = logging.FileHandler... | #!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
app = web.Application()
asyn... | <commit_before>#!/usr/bin/env python3
import logging
from aiohttp import web
import asyncio
import json
import aiohttp
import litecord
import litecord_config as config
logging.basicConfig(level=logging.DEBUG, \
format='[%(levelname)7s] [%(name)s] %(message)s')
log = logging.getLogger('litecord')
app = web.Appl... |
e189844bd6179d49665deb1c9ef56206213fc800 | hungry/__init__.py | hungry/__init__.py | __version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error handler or returns ... | __version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error handler or returns ... | Fix bug: Did not catch all exceptions | Fix bug: Did not catch all exceptions
| Python | mit | denizdogan/hungry | __version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error handler or returns ... | __version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error handler or returns ... | <commit_before>__version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error hand... | __version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error handler or returns ... | __version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error handler or returns ... | <commit_before>__version__ = '0.0.5'
def eat(*ex, **kwargs):
error_handler = kwargs.get('error_handler', None)
error_value = kwargs.get('error_value', None)
def inner(func):
def wrapper(*args, **kw):
def caught_it(e):
"""
Calls the error hand... |
4303a55096edae7f7968bd0b252aa2eddaba2e9b | registries/serializers.py | registries/serializers.py | from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
province_state = serializers.ReadOnlyField()
class Meta:
model = Organization
# Using all fields for now
... | from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
"""
Serializer for Driller model "list" view.
"""
province_state = serializers.ReadOnlyField(source="province_state.code"... | Add fields to driller list serializer | Add fields to driller list serializer
| Python | apache-2.0 | bcgov/gwells,bcgov/gwells,bcgov/gwells,rstens/gwells,rstens/gwells,bcgov/gwells,rstens/gwells,rstens/gwells | from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
province_state = serializers.ReadOnlyField()
class Meta:
model = Organization
# Using all fields for now
... | from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
"""
Serializer for Driller model "list" view.
"""
province_state = serializers.ReadOnlyField(source="province_state.code"... | <commit_before>from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
province_state = serializers.ReadOnlyField()
class Meta:
model = Organization
# Using all fields f... | from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
"""
Serializer for Driller model "list" view.
"""
province_state = serializers.ReadOnlyField(source="province_state.code"... | from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
province_state = serializers.ReadOnlyField()
class Meta:
model = Organization
# Using all fields for now
... | <commit_before>from rest_framework import serializers
from registries.models import Organization
from gwells.models import ProvinceState
class DrillerListSerializer(serializers.ModelSerializer):
province_state = serializers.ReadOnlyField()
class Meta:
model = Organization
# Using all fields f... |
13e70f822e3cf96a0604bb4ce6ed46dbe2dcf376 | zsl/application/initializers/__init__.py | zsl/application/initializers/__init__.py | """
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
from .logger_initializer import LoggerInitializer
fr... | """
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
injection_views = []
injection_modules = []
def in... | FIX import order - cyclic dependencies | FIX import order - cyclic dependencies
| Python | mit | AtteqCom/zsl,AtteqCom/zsl | """
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
from .logger_initializer import LoggerInitializer
fr... | """
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
injection_views = []
injection_modules = []
def in... | <commit_before>"""
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
from .logger_initializer import Logge... | """
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
injection_views = []
injection_modules = []
def in... | """
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
from .logger_initializer import LoggerInitializer
fr... | <commit_before>"""
:mod:`asl.application.initializers` -- ASL initializers
=======================================================
:platform: Unix, Windows
:synopsis: The Atteq Service Layer initialization infrastructure
.. moduleauthor:: Martin Babka <babka@atteq.com>
"""
from .logger_initializer import Logge... |
47de6d882c41eda98cda7e8e6ade2457591bbfa1 | CoTeTo/CoTeTo/__init__.py | CoTeTo/CoTeTo/__init__.py | #-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = True
py27 = F... | #-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = True
py27 = F... | Add hot patching of mako at runtime to fix the line ending bug. This is just a temporary solution. | Add hot patching of mako at runtime to fix the line ending bug. This is just a temporary solution.
| Python | mit | EnEff-BIM/EnEffBIM-Framework,EnEff-BIM/EnEffBIM-Framework,EnEff-BIM/EnEffBIM-Framework | #-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = True
py27 = F... | #-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = True
py27 = F... | <commit_before>#-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = Tr... | #-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = True
py27 = F... | #-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = True
py27 = F... | <commit_before>#-*- coding:utf-8 -*-
#
# This file is part of CoTeTo - a code generation tool
# 201500225 Joerg Raedler jraedler@udk-berlin.de
#
import sys
__version__ = '0.2'
# python version check
# please handle py27 a s a special case which may be removed later
v = sys.version_info
if v >= (3, 3):
py33 = Tr... |
389ca2213c2ba3c86c783372e3e933a12f90506e | ckanext/requestdata/controllers/admin.py | ckanext/requestdata/controllers/admin.py | from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class AdminController(BaseController):
def email(self):
... | from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
from ckan.controllers.admin import AdminController
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class Admi... | Extend Admin instead of Base controller | Extend Admin instead of Base controller
| Python | agpl-3.0 | ViderumGlobal/ckanext-requestdata,ViderumGlobal/ckanext-requestdata,ViderumGlobal/ckanext-requestdata,ViderumGlobal/ckanext-requestdata | from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class AdminController(BaseController):
def email(self):
... | from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
from ckan.controllers.admin import AdminController
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class Admi... | <commit_before>from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class AdminController(BaseController):
de... | from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
from ckan.controllers.admin import AdminController
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class Admi... | from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class AdminController(BaseController):
def email(self):
... | <commit_before>from ckan.lib import base
from ckan import logic
from ckan.plugins import toolkit
get_action = logic.get_action
NotFound = logic.NotFound
NotAuthorized = logic.NotAuthorized
redirect = base.redirect
abort = base.abort
BaseController = base.BaseController
class AdminController(BaseController):
de... |
fec4af8b4dccb1264360e833d49688ab707b1d98 | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Update dsub version to 0.2.4. | Update dsub version to 0.2.4.
PiperOrigin-RevId: 225047437
| Python | apache-2.0 | DataBiosphere/dsub,DataBiosphere/dsub | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
b0ce15be3e9e24a5540215e9931ffbddc2ae42f7 | glanceclient/__init__.py | glanceclient/__init__.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | Fix problem running glance --version | Fix problem running glance --version
__version__ should point to a string and not VersionInfo
Fixes LP# 1164760
Change-Id: I27d366af5ed89d0931ef46eb1507e6ba0eec0b6e
| Python | apache-2.0 | metacloud/python-glanceclient,openstack/python-glanceclient,varunarya10/python-glanceclient,ntt-sic/python-glanceclient,klmitch/python-glanceclient,klmitch/python-glanceclient,ntt-sic/python-glanceclient,metacloud/python-glanceclient,alexpilotti/python-glanceclient,varunarya10/python-glanceclient,mmasaki/python-glancec... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licens... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licens... |
c252281ab4ba9570c8f54f3fff6e173cf4d60866 | learning_journal/scripts/initializedb.py | learning_journal/scripts/initializedb.py | import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.path.basename(ar... | import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.path.basename(ar... | Remove multiple users capability from initailize_db | Remove multiple users capability from initailize_db
| Python | mit | DZwell/learning_journal,DZwell/learning_journal,DZwell/learning_journal | import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.path.basename(ar... | import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.path.basename(ar... | <commit_before>import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.p... | import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.path.basename(ar... | import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.path.basename(ar... | <commit_before>import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from ..models import (
DBSession,
Entry,
Base,
)
def usage(argv):
cmd = os.p... |
35af67eb270c5ee177eb264c339c6f9dd390a288 | fits/make_fit_feedmes.py | fits/make_fit_feedmes.py | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedm... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedm... | Make sure all fit feedmes get made | Make sure all fit feedmes get made
| Python | mit | MegaMorph/galfitm-illustrations,MegaMorph/galfitm-illustrations | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedm... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedm... | <commit_before>#!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedm... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedm... | <commit_before>#!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# One-time script
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
... |
7e407d1185235f4a89bddcaffcde240a33b522f4 | expand_region_handler.py | expand_region_handler.py | try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(extension in ["html", "htm", "xml"]):
return html.expand(string, start, end)
return javascript.expand(string, start, end) | import re
try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(re.compile("html|htm|xml").search(extension)):
return html.expand(string, start, end)
return javascript.expand(string, start, end) | Use html strategy for any file that has xml/html in file extension. This will will match shtml, xhtml and so on. | Use html strategy for any file that has xml/html in file extension. This will will match shtml, xhtml and so on.
| Python | mit | aronwoost/sublime-expand-region,johyphenel/sublime-expand-region,johyphenel/sublime-expand-region | try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(extension in ["html", "htm", "xml"]):
return html.expand(string, start, end)
return javascript.expand(string, start, end)Use html strategy for any file that has xm... | import re
try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(re.compile("html|htm|xml").search(extension)):
return html.expand(string, start, end)
return javascript.expand(string, start, end) | <commit_before>try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(extension in ["html", "htm", "xml"]):
return html.expand(string, start, end)
return javascript.expand(string, start, end)<commit_msg>Use html strate... | import re
try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(re.compile("html|htm|xml").search(extension)):
return html.expand(string, start, end)
return javascript.expand(string, start, end) | try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(extension in ["html", "htm", "xml"]):
return html.expand(string, start, end)
return javascript.expand(string, start, end)Use html strategy for any file that has xm... | <commit_before>try:
import javascript
import html
except:
from . import javascript
from . import html
def expand(string, start, end, extension=None):
if(extension in ["html", "htm", "xml"]):
return html.expand(string, start, end)
return javascript.expand(string, start, end)<commit_msg>Use html strate... |
7081e4c9b5b6d85921e20cd7692c0eb7b791f93a | cityhallmonitor/management/commands/rebuild_text_index.py | cityhallmonitor/management/commands/rebuild_text_index.py | import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, parser):
... | import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, parser):
... | Fix unbloud local error if no matching records | Fix unbloud local error if no matching records
| Python | mit | NUKnightLab/cityhallmonitor,NUKnightLab/cityhallmonitor,NUKnightLab/cityhallmonitor,NUKnightLab/cityhallmonitor | import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, parser):
... | import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, parser):
... | <commit_before>import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, ... | import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, parser):
... | import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, parser):
... | <commit_before>import logging
from django.core.management.base import BaseCommand
from cityhallmonitor.models import Document
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = 'For each document, force an update of its related fields and its postgres text index'
def add_arguments(self, ... |
4e0e29199ce01c7ac8f71af78013911da11a8dc0 | LandPortalEntities/lpentities/interval.py | LandPortalEntities/lpentities/interval.py | '''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "http://purl.org/linked-data/sdmx/2009/code#freq-M"
YEARLY = "http://purl.org/linked-data/sdmx/2009/code#freq-A"
def __init__(self, frequency = YEARLY, start_time=Non... | '''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "freq-M"
YEARLY = "freq-A"
def __init__(self, frequency=YEARLY, start_time=None, end_time=None):
'''
Constructor
'''
self.frequency = ... | Remove ontology reference in Interval frequency value | Remove ontology reference in Interval frequency value
| Python | mit | weso/landportal-importers,landportal/landbook-importers,landportal/landbook-importers | '''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "http://purl.org/linked-data/sdmx/2009/code#freq-M"
YEARLY = "http://purl.org/linked-data/sdmx/2009/code#freq-A"
def __init__(self, frequency = YEARLY, start_time=Non... | '''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "freq-M"
YEARLY = "freq-A"
def __init__(self, frequency=YEARLY, start_time=None, end_time=None):
'''
Constructor
'''
self.frequency = ... | <commit_before>'''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "http://purl.org/linked-data/sdmx/2009/code#freq-M"
YEARLY = "http://purl.org/linked-data/sdmx/2009/code#freq-A"
def __init__(self, frequency = YEARLY,... | '''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "freq-M"
YEARLY = "freq-A"
def __init__(self, frequency=YEARLY, start_time=None, end_time=None):
'''
Constructor
'''
self.frequency = ... | '''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "http://purl.org/linked-data/sdmx/2009/code#freq-M"
YEARLY = "http://purl.org/linked-data/sdmx/2009/code#freq-A"
def __init__(self, frequency = YEARLY, start_time=Non... | <commit_before>'''
Created on 02/02/2014
@author: Miguel Otero
'''
from .time import Time
class Interval(Time):
'''
classdocs
'''
MONTHLY = "http://purl.org/linked-data/sdmx/2009/code#freq-M"
YEARLY = "http://purl.org/linked-data/sdmx/2009/code#freq-A"
def __init__(self, frequency = YEARLY,... |
f888de27f382b295af889da37fcb289c582bc4bd | appserver/controllers/nfi_nav_handler.py | appserver/controllers/nfi_nav_handler.py | import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.nfi_enabled')
D... | import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.nfi_enabled')
D... | Revert "Corrected issue with Navigation change controller so it uses 'local' directory instead of 'default'." | Revert "Corrected issue with Navigation change controller so it uses 'local' directory instead of 'default'."
This reverts commit 167a753db3ff6027c19a06db8adeecfabedb7ee1.
The commit may cause an issue with upgrades because users would have to remove the default.xml from the local directory after every upgrade. Furt... | Python | isc | PaloAltoNetworks-BD/SplunkforPaloAltoNetworks | import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.nfi_enabled')
D... | import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.nfi_enabled')
D... | <commit_before>import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.... | import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.nfi_enabled')
D... | import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.nfi_enabled')
D... | <commit_before>import os
import shutil
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
APP = 'SplunkforPaloAltoNetworks'
ENABLED_NAV = os.path.join(os.environ['SPLUNK_HOME'], 'etc', 'apps', APP, 'default', 'data', 'ui', 'nav', 'default.xml.... |
b4d8329f1d586160c60963270794d72372f38b03 | rollbar/examples/twisted/simpleserv.py | rollbar/examples/twisted/simpleserv.py |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These local variables will be sent to Rollbar and available in the UI
a = 33
... |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
# NOTE: pyrollbar requires both `Twisted` and `treq` packages to be installed
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These ... | Add note about required additional packages installation | Add note about required additional packages installation
| Python | mit | rollbar/pyrollbar |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These local variables will be sent to Rollbar and available in the UI
a = 33
... |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
# NOTE: pyrollbar requires both `Twisted` and `treq` packages to be installed
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These ... | <commit_before>
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These local variables will be sent to Rollbar and available in the UI... |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
# NOTE: pyrollbar requires both `Twisted` and `treq` packages to be installed
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These ... |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These local variables will be sent to Rollbar and available in the UI
a = 33
... | <commit_before>
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
# From https://twistedmatrix.com/documents/current/_downloads/simpleserv.py
from twisted.internet import reactor, protocol
import rollbar
def bar(p):
# These local variables will be sent to Rollbar and available in the UI... |
339c27437287949b7fb2e1d36be08c922da80bc4 | rotational-cipher/rotational_cipher.py | rotational-cipher/rotational_cipher.py | import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
return "".join(rot_gen(s,n))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
def rot_gen(s, n):
rules = shift_rules(n)
f... | import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
rules = shift_rules(n)
return "".join(map(lambda k: rules.get(k, k), s))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
| Use lambda function with method | Use lambda function with method
| Python | agpl-3.0 | CubicComet/exercism-python-solutions | import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
return "".join(rot_gen(s,n))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
def rot_gen(s, n):
rules = shift_rules(n)
f... | import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
rules = shift_rules(n)
return "".join(map(lambda k: rules.get(k, k), s))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
| <commit_before>import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
return "".join(rot_gen(s,n))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
def rot_gen(s, n):
rules = shift... | import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
rules = shift_rules(n)
return "".join(map(lambda k: rules.get(k, k), s))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
| import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
return "".join(rot_gen(s,n))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
def rot_gen(s, n):
rules = shift_rules(n)
f... | <commit_before>import string
UPPER = string.ascii_uppercase
LOWER = string.ascii_lowercase
def rotate(s, n):
return "".join(rot_gen(s,n))
def shift_rules(n):
shifted = UPPER[n:] + UPPER[:n] + LOWER[n:] + LOWER[:n]
return {k:v for k,v in zip(UPPER+LOWER, shifted)}
def rot_gen(s, n):
rules = shift... |
d0c71df95c4024462339396638397939893d1abb | httpobs/scanner/utils.py | httpobs/scanner/utils.py | import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# First, let's try to see if it's an IPv4 address
try:
socket.inet_aton(hostname) # inet_aton() will throw an exception if host... | import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# Block attempts to scan things like 'localhost'
if '.' not in hostname or 'localhost' in hostname:
return False
# First, l... | Add additional invalid host detection | Add additional invalid host detection
| Python | mpl-2.0 | mozilla/http-observatory,april/http-observatory,mozilla/http-observatory,april/http-observatory,mozilla/http-observatory,april/http-observatory | import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# First, let's try to see if it's an IPv4 address
try:
socket.inet_aton(hostname) # inet_aton() will throw an exception if host... | import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# Block attempts to scan things like 'localhost'
if '.' not in hostname or 'localhost' in hostname:
return False
# First, l... | <commit_before>import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# First, let's try to see if it's an IPv4 address
try:
socket.inet_aton(hostname) # inet_aton() will throw an ex... | import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# Block attempts to scan things like 'localhost'
if '.' not in hostname or 'localhost' in hostname:
return False
# First, l... | import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# First, let's try to see if it's an IPv4 address
try:
socket.inet_aton(hostname) # inet_aton() will throw an exception if host... | <commit_before>import socket
def valid_hostname(hostname: str):
"""
:param hostname: The hostname requested in the scan
:return: Hostname if it's valid, otherwise None
"""
# First, let's try to see if it's an IPv4 address
try:
socket.inet_aton(hostname) # inet_aton() will throw an ex... |
6a55bacff334905ad19e437c3ea26653f452dfbe | mastering-python/ch04/CollectionsComprehensions.py | mastering-python/ch04/CollectionsComprehensions.py | #List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]
]
for x in... | #List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]
]
for x in... | Add dict and set comprehension demo. | Add dict and set comprehension demo.
| Python | apache-2.0 | precompiler/python-101 | #List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]
]
for x in... | #List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]
]
for x in... | <commit_before>#List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, ... | #List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]
]
for x in... | #List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12]
]
for x in... | <commit_before>#List
l = [x for x in range(1, 10)]
print(l)
l2 = [x ** 2 for x in range(1, 10)]
print(l2)
l3 = [x for x in range(1, 10) if x % 2 == 0]
print(l3)
tlist = [(x, y) for x in range(1, 3) for y in (5, 7)]
print(tlist)
print(list(range(10)))
matrix = [
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, ... |
17e20665a5d9675e82bf1aadbc9eb4cb0f79c07f | housing/listings/urls.py | housing/listings/urls.py | from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^accounts/register/$', views.register, name='register'),
url(r'^accounts/re... | from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.i... | Add media to url, for development only | Add media to url, for development only
| Python | mit | xyb994/housing,xyb994/housing,xyb994/housing,xyb994/housing | from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^accounts/register/$', views.register, name='register'),
url(r'^accounts/re... | from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.i... | <commit_before>from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^accounts/register/$', views.register, name='register'),
url... | from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.i... | from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^accounts/register/$', views.register, name='register'),
url(r'^accounts/re... | <commit_before>from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views
from . import views
app_name="listings"
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^accounts/register/$', views.register, name='register'),
url... |
3d6e25bd2df7e3591b9810888ae24ad2317b2b96 | tests/drawing/demo_rectangle.py | tests/drawing/demo_rectangle.py | #!/usr/bin/env python3
"""A green rectangle should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
rect = vecrec.Rect.from_pyglet_window(window)
rect.shrink(50)
glooey.drawing.Rectangle(rect, batch=batch)
@win... | #!/usr/bin/env python3
"""Two green rectangles should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
full = vecrec.Rect.from_pyglet_window(window)
left = vecrec.Rect(full.left, full.bottom, full.width/2, full.h... | Make sure GL_QUADS don't end up weirdly connected. | Make sure GL_QUADS don't end up weirdly connected.
| Python | mit | kxgames/glooey,kxgames/glooey | #!/usr/bin/env python3
"""A green rectangle should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
rect = vecrec.Rect.from_pyglet_window(window)
rect.shrink(50)
glooey.drawing.Rectangle(rect, batch=batch)
@win... | #!/usr/bin/env python3
"""Two green rectangles should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
full = vecrec.Rect.from_pyglet_window(window)
left = vecrec.Rect(full.left, full.bottom, full.width/2, full.h... | <commit_before>#!/usr/bin/env python3
"""A green rectangle should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
rect = vecrec.Rect.from_pyglet_window(window)
rect.shrink(50)
glooey.drawing.Rectangle(rect, bat... | #!/usr/bin/env python3
"""Two green rectangles should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
full = vecrec.Rect.from_pyglet_window(window)
left = vecrec.Rect(full.left, full.bottom, full.width/2, full.h... | #!/usr/bin/env python3
"""A green rectangle should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
rect = vecrec.Rect.from_pyglet_window(window)
rect.shrink(50)
glooey.drawing.Rectangle(rect, batch=batch)
@win... | <commit_before>#!/usr/bin/env python3
"""A green rectangle should take up most of the screen."""
import pyglet
import glooey
import vecrec
print(__doc__)
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
rect = vecrec.Rect.from_pyglet_window(window)
rect.shrink(50)
glooey.drawing.Rectangle(rect, bat... |
c46ee50229c13dc8b10e72fe8cb0f6dc9755cda4 | indra/bel/ndex_client.py | indra/bel/ndex_client.py | import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_resul... | import requests
import json
import time
ndex_base_url = 'http://bel2rdf.bigmech.ndexbio.org'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_result(res... | Update URL for bel2rdf service | Update URL for bel2rdf service
| Python | bsd-2-clause | sorgerlab/belpy,pvtodorov/indra,sorgerlab/belpy,jmuhlich/indra,johnbachman/belpy,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,johnbachman/indra,jmuhlich/indra,pvtodorov/indra,sorgerlab/indra,bgyori/indra,johnbachman/belpy,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,jmuhlich/indra,johnbachman/indra,bgyori/ind... | import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_resul... | import requests
import json
import time
ndex_base_url = 'http://bel2rdf.bigmech.ndexbio.org'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_result(res... | <commit_before>import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json... | import requests
import json
import time
ndex_base_url = 'http://bel2rdf.bigmech.ndexbio.org'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_result(res... | import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_resul... | <commit_before>import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json... |
1653cb5ff092455c6aca70c12c23c4538454d5fe | kobo/apps/hook/serializers/hook.py | kobo/apps/hook/serializers/hook.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
class Meta:
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
class Meta:
... | Stop exposing asset_id in Hook Viewset | Stop exposing asset_id in Hook Viewset
| Python | agpl-3.0 | onaio/kpi,kobotoolbox/kpi,onaio/kpi,onaio/kpi,kobotoolbox/kpi,kobotoolbox/kpi,onaio/kpi,kobotoolbox/kpi,kobotoolbox/kpi | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
class Meta:
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
class Meta:
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
c... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
class Meta:
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
class Meta:
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
import constance
from django.utils.translation import ugettext as _
from rest_framework import serializers
from rest_framework.reverse import reverse
from ..models.hook import Hook
class HookSerializer(serializers.ModelSerializer):
c... |
eae949e483e1d30e8c11b662bb07e9d30dcf39c5 | lc0049_group_anagrams.py | lc0049_group_anagrams.py | """Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercase.
- The order ... | """Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercase.
- The order ... | Revise to anagram_lists and rename to sorted anagram dict class | Revise to anagram_lists and rename to sorted anagram dict class
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | """Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercase.
- The order ... | """Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercase.
- The order ... | <commit_before>"""Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercas... | """Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercase.
- The order ... | """Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercase.
- The order ... | <commit_before>"""Leetcode 49. Group Anagrams
Medium
URL: https://leetcode.com/problems/group-anagrams/
Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"],
Output:
[
["ate","eat","tea"],
["nat","tan"],
["bat"]
]
Note:
- All inputs will be in lowercas... |
a9844bad75c66e10f85be4555c9ad7aa2df15585 | src/trajectory_server.py | src/trajectory_server.py | #!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint, TrajectoryPointResponse
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
return position
if... | #!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
return position
if __name__ == '__main__':
... | Remove import that was not used | Remove import that was not used
| Python | mit | bit0001/trajectory_tracking,bit0001/trajectory_tracking | #!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint, TrajectoryPointResponse
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
return position
if... | #!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
return position
if __name__ == '__main__':
... | <commit_before>#!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint, TrajectoryPointResponse
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
retur... | #!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
return position
if __name__ == '__main__':
... | #!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint, TrajectoryPointResponse
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
return position
if... | <commit_before>#!/usr/bin/env python
import rospy
from trajectory_tracking.srv import TrajectoryPoint, TrajectoryPointResponse
from geometry_msgs.msg import Point
def compute_position(request):
t = request.t
position = Point()
position.x = 0.05 * t
position.y = 0.05 * t
position.z = 0.0
retur... |
09927a3ff7594213419c1445896aaa0e1d86f4f8 | pavement.py | pavement.py | from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_configuration_ui.p... | from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_configuration_ui.p... | Set force-buildsystem to false so that it can work on opensuse buildservice | Set force-buildsystem to false so that it can work on opensuse buildservice
| Python | mit | rwilsonncsa/buildnotify | from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_configuration_ui.p... | from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_configuration_ui.p... | <commit_before>from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_con... | from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_configuration_ui.p... | from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_configuration_ui.p... | <commit_before>from paver.easy import *
@task
def clean():
for fl in ['BuildNotify.egg-info', 'build', 'dist', 'deb_dist']:
p = path(fl)
p.rmtree()
@task
def mk_resources():
sh('pyuic4 -o buildnotifylib/preferences_ui.py data/preferences.ui')
sh('pyuic4 -o buildnotifylib/server_con... |
65390ca8677440aeb88d8946290899e8a904ac62 | src/waldur_slurm/urls.py | src/waldur_slurm/urls.py | from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allocation', views.... | from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allocations', views... | Use plural for slurm endpoints | Use plural for slurm endpoints
| Python | mit | opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind | from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allocation', views.... | from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allocations', views... | <commit_before>from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allo... | from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allocations', views... | from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allocation', views.... | <commit_before>from . import views
def register_in(router):
router.register(r'slurm', views.SlurmServiceViewSet, basename='slurm')
router.register(
r'slurm-service-project-link',
views.SlurmServiceProjectLinkViewSet,
basename='slurm-spl',
)
router.register(
r'slurm-allo... |
dbdab865343c0c17655fb662ac5e939eb24758c8 | labelprinterServeConf.py | labelprinterServeConf.py | import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeConf_local import ... | import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeConf_local import ... | Read SENTRY_DSN from a secret if it exists. | Read SENTRY_DSN from a secret if it exists.
| Python | mit | chaosdorf/labello,chaosdorf/labello,chaosdorf/labello | import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeConf_local import ... | import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeConf_local import ... | <commit_before>import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeCon... | import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeConf_local import ... | import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeConf_local import ... | <commit_before>import os
# HTTP-Server
SERVER_PORT = 8000
SERVER_DEFAULT_TEMPLATE = '/choose'
# PRINTER
PRINTER_TIMEOUT = 10 # in seconds
PRINTER_HOST = '172.22.26.67'
PRINTER_PORT = 9100
# error logging
SENTRY_DSN = None
# try to overwrite default vars with the local config file
try:
from labelprinterServeCon... |
5b6de7e8f79182050eccaf0dc14bca80e67fcb03 | users/ojub_auth.py | users/ojub_auth.py | from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
This class does ... | from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
This class does ... | Extend auth backend to ingest users realname and email | Extend auth backend to ingest users realname and email
| Python | mit | OpenJUB/jay,kuboschek/jay,OpenJUB/jay,kuboschek/jay,kuboschek/jay,OpenJUB/jay | from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
This class does ... | from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
This class does ... | <commit_before>from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
T... | from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
This class does ... | from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
This class does ... | <commit_before>from django.conf import settings
from django.contrib.auth.models import User
import requests
OPENJUB_BASE = "https://api.jacobs-cs.club/"
class OjubBackend(object):
"""
Authenticates credentials against the OpenJUB database.
The URL for the server is configured by OPENJUB_BASE in the settings.
T... |
1e04f0960ee0fb8d243516ac72746a4442a656e3 | lib/gridfill/__init__.py | lib/gridfill/__init__.py | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | Switch to version 1 for the next release. | Switch to version 1 for the next release.
| Python | mit | ajdawson/gridfill | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | <commit_before>"""Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# 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 limitatio... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | <commit_before>"""Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# 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 limitatio... |
cbb925f09f4ad5fbe3a23ec7e9816184653e0acf | tests/test_web_caller.py | tests/test_web_caller.py | from unittest import TestCase
from modules.web_caller import get_google
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
def test_get_google(self):
"""
Calling `get_google` works as expected.
"""
response = get_google()
self.assertEqu... | from unittest import TestCase
from mock import NonCallableMock, patch
from modules.web_caller import get_google, GOOGLE_URL
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
@patch('modules.web_caller.requests.get')
def test_get_google(self, get):
"""
Call... | Change get_google test to use mock | Change get_google test to use mock
| Python | mit | tkh/test-examples,tkh/test-examples | from unittest import TestCase
from modules.web_caller import get_google
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
def test_get_google(self):
"""
Calling `get_google` works as expected.
"""
response = get_google()
self.assertEqu... | from unittest import TestCase
from mock import NonCallableMock, patch
from modules.web_caller import get_google, GOOGLE_URL
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
@patch('modules.web_caller.requests.get')
def test_get_google(self, get):
"""
Call... | <commit_before>from unittest import TestCase
from modules.web_caller import get_google
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
def test_get_google(self):
"""
Calling `get_google` works as expected.
"""
response = get_google()
... | from unittest import TestCase
from mock import NonCallableMock, patch
from modules.web_caller import get_google, GOOGLE_URL
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
@patch('modules.web_caller.requests.get')
def test_get_google(self, get):
"""
Call... | from unittest import TestCase
from modules.web_caller import get_google
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
def test_get_google(self):
"""
Calling `get_google` works as expected.
"""
response = get_google()
self.assertEqu... | <commit_before>from unittest import TestCase
from modules.web_caller import get_google
class TestWebCaller(TestCase):
"""
Tests for the `web_caller` module.
"""
def test_get_google(self):
"""
Calling `get_google` works as expected.
"""
response = get_google()
... |
40b6b5db450c92fd5d64186981be433c47b43afd | tests/test_wish_utils.py | tests/test_wish_utils.py | # -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_modules():
# normal code path, pytest is a dependency
distributions = [pkg_resources.get_distribution('pytest')]
distributions_modules = wish_utils.import_modules(distributions)
assert len(distributions_modules) == 1
... | # -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_coverage():
"""Fix the coverage by pytest-cov, that may trigger after pytest_wish is already imported."""
from imp import reload # Python 2 and 3 reload
import wish_utils
reload(wish_utils)
def test_import_modules():
... | Fix pytest-cov coverage of wish_utils. | Fix pytest-cov coverage of wish_utils.
| Python | mit | alexamici/pytest-wish,nodev-io/pytest-nodev,alexamici/pytest-nodev | # -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_modules():
# normal code path, pytest is a dependency
distributions = [pkg_resources.get_distribution('pytest')]
distributions_modules = wish_utils.import_modules(distributions)
assert len(distributions_modules) == 1
... | # -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_coverage():
"""Fix the coverage by pytest-cov, that may trigger after pytest_wish is already imported."""
from imp import reload # Python 2 and 3 reload
import wish_utils
reload(wish_utils)
def test_import_modules():
... | <commit_before># -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_modules():
# normal code path, pytest is a dependency
distributions = [pkg_resources.get_distribution('pytest')]
distributions_modules = wish_utils.import_modules(distributions)
assert len(distributions_mod... | # -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_coverage():
"""Fix the coverage by pytest-cov, that may trigger after pytest_wish is already imported."""
from imp import reload # Python 2 and 3 reload
import wish_utils
reload(wish_utils)
def test_import_modules():
... | # -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_modules():
# normal code path, pytest is a dependency
distributions = [pkg_resources.get_distribution('pytest')]
distributions_modules = wish_utils.import_modules(distributions)
assert len(distributions_modules) == 1
... | <commit_before># -*- coding: utf-8 -*-
import pkg_resources
import wish_utils
def test_import_modules():
# normal code path, pytest is a dependency
distributions = [pkg_resources.get_distribution('pytest')]
distributions_modules = wish_utils.import_modules(distributions)
assert len(distributions_mod... |
f3d8cb7f173b671b38dda6c4a917b1056dbab767 | benchexec/tools/lctd.py | benchexec/tools/lctd.py | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | Add assertion that no options are passed to LCTD | Add assertion that no options are passed to LCTD
Attempting to pass options to the current version of LCTD would cause it to
crash.
| Python | apache-2.0 | sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,martin-neuhaeusser/benchexec,IljaZakharov/benchexec,dbeyer/benchexec,IljaZakharov/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,martin-neuhaeusser/benchexec,martin-neuhaeusser/benchexec,IljaZakharo... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | <commit_before>"""
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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 ... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | <commit_before>"""
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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 ... |
28c88cbc34dcf2af5c98ce3f3eed3774dd5be15e | lcapy/discretetime.py | lcapy/discretetime.py | """This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
from .kexpr impor... | """This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
from .kexpr impor... | Handle container types for discrete-time expr | Handle container types for discrete-time expr
| Python | lgpl-2.1 | mph-/lcapy | """This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
from .kexpr impor... | """This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
from .kexpr impor... | <commit_before>"""This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
fr... | """This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
from .kexpr impor... | """This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
from .kexpr impor... | <commit_before>"""This module provides discrete-time support.
It introduces three special variables:
n for discrete-time sequences
k for discrete-frequency sequences
z for z-transforms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy as sym
from .sym import sympify
from .nexpr import nexpr, n
fr... |
75f73632914f5d649b4154f86b665619b4c9268d | metal/mmtl/task.py | metal/mmtl/task.py | from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-featured path through the network
... | from functools import partial
from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-feat... | Add default kwarg to default probs_hat in Task | Add default kwarg to default probs_hat in Task
| Python | apache-2.0 | HazyResearch/metal,HazyResearch/metal | from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-featured path through the network
... | from functools import partial
from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-feat... | <commit_before>from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-featured path throu... | from functools import partial
from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-feat... | from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-featured path through the network
... | <commit_before>from typing import Callable, List
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
class Task(object):
"""A task for use in an MMTL MetalModel
Args:
name: The name of the task
TODO: replace this with a more fully-featured path throu... |
a2b9777cc7ec4d606d3a33400c4f242bc9177fab | awx/main/migrations/0004_rbac_migrations.py | awx/main/migrations/0004_rbac_migrations.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac.migrate_organi... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac.migrate_users)... | Add migrate_users and migrate_projects to our migration plan | Add migrate_users and migrate_projects to our migration plan
| Python | apache-2.0 | wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac.migrate_organi... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac.migrate_users)... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac.migrate_users)... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac.migrate_organi... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from awx.main.migrations import _rbac as rbac
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_rbac_changes'),
]
operations = [
migrations.RunPython(rbac... |
02483546e2d6e134689a0d746025c4256279c05d | modules/pipeyql.py | modules/pipeyql.py | # pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
yqlquery ... | # pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
yqlquery ... | Allow YQL module to be embedded in a loop | Allow YQL module to be embedded in a loop
| Python | mit | nerevu/riko,nerevu/riko | # pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
yqlquery ... | # pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
yqlquery ... | <commit_before># pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
... | # pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
yqlquery ... | # pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
yqlquery ... | <commit_before># pipeyql.py
#
import urllib
import urllib2
from xml.etree import cElementTree as ElementTree
from pipe2py import util
def pipe_yql(context, _INPUT, conf, **kwargs):
"""This source issues YQL queries.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
... |
946213058ba049fecaffdfa6e88e69295e042edf | mining/urls.py | mining/urls.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", DashboardHandler),
(r"/", MainHandler),
]
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
from .views import ProcessWebSocket
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).ws", ProcessWebSocket),
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", Das... | Create url enter Process WebSocket | Create url enter Process WebSocket
| Python | mit | seagoat/mining,mlgruby/mining,AndrzejR/mining,seagoat/mining,mining/mining,AndrzejR/mining,chrisdamba/mining,avelino/mining,mlgruby/mining,jgabriellima/mining,mining/mining,mlgruby/mining,chrisdamba/mining,avelino/mining,jgabriellima/mining | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", DashboardHandler),
(r"/", MainHandler),
]
Create url enter Process WebSocket | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
from .views import ProcessWebSocket
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).ws", ProcessWebSocket),
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", Das... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", DashboardHandler),
(r"/", MainHandler),
]
<commit_msg>Create url enter Proces... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
from .views import ProcessWebSocket
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).ws", ProcessWebSocket),
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", Das... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", DashboardHandler),
(r"/", MainHandler),
]
Create url enter Process WebSocket#!/usr/bin/env p... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from .views import MainHandler, ProcessHandler, DashboardHandler
INCLUDE_URLS = [
(r"/process/(?P<slug>[\w-]+).json", ProcessHandler),
(r"/dashboard/(?P<slug>[\w-]+)", DashboardHandler),
(r"/", MainHandler),
]
<commit_msg>Create url enter Proces... |
023109283545141dc0ed88a8a7f67d7c21da2a89 | oauth/api/serializers.py | oauth/api/serializers.py | from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=255)
email = serializers.CharField(max_length=255)
id = serializers.IntegerField()
| from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=200)
id = serializers.IntegerField()
| Revert "Try to add email to OAuth response" | Revert "Try to add email to OAuth response"
This reverts commit 91a047755a66dc2cf0e029b1de606b94925dd297.
| Python | mit | ZeusWPI/oauth,ZeusWPI/oauth | from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=255)
email = serializers.CharField(max_length=255)
id = serializers.IntegerField()
Revert "Try to add email to OAuth response"
This reverts commit 91a047755a66dc2cf0e029b1de606... | from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=200)
id = serializers.IntegerField()
| <commit_before>from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=255)
email = serializers.CharField(max_length=255)
id = serializers.IntegerField()
<commit_msg>Revert "Try to add email to OAuth response"
This reverts commit 91... | from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=200)
id = serializers.IntegerField()
| from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=255)
email = serializers.CharField(max_length=255)
id = serializers.IntegerField()
Revert "Try to add email to OAuth response"
This reverts commit 91a047755a66dc2cf0e029b1de606... | <commit_before>from rest_framework import serializers
class UserSerializer(serializers.Serializer):
username = serializers.CharField(max_length=255)
email = serializers.CharField(max_length=255)
id = serializers.IntegerField()
<commit_msg>Revert "Try to add email to OAuth response"
This reverts commit 91... |
8006e448aae885c9eb9255dec01bb11cb5c19f5c | migrations/versions/201505061404_3b997c7a4f0c_use_proper_type_and_fk_for_booked_for_id.py | migrations/versions/201505061404_3b997c7a4f0c_use_proper_type_and_fk_for_booked_for_id.py | """Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2b4b4bce2165
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2b4b4bce2165'
def upgrade():
op.execute('AL... | """Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2bb9dc6f5c28
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2bb9dc6f5c28'
def upgrade():
op.execute('AL... | Fix alembic branch due to change in master | Fix alembic branch due to change in master
| Python | mit | ThiefMaster/indico,ThiefMaster/indico,ThiefMaster/indico,indico/indico,mvidalgarcia/indico,OmeGak/indico,DirkHoffmann/indico,mic4ael/indico,mvidalgarcia/indico,DirkHoffmann/indico,DirkHoffmann/indico,OmeGak/indico,OmeGak/indico,indico/indico,mic4ael/indico,pferreir/indico,mvidalgarcia/indico,DirkHoffmann/indico,pferrei... | """Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2b4b4bce2165
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2b4b4bce2165'
def upgrade():
op.execute('AL... | """Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2bb9dc6f5c28
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2bb9dc6f5c28'
def upgrade():
op.execute('AL... | <commit_before>"""Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2b4b4bce2165
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2b4b4bce2165'
def upgrade():
... | """Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2bb9dc6f5c28
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2bb9dc6f5c28'
def upgrade():
op.execute('AL... | """Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2b4b4bce2165
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2b4b4bce2165'
def upgrade():
op.execute('AL... | <commit_before>"""Use proper type and FK for booked_for_id
Revision ID: 3b997c7a4f0c
Revises: 2b4b4bce2165
Create Date: 2015-05-06 14:04:14.590496
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '3b997c7a4f0c'
down_revision = '2b4b4bce2165'
def upgrade():
... |
beee964585dfc79b3c83deadce7b68922350f9be | pneumatic/utils.py | pneumatic/utils.py | import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
'mdb'... | import os
import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
... | Remove files with size larger than 400MB from upload list | Remove files with size larger than 400MB from upload list
| Python | mit | anthonydb/pneumatic | import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
'mdb'... | import os
import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
... | <commit_before>import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
... | import os
import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
... | import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
'mdb'... | <commit_before>import time
class Utils(object):
"""
A few things we'll (eventually) use.
"""
def __init__(self):
# These are file types we do not want to send to DocumentCloud.
self.file_excludes = (
'aiff',
'DS_Store',
'flac',
'mid',
... |
b2803c40b2fcee7ab466c83fc95bb693a28576d0 | messageboard/views.py | messageboard/views.py | from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_framework.decorators... | from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_framework.decorators... | Use temporary file and fix to image save handling | Use temporary file and fix to image save handling
| Python | mit | DjangoBeer/message-board,DjangoBeer/message-board,fmarco/message-board,DjangoBeer/message-board,fmarco/message-board,fmarco/message-board | from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_framework.decorators... | from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_framework.decorators... | <commit_before>from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_frame... | from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_framework.decorators... | from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_framework.decorators... | <commit_before>from django.shortcuts import render
from .models import Message
from .serializers import MessageSerializer
from .permissions import IsOwnerOrReadOnly
from rest_framework import generics, permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from rest_frame... |
a3c90b08ad30ead05368bbdfe6f477ab4e5b8409 | bugsnag/tornado/__init__.py | bugsnag/tornado/__init__.py | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
bugsnag.notify(e)
tornado.web.RequestHandler._handle_request_exception(self, e) | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | Add request data to tornado exceptions | Add request data to tornado exceptions
| Python | mit | overplumbum/bugsnag-python,bugsnag/bugsnag-python,overplumbum/bugsnag-python,bugsnag/bugsnag-python | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
bugsnag.notify(e)
tornado.web.RequestHandler._handle_request_exception(self, e)Add request data to tornado exceptions | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | <commit_before>from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
bugsnag.notify(e)
tornado.web.RequestHandler._handle_request_exception(self, e)<commit_msg>Add request data to tornado exceptions<commit_after> | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
# Set the request info
bugsnag.configure_request(
user_id = self.request.remote_ip,
context = "%s %s" % (self.request.method, self.reque... | from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
bugsnag.notify(e)
tornado.web.RequestHandler._handle_request_exception(self, e)Add request data to tornado exceptionsfrom tornado.web import RequestHandler
impo... | <commit_before>from tornado.web import RequestHandler
import bugsnag
class BugsnagRequestHandler(RequestHandler):
def _handle_request_exception(self, e):
bugsnag.notify(e)
tornado.web.RequestHandler._handle_request_exception(self, e)<commit_msg>Add request data to tornado exceptions<commit_after>fr... |
9a9ab21b66991171fc7b6288d9c734dc05d82a3d | firecares/firestation/management/commands/export-building-fires.py | firecares/firestation/management/commands/export-building-fires.py | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | Update export building fires command. | Update export building fires command.
| Python | mit | FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,meilinger/firecares,HunterConnelly/firecares,meilinger/firecares,FireCARES/firecares,FireCARES/firecares,HunterConnelly/firecares,HunterConnelly/firecares,HunterConnelly/firecares,meilinger/firecares,meilinger/firecares | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | <commit_before>from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def h... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | <commit_before>from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def h... |
5a0d0ad5fd4e8b7f2b8c8dde1a43db359f3cf3c0 | OIPA/api/activity/urls.py | OIPA/api/activity/urls.py | from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
url(r'^aggregat... | from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
url(r'^aggregat... | Fix bug in new URL endpoint | Fix bug in new URL endpoint
| Python | agpl-3.0 | zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA | from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
url(r'^aggregat... | from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
url(r'^aggregat... | <commit_before>from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
... | from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
url(r'^aggregat... | from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
url(r'^aggregat... | <commit_before>from django.conf import settings
from django.conf.urls import url
from django.views.decorators.cache import cache_page
import api.activity.views
import api.sector.views
app_name = 'api'
urlpatterns = [
url(r'^$',
api.activity.views.ActivityList.as_view(),
name='activity-list'),
... |
f10d6e658f63cc5ce25a22a11dd532818317f11d | apps/tagmeta/templatetags/tagmeta_tags.py | apps/tagmeta/templatetags/tagmeta_tags.py | from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import timesince
# Extern... | from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import timesince
# Extern... | Remove site dependency from tagmeta; works cross-site now | Remove site dependency from tagmeta; works cross-site now
| Python | bsd-3-clause | mfitzp/django-golifescience | from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import timesince
# Extern... | from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import timesince
# Extern... | <commit_before>from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import tim... | from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import timesince
# Extern... | from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import timesince
# Extern... | <commit_before>from collections import OrderedDict
import datetime
import settings
# Django
from django import template
from django.template import resolve_variable, NodeList
from django.template.defaultfilters import stringfilter
from django.contrib.auth.models import User, Group
from django.utils.timesince import tim... |
d3c39f67c49bade795ec02c9b3140f88606d9bf9 | ebcf_alexa.py | ebcf_alexa.py | """
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""" Route the inc... | """
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""" Route the inc... | Add way to debug lambda function end 2 end | Add way to debug lambda function end 2 end
| Python | mit | dmotles/ebcf-alexa | """
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""" Route the inc... | """
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""" Route the inc... | <commit_before>"""
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""... | """
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""" Route the inc... | """
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""" Route the inc... | <commit_before>"""
Entry point for lambda
"""
from _ebcf_alexa import interaction_model, incoming_types, speechlet
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ALEXA_SKILL_ID = 'amzn1.ask.skill.d6f2f7c4-7689-410d-9c35-8f8baae37969'
def lambda_handler(event_dict: dict, context) -> dict:
""... |
aa50aa09416512003f95eefa83a805d4bb2bc96a | cheroot/test/test_wsgi.py | cheroot/test/test_wsgi.py | """Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
response_head... | """Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
response_head... | Stop the server when done. | Stop the server when done.
| Python | bsd-3-clause | cherrypy/cheroot | """Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
response_head... | """Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
response_head... | <commit_before>"""Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
... | """Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
response_head... | """Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
response_head... | <commit_before>"""Test wsgi."""
import threading
import pytest
import portend
from cheroot import wsgi
@pytest.fixture
def simple_wsgi_server():
"""Fucking simple wsgi server fixture (duh)."""
port = portend.find_available_local_port()
def app(environ, start_response):
status = '200 OK'
... |
7f345e78f6825c676282114029a6c230dd063bfe | pinax/images/admin.py | pinax/images/admin.py | from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = Tr... | from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "created_by", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.a... | Add "created_by" in inline fields | Add "created_by" in inline fields
Image couldn't be added via django admin, simply add "created_by" in inlines fields to make it working.
| Python | mit | arthur-wsw/pinax-images,pinax/pinax-images | from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = Tr... | from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "created_by", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.a... | <commit_before>from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.... | from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "created_by", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.a... | from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.allow_tags = Tr... | <commit_before>from django.contrib import admin
from .models import ImageSet, Image
class ImageInline(admin.TabularInline):
model = Image
fields = ["image", "preview"]
readonly_fields = ["preview"]
def preview(self, obj):
return "<img src='{}' />".format(obj.small_thumbnail.url)
preview.... |
5a2fcbbc12c1876ff01ad3a4a14ad2077ffedf5c | runtests.py | runtests.py | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
from firmant import du
suite.addTest(doctest.DocTestSuite(du))
from firmant import entries
... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.entries',
... | Change module doctest creation to be more dynamic. | Change module doctest creation to be more dynamic.
| Python | bsd-3-clause | rescrv/firmant | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
from firmant import du
suite.addTest(doctest.DocTestSuite(du))
from firmant import entries
... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.entries',
... | <commit_before>#!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
from firmant import du
suite.addTest(doctest.DocTestSuite(du))
from firmant i... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.entries',
... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
from firmant import du
suite.addTest(doctest.DocTestSuite(du))
from firmant import entries
... | <commit_before>#!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
from firmant import du
suite.addTest(doctest.DocTestSuite(du))
from firmant i... |
8a681285d8d6cf4aeecb484a9bc5f8cba82d2f58 | run-lala.py | run-lala.py | #!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
config.read(configfile)
lalaconfig = config._sections["lala"]
if "-d" ... | #!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
try:
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
except AttributeError:
configfile = os.path.join(os.geten... | Read the config from $HOME/.lala if $XDG_CONFIG_HOME is not set | Read the config from $HOME/.lala if $XDG_CONFIG_HOME is not set
| Python | mit | mineo/lala,mineo/lala | #!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
config.read(configfile)
lalaconfig = config._sections["lala"]
if "-d" ... | #!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
try:
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
except AttributeError:
configfile = os.path.join(os.geten... | <commit_before>#!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
config.read(configfile)
lalaconfig = config._sections["lala... | #!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
try:
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
except AttributeError:
configfile = os.path.join(os.geten... | #!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
config.read(configfile)
lalaconfig = config._sections["lala"]
if "-d" ... | <commit_before>#!/usr/bin/python2
import ConfigParser
import sys
import os
from lala import Bot
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
configfile = os.path.join(os.getenv("XDG_CONFIG_HOME"),"lala","config")
config.read(configfile)
lalaconfig = config._sections["lala... |
fcd15442281428c6c3edcf88ecf65dd162246070 | rcamp/lib/pam_backend.py | rcamp/lib/pam_backend.py | from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(username)
if not rc_user:
return None
... | from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
import logging
logger = logging.getLogger('accounts')
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam... | Add logging for user auth attempts | Add logging for user auth attempts
| Python | mit | ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP | from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(username)
if not rc_user:
return None
... | from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
import logging
logger = logging.getLogger('accounts')
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam... | <commit_before>from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(username)
if not rc_user:
... | from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
import logging
logger = logging.getLogger('accounts')
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam... | from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(username)
if not rc_user:
return None
... | <commit_before>from django.conf import settings
from accounts.models import (
RcLdapUser,
User
)
import pam
class PamBackend():
def authenticate(self, request, username=None, password=None):
rc_user = RcLdapUser.objects.get_user_from_suffixed_username(username)
if not rc_user:
... |
d488c1e021c3ce4335223a407cbd82182fd83708 | symposion/cms/managers.py | symposion/cms/managers.py | from datetime import datetime
from django.db import models
class PublishedPageManager(models.Manager):
return qs.filter(publish_date__lte=datetime.now())
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
| from django.utils import timezone
from django.db import models
class PublishedPageManager(models.Manager):
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
return qs.filter(publish_date__lte=timezone.now())
| Use timezone.now instead of datetime.now | Use timezone.now instead of datetime.now
| Python | bsd-3-clause | pyconau2017/symposion,pydata/symposion,faulteh/symposion,pyohio/symposion,euroscipy/symposion,pinax/symposion,euroscipy/symposion,pyconau2017/symposion,toulibre/symposion,miurahr/symposion,faulteh/symposion,miurahr/symposion,pydata/symposion,pinax/symposion,pyohio/symposion,toulibre/symposion | from datetime import datetime
from django.db import models
class PublishedPageManager(models.Manager):
return qs.filter(publish_date__lte=datetime.now())
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
Use timezone.now instead of datetime.now | from django.utils import timezone
from django.db import models
class PublishedPageManager(models.Manager):
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
return qs.filter(publish_date__lte=timezone.now())
| <commit_before>from datetime import datetime
from django.db import models
class PublishedPageManager(models.Manager):
return qs.filter(publish_date__lte=datetime.now())
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
<commit_msg>Use timezone.now instead of datetime.... | from django.utils import timezone
from django.db import models
class PublishedPageManager(models.Manager):
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
return qs.filter(publish_date__lte=timezone.now())
| from datetime import datetime
from django.db import models
class PublishedPageManager(models.Manager):
return qs.filter(publish_date__lte=datetime.now())
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
Use timezone.now instead of datetime.nowfrom django.utils import... | <commit_before>from datetime import datetime
from django.db import models
class PublishedPageManager(models.Manager):
return qs.filter(publish_date__lte=datetime.now())
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
<commit_msg>Use timezone.now instead of datetime.... |
ac3edaab39a32d4108ec04746358f833d3dee7ca | convert_caffe_to_chainer.py | convert_caffe_to_chainer.py | #!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
import_model = "bvlc_googlenet.caffemodel"
print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
model = caffe.CaffeFunction(import_model)
print('Loaded', file=sys.std... | #!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
# import_model = "bvlc_googlenet.caffemodel"
#
# print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
#
# model = caffe.CaffeFunction(import_model)
# print('Loaded', fi... | Add input file name and output file name setting function | Add input file name and output file name setting function
| Python | mit | karaage0703/deeplearning-learning | #!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
import_model = "bvlc_googlenet.caffemodel"
print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
model = caffe.CaffeFunction(import_model)
print('Loaded', file=sys.std... | #!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
# import_model = "bvlc_googlenet.caffemodel"
#
# print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
#
# model = caffe.CaffeFunction(import_model)
# print('Loaded', fi... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
import_model = "bvlc_googlenet.caffemodel"
print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
model = caffe.CaffeFunction(import_model)
print('Loaded... | #!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
# import_model = "bvlc_googlenet.caffemodel"
#
# print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
#
# model = caffe.CaffeFunction(import_model)
# print('Loaded', fi... | #!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
import_model = "bvlc_googlenet.caffemodel"
print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
model = caffe.CaffeFunction(import_model)
print('Loaded', file=sys.std... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
import sys
from chainer.functions import caffe
import cPickle as pickle
import_model = "bvlc_googlenet.caffemodel"
print('Loading Caffe model file %s...' % import_model, file=sys.stderr)
model = caffe.CaffeFunction(import_model)
print('Loaded... |
5cdec883de7d3fcb265776b36ba3490b88fba91b | {{cookiecutter.repo_name}}/tests/test_extension.py | {{cookiecutter.repo_name}}/tests/test_extension.py | from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' in config
def ... | from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config():
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' in config
def test... | Remove no longer needed 'self' argument | tests: Remove no longer needed 'self' argument
| Python | apache-2.0 | mopidy/cookiecutter-mopidy-ext | from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' in config
def ... | from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config():
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' in config
def test... | <commit_before>from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' i... | from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config():
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' in config
def test... | from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' in config
def ... | <commit_before>from __future__ import unicode_literals
from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib
def test_get_default_config(self):
ext = Extension()
config = ext.get_default_config()
assert '[{{ cookiecutter.ext_name }}]' in config
assert 'enabled = true' i... |
8e7cabd8e3bb9e3e01f49823692c5609665cd4ad | conda_manager/app/main.py | conda_manager/app/main.py | # -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers import qapplication... | # -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers import qapplication... | Set AppUserModelID so that the app has the right icon on Windows | Set AppUserModelID so that the app has the right icon on Windows
| Python | mit | spyder-ide/conda-manager,spyder-ide/conda-manager | # -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers import qapplication... | # -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers import qapplication... | <commit_before># -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers impo... | # -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers import qapplication... | # -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers import qapplication... | <commit_before># -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 Gonzalo Peña-Castellanos (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
Application entry point.
"""
# Standard library imports
import sys
# Local imports
from conda_manager.utils.qthelpers impo... |
29dbdd805eb401da5a46ff26d759f249650bedeb | src/enru.py | src/enru.py | import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
# TODO: throw error if there's no word
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(markup, show_exa... | import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(markup, show_examples)
return content
def fetch(sel... | Remove unneeded TODO Click takes care of arguments actually | Remove unneeded TODO
Click takes care of arguments actually
| Python | mit | everyonesdesign/enru,everyonesdesign/enru-python,everyonesdesign/enru-python,everyonesdesign/enru | import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
# TODO: throw error if there's no word
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(markup, show_exa... | import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(markup, show_examples)
return content
def fetch(sel... | <commit_before>import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
# TODO: throw error if there's no word
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(m... | import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(markup, show_examples)
return content
def fetch(sel... | import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
# TODO: throw error if there's no word
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(markup, show_exa... | <commit_before>import urllib
from bs4 import BeautifulSoup
class Enru:
def __init__(self, parser):
self.parser = parser
def run(self, word, show_examples):
# TODO: throw error if there's no word
url = self.get_url(word)
markup = self.fetch(url)
content = self.parse(m... |
2636e549c969431664637907c1ac8502746e476e | test_addons/test_cases.py | test_addons/test_cases.py | # inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
import mixins
from mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo collection and c... | # inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
from . import mixins
from .mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo collecti... | Use relative imports again to support python 3 | Use relative imports again to support python 3
| Python | mit | hspandher/django-test-addons | # inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
import mixins
from mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo collection and c... | # inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
from . import mixins
from .mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo collecti... | <commit_before># inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
import mixins
from mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo c... | # inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
from . import mixins
from .mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo collecti... | # inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
import mixins
from mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo collection and c... | <commit_before># inbuild python imports
# inbuilt django imports
from django.test import LiveServerTestCase
# third party imports
# inter-app imports
# local imports
import mixins
from mixins import SimpleTestCase
class MongoTestCase(mixins.MongoTestMixin, SimpleTestCase):
""" TestCase that creates a mongo c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.