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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
85814828d2caedd8612db6ce0ecec92025a34330 | tests/test_main.py | tests/test_main.py | from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True
... | from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True
... | Add test for bitbucket domain | Add test for bitbucket domain
| Python | bsd-3-clause | michaeljoseph/cookiecutter,Springerle/cookiecutter,Springerle/cookiecutter,venumech/cookiecutter,cguardia/cookiecutter,luzfcb/cookiecutter,pjbull/cookiecutter,agconti/cookiecutter,willingc/cookiecutter,audreyr/cookiecutter,audreyr/cookiecutter,venumech/cookiecutter,takeflight/cookiecutter,dajose/cookiecutter,takeflight... | from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True
... | from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True
... | <commit_before>from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git... | from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True
... | from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True
... | <commit_before>from cookiecutter.main import is_repo_url
def test_is_repo_url():
"""Verify is_repo_url works."""
assert is_repo_url('gitolite@server:team/repo') is True
assert is_repo_url('git@github.com:audreyr/cookiecutter.git') is True
assert is_repo_url('https://github.com/audreyr/cookiecutter.git... |
0de3f3380eda3ed541fbf37243e13243a5ad6e1e | tests/test_open.py | tests/test_open.py | #!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class OpenTestCase(unittest.TestCase):
'''test the handling of Bible reference URLs'''
def test_url(self):
'''should build correct URL to Bible reference'''
url = yvs.get_ref_url('esv/jhn.3.16')
self.ass... | #!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class WebbrowserMock(object):
'''mock the builtin webbrowser module'''
def open(self, url):
'''mock the webbrowser.open() function'''
self.url = url
class OpenTestCase(unittest.TestCase):
'''test the handli... | Add unit test for opening bible reference urls | Add unit test for opening bible reference urls
| Python | mit | caleb531/youversion-suggest,caleb531/youversion-suggest | #!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class OpenTestCase(unittest.TestCase):
'''test the handling of Bible reference URLs'''
def test_url(self):
'''should build correct URL to Bible reference'''
url = yvs.get_ref_url('esv/jhn.3.16')
self.ass... | #!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class WebbrowserMock(object):
'''mock the builtin webbrowser module'''
def open(self, url):
'''mock the webbrowser.open() function'''
self.url = url
class OpenTestCase(unittest.TestCase):
'''test the handli... | <commit_before>#!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class OpenTestCase(unittest.TestCase):
'''test the handling of Bible reference URLs'''
def test_url(self):
'''should build correct URL to Bible reference'''
url = yvs.get_ref_url('esv/jhn.3.16')
... | #!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class WebbrowserMock(object):
'''mock the builtin webbrowser module'''
def open(self, url):
'''mock the webbrowser.open() function'''
self.url = url
class OpenTestCase(unittest.TestCase):
'''test the handli... | #!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class OpenTestCase(unittest.TestCase):
'''test the handling of Bible reference URLs'''
def test_url(self):
'''should build correct URL to Bible reference'''
url = yvs.get_ref_url('esv/jhn.3.16')
self.ass... | <commit_before>#!/usr/bin/env python
import unittest
import yv_suggest.open as yvs
import inspect
class OpenTestCase(unittest.TestCase):
'''test the handling of Bible reference URLs'''
def test_url(self):
'''should build correct URL to Bible reference'''
url = yvs.get_ref_url('esv/jhn.3.16')
... |
b676e0ba5ab1f37147cdf2ff28223fc57f37f567 | models/log_entry.py | models/log_entry.py |
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(1000), index=True)
message = db.Co... |
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(760), index=True)
message = db.Col... | Reduce the size of log_name so it fits within mysql's limit. | Reduce the size of log_name so it fits within mysql's limit.
| Python | agpl-3.0 | izrik/sawmill,izrik/sawmill,izrik/sawmill |
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(1000), index=True)
message = db.Co... |
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(760), index=True)
message = db.Col... | <commit_before>
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(1000), index=True)
... |
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(760), index=True)
message = db.Col... |
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(1000), index=True)
message = db.Co... | <commit_before>
from database import db
from conversions import datetime_from_str
class LogEntry(db.Model):
id = db.Column(db.Integer, primary_key=True)
timestamp = db.Column(db.DateTime, index=True)
server = db.Column(db.String(100), index=True)
log_name = db.Column(db.String(1000), index=True)
... |
006f957d8b6d747ad701d7b39a411df8f562f17f | modules/karmamod.py | modules/karmamod.py | """Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('karma', 'get_ka... | """Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('karma', 'get_ka... | Change to reply only if target has karma | Change to reply only if target has karma
| Python | mit | billyvg/piebot | """Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('karma', 'get_ka... | """Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('karma', 'get_ka... | <commit_before>"""Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('... | """Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('karma', 'get_ka... | """Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('karma', 'get_ka... | <commit_before>"""Keeps track of karma counts.
@package ppbot
@syntax .karma <item>
"""
import re
from modules import *
class Karmamod(Module):
def __init__(self, *args, **kwargs):
"""Constructor"""
Module.__init__(self, kwargs=kwargs)
def _register_events(self):
self.add_command('... |
a4d1659197c0c3da706065d5362fd3b060223c87 | newaccount/views.py | newaccount/views.py | from django.shortcuts import render
from django.http import JsonResponse
import common.render
from common.settings import get_page_config
def form(request):
''' The signup form webpage '''
context = get_page_config(title='New User Sign Up')
context['form'] = [
{'label': 'User Name', 'name': 'usern... | from django.http import JsonResponse
from django.contrib.auth.models import User
from django.core.validators import validate_email
from django.core.exceptions import ValidationError
from django.shortcuts import render
import urllib
import common.render
from common.settings import get_page_config
def form(request):
... | Implement backend newaccount form verification | Implement backend newaccount form verification
| Python | mit | NicolasKiely/Robit-Tracker,NicolasKiely/Robit-Tracker,NicolasKiely/Robit-Tracker | from django.shortcuts import render
from django.http import JsonResponse
import common.render
from common.settings import get_page_config
def form(request):
''' The signup form webpage '''
context = get_page_config(title='New User Sign Up')
context['form'] = [
{'label': 'User Name', 'name': 'usern... | from django.http import JsonResponse
from django.contrib.auth.models import User
from django.core.validators import validate_email
from django.core.exceptions import ValidationError
from django.shortcuts import render
import urllib
import common.render
from common.settings import get_page_config
def form(request):
... | <commit_before>from django.shortcuts import render
from django.http import JsonResponse
import common.render
from common.settings import get_page_config
def form(request):
''' The signup form webpage '''
context = get_page_config(title='New User Sign Up')
context['form'] = [
{'label': 'User Name',... | from django.http import JsonResponse
from django.contrib.auth.models import User
from django.core.validators import validate_email
from django.core.exceptions import ValidationError
from django.shortcuts import render
import urllib
import common.render
from common.settings import get_page_config
def form(request):
... | from django.shortcuts import render
from django.http import JsonResponse
import common.render
from common.settings import get_page_config
def form(request):
''' The signup form webpage '''
context = get_page_config(title='New User Sign Up')
context['form'] = [
{'label': 'User Name', 'name': 'usern... | <commit_before>from django.shortcuts import render
from django.http import JsonResponse
import common.render
from common.settings import get_page_config
def form(request):
''' The signup form webpage '''
context = get_page_config(title='New User Sign Up')
context['form'] = [
{'label': 'User Name',... |
1e562decdc03295dec4cb37d26162e5d9aa31079 | neutron/tests/common/agents/l3_agent.py | neutron/tests/common/agents/l3_agent.py | # Copyright 2014 Red Hat, Inc.
#
# 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 agre... | # Copyright 2014 Red Hat, Inc.
#
# 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 agre... | Update L3 agent drivers singletons to look at new agent | Update L3 agent drivers singletons to look at new agent
L3 agent drivers are singletons. They're created once, and hold
self.l3_agent. During testing, the agent is tossed away and
re-built, but the drivers singletons are pointing at the old
agent, and its old configuration.
Change-Id: Ie8a15318e71ea47cccad3b788751d91... | Python | apache-2.0 | JianyuWang/neutron,SmartInfrastructures/neutron,eayunstack/neutron,skyddv/neutron,MaximNevrov/neutron,watonyweng/neutron,gkotton/neutron,openstack/neutron,mandeepdhami/neutron,glove747/liberty-neutron,projectcalico/calico-neutron,SamYaple/neutron,takeshineshiro/neutron,dims/neutron,watonyweng/neutron,miyakz1192/neutron... | # Copyright 2014 Red Hat, Inc.
#
# 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 agre... | # Copyright 2014 Red Hat, Inc.
#
# 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 agre... | <commit_before># Copyright 2014 Red Hat, Inc.
#
# 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 applica... | # Copyright 2014 Red Hat, Inc.
#
# 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 agre... | # Copyright 2014 Red Hat, Inc.
#
# 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 agre... | <commit_before># Copyright 2014 Red Hat, Inc.
#
# 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 applica... |
a2826203584c6f42b8e48a9eb9285d3a90983b98 | rts/urls.py | rts/urls.py | from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse('admin:index')), name='home'),
u... | from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse_lazy
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse_lazy('admin:index')),
n... | Use reverse_lazy to avoid weird url setup circularity. | Use reverse_lazy to avoid weird url setup circularity.
| Python | bsd-3-clause | praekelt/go-rts-zambia | from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse('admin:index')), name='home'),
u... | from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse_lazy
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse_lazy('admin:index')),
n... | <commit_before>from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse('admin:index')), name... | from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse_lazy
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse_lazy('admin:index')),
n... | from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse('admin:index')), name='home'),
u... | <commit_before>from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'^$', RedirectView.as_view(url=reverse('admin:index')), name... |
b4a2214d84884148760623eb655ac9e538b27370 | planterbox/tests/test_hooks/__init__.py | planterbox/tests/test_hooks/__init__.py | from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(scenario_test):
global hooks_run
hooks_run.add(('before', '... | from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(test):
global hooks_run
hooks_run.add(('before', 'scenario'... | Clarify arguments in tests slightly | Clarify arguments in tests slightly
| Python | mit | npilon/planterbox | from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(scenario_test):
global hooks_run
hooks_run.add(('before', '... | from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(test):
global hooks_run
hooks_run.add(('before', 'scenario'... | <commit_before>from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(scenario_test):
global hooks_run
hooks_run.a... | from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(test):
global hooks_run
hooks_run.add(('before', 'scenario'... | from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(scenario_test):
global hooks_run
hooks_run.add(('before', '... | <commit_before>from planterbox import (
step,
hook,
)
hooks_run = set()
@hook('before', 'feature')
def before_feature_hook(feature_suite):
global hooks_run
hooks_run.add(('before', 'feature'))
@hook('before', 'scenario')
def before_scenario_hook(scenario_test):
global hooks_run
hooks_run.a... |
229d1f1611f7372e43ae5f638b9fcb15fe395432 | notebooks/demo/services/common/tools.py | notebooks/demo/services/common/tools.py | import csv
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def load_db():
with open(os.path.join(HERE, 'The_Haiti_Earthquake_Database.csv')) as f:
reader = csv.DictReader(f)
for elt in reader:
del elt['']
yield elt
HAITI_DB = list(load_db())
| # -*- coding: utf-8 -*-
import csv
import os
import re
HERE = os.path.dirname(os.path.abspath(__file__))
def sexa_to_dec(dh, min, secs, sign):
return sign*(dh + float(min)/60 + float(secs)/60**2)
def string_to_dec(s, neg):
parsed = filter(
None, re.split('[\'" °]', unicode(s, 'utf-8')))
sign ... | Return geo coordinates in decimal | Return geo coordinates in decimal
| Python | mit | DesignSafe-CI/adama_example | import csv
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def load_db():
with open(os.path.join(HERE, 'The_Haiti_Earthquake_Database.csv')) as f:
reader = csv.DictReader(f)
for elt in reader:
del elt['']
yield elt
HAITI_DB = list(load_db())
Return geo coo... | # -*- coding: utf-8 -*-
import csv
import os
import re
HERE = os.path.dirname(os.path.abspath(__file__))
def sexa_to_dec(dh, min, secs, sign):
return sign*(dh + float(min)/60 + float(secs)/60**2)
def string_to_dec(s, neg):
parsed = filter(
None, re.split('[\'" °]', unicode(s, 'utf-8')))
sign ... | <commit_before>import csv
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def load_db():
with open(os.path.join(HERE, 'The_Haiti_Earthquake_Database.csv')) as f:
reader = csv.DictReader(f)
for elt in reader:
del elt['']
yield elt
HAITI_DB = list(load_db())
... | # -*- coding: utf-8 -*-
import csv
import os
import re
HERE = os.path.dirname(os.path.abspath(__file__))
def sexa_to_dec(dh, min, secs, sign):
return sign*(dh + float(min)/60 + float(secs)/60**2)
def string_to_dec(s, neg):
parsed = filter(
None, re.split('[\'" °]', unicode(s, 'utf-8')))
sign ... | import csv
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def load_db():
with open(os.path.join(HERE, 'The_Haiti_Earthquake_Database.csv')) as f:
reader = csv.DictReader(f)
for elt in reader:
del elt['']
yield elt
HAITI_DB = list(load_db())
Return geo coo... | <commit_before>import csv
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def load_db():
with open(os.path.join(HERE, 'The_Haiti_Earthquake_Database.csv')) as f:
reader = csv.DictReader(f)
for elt in reader:
del elt['']
yield elt
HAITI_DB = list(load_db())
... |
70aa7af1a5da51813a09da4f9671e293c4a01d91 | util/connection.py | util/connection.py | import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
DB_URL = os.environ.get('DB_URL')
if not DB_URL:
raise ValueError("DB_URL not present in th... | import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
AIRFLOW_CONN_MYSQL_TRACKER = os.environ.get('AIRFLOW_CONN_MYSQL_TRACKER')
if not AIRFLOW_CONN_M... | Add Mysql Tracker database to store our data | Add Mysql Tracker database to store our data
| Python | apache-2.0 | LREN-CHUV/data-factory-airflow-dags,LREN-CHUV/airflow-mri-preprocessing-dags,LREN-CHUV/data-factory-airflow-dags,LREN-CHUV/airflow-mri-preprocessing-dags | import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
DB_URL = os.environ.get('DB_URL')
if not DB_URL:
raise ValueError("DB_URL not present in th... | import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
AIRFLOW_CONN_MYSQL_TRACKER = os.environ.get('AIRFLOW_CONN_MYSQL_TRACKER')
if not AIRFLOW_CONN_M... | <commit_before>import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
DB_URL = os.environ.get('DB_URL')
if not DB_URL:
raise ValueError("DB_URL no... | import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
AIRFLOW_CONN_MYSQL_TRACKER = os.environ.get('AIRFLOW_CONN_MYSQL_TRACKER')
if not AIRFLOW_CONN_M... | import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
DB_URL = os.environ.get('DB_URL')
if not DB_URL:
raise ValueError("DB_URL not present in th... | <commit_before>import os
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.pool import NullPool
DB_URL = os.environ.get('DB_URL')
if not DB_URL:
raise ValueError("DB_URL no... |
f8464d93ab56f7b8d46e430de4fe9b019117da4c | ofp/v0x01/controller2switch/flow_mod.py | ofp/v0x01/controller2switch/flow_mod.py | """Modifications to the flow table from the controller"""
# System imports
import enum
# Third-party imports
# Local source tree imports
from common import action
from common import flow_match
from common import header as of_header
from foundation import base
from foundation import basic_types
# Enums
class FlowM... | Implement flow table modifications classes and enums | Implement flow table modifications classes and enums
| Python | mit | cemsbr/python-openflow,kytos/python-openflow | Implement flow table modifications classes and enums | """Modifications to the flow table from the controller"""
# System imports
import enum
# Third-party imports
# Local source tree imports
from common import action
from common import flow_match
from common import header as of_header
from foundation import base
from foundation import basic_types
# Enums
class FlowM... | <commit_before><commit_msg>Implement flow table modifications classes and enums<commit_after> | """Modifications to the flow table from the controller"""
# System imports
import enum
# Third-party imports
# Local source tree imports
from common import action
from common import flow_match
from common import header as of_header
from foundation import base
from foundation import basic_types
# Enums
class FlowM... | Implement flow table modifications classes and enums"""Modifications to the flow table from the controller"""
# System imports
import enum
# Third-party imports
# Local source tree imports
from common import action
from common import flow_match
from common import header as of_header
from foundation import base
from ... | <commit_before><commit_msg>Implement flow table modifications classes and enums<commit_after>"""Modifications to the flow table from the controller"""
# System imports
import enum
# Third-party imports
# Local source tree imports
from common import action
from common import flow_match
from common import header as of... | |
6934b792deaad42eb8ab856d1e0420b9a88a8c41 | utility/util.py | utility/util.py | # Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data = Map.objects.... | # Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data = Map.objects.... | Modify parsing logic for last_modified in JSON | Modify parsing logic for last_modified in JSON
| Python | mit | CMUPracticum/TrailScribe,CMUPracticum/TrailScribeServer,CMUPracticum/TrailScribe,CMUPracticum/TrailScribeServer,CMUPracticum/TrailScribe | # Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data = Map.objects.... | # Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data = Map.objects.... | <commit_before># Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data... | # Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data = Map.objects.... | # Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data = Map.objects.... | <commit_before># Stdlib imports
from datetime import datetime
from pytz import timezone
# Core Django imports
from django.utils.timezone import utc
# Imports from app
from sync_center.models import Map, KML
def get_update_id_list(model_name, req_data):
db_data = None
if model_name == 'map':
db_data... |
a66c6d3b9c3453f4ea5a4352de17bb83c75776a5 | settings.py | settings.py | #
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 100
| #
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 101.9
| Update x and y stage limits according to Orbis stage calibration. | Update x and y stage limits according to Orbis stage calibration.
| Python | mit | dngv/JCAPOrbisAlign | #
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 100
Update x and y stage limits according to Orbis stage calibration. | #
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 101.9
| <commit_before>#
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 100
<commit_msg>Update x and y stage limits according to Orbis stage calibration.<commit_after> | #
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 101.9
| #
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 100
Update x and y stage limits according to Orbis stage calibration.#
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'... | <commit_before>#
platedir = 'J:\\hte_jcap_app_proto\\plate'
mapdir = 'J:\\hte_jcap_app_proto\\map'
rundir = 'C:\\INST\\RUNS'
stagx_min = 0
stagx_max = 101.9
stagy_min = 0
stagy_max = 100
<commit_msg>Update x and y stage limits according to Orbis stage calibration.<commit_after>#
platedir = 'J:\\hte_jcap_app_proto\\plat... |
07ef73f98e85919863af43f9c50bde85a143660d | conf_site/reviews/admin.py | conf_site/reviews/admin.py | from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class ProposalFeedbackAdmin... | from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class ProposalFeedbackAdmin... | Enable filtering ProposalVotes by reviewer. | Enable filtering ProposalVotes by reviewer.
| Python | mit | pydata/conf_site,pydata/conf_site,pydata/conf_site | from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class ProposalFeedbackAdmin... | from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class ProposalFeedbackAdmin... | <commit_before>from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class Propos... | from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class ProposalFeedbackAdmin... | from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class ProposalFeedbackAdmin... | <commit_before>from django.contrib import admin
from conf_site.reviews.models import (
ProposalFeedback,
ProposalNotification,
ProposalResult,
ProposalVote,
)
class ProposalInline(admin.StackedInline):
model = ProposalNotification.proposals.through
@admin.register(ProposalFeedback)
class Propos... |
ff65853def5bf1044fe457362f85b8aecca66152 | tests/laser/transaction/create.py | tests/laser/transaction/create.py | import mythril.laser.ethereum.transaction as transaction
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.analysis.security ... | from mythril.laser.ethereum.transaction import execute_contract_creation
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.an... | Update test to reflect the refactor | Update test to reflect the refactor
| Python | mit | b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril | import mythril.laser.ethereum.transaction as transaction
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.analysis.security ... | from mythril.laser.ethereum.transaction import execute_contract_creation
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.an... | <commit_before>import mythril.laser.ethereum.transaction as transaction
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.ana... | from mythril.laser.ethereum.transaction import execute_contract_creation
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.an... | import mythril.laser.ethereum.transaction as transaction
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.analysis.security ... | <commit_before>import mythril.laser.ethereum.transaction as transaction
from mythril.ether import util
import mythril.laser.ethereum.svm as svm
from mythril.disassembler.disassembly import Disassembly
from datetime import datetime
from mythril.ether.soliditycontract import SolidityContract
import tests
from mythril.ana... |
d41d0c15661be517d761e7d6bae2be17495b0f6e | src/deps.py | src/deps.py | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | Update frontend to chrome r108801 | Update frontend to chrome r108801
| Python | apache-2.0 | natduca/trace_event_viewer,natduca/trace_event_viewer,natduca/trace_event_viewer | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | <commit_before># Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | <commit_before># Copyright 2011 Google Inc.
#
# 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... |
77e4fb7ef74bcfd58b548cca8ec9898eb936e7ef | conanfile.py | conanfile.py | from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', 'arch'
gene... | from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', 'arch'
gene... | Remove default option for `desa` | Remove default option for `desa`
| Python | bsd-3-clause | jason2506/esapp,jason2506/esapp | from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', 'arch'
gene... | from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', 'arch'
gene... | <commit_before>from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', ... | from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', 'arch'
gene... | from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', 'arch'
gene... | <commit_before>from conans import ConanFile, CMake
class EsappConan(ConanFile):
name = 'esapp'
version = '0.4.1'
url = 'https://github.com/jason2506/esapp'
license = 'BSD 3-Clause'
author = 'Chi-En Wu'
requires = 'desa/0.1.0@jason2506/testing'
settings = 'os', 'compiler', 'build_type', ... |
5b5f891b6ee714966eefed1adfbd366eb078210f | webpack_resolve.py | webpack_resolve.py | import json
import os
import wiki
PROJECT_ROOT_DIRECTORY = os.path.dirname(globals()['__file__'])
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute path to the wiki
... | import json
import os
import wiki
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
WEBPACK_RESOLVE_FILE = 'webpack-extra-resolve.json'
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute path to the wiki
# static fol... | Remove unnecessary project root variable from webpack resolve script | Remove unnecessary project root variable from webpack resolve script
| Python | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | import json
import os
import wiki
PROJECT_ROOT_DIRECTORY = os.path.dirname(globals()['__file__'])
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute path to the wiki
... | import json
import os
import wiki
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
WEBPACK_RESOLVE_FILE = 'webpack-extra-resolve.json'
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute path to the wiki
# static fol... | <commit_before>import json
import os
import wiki
PROJECT_ROOT_DIRECTORY = os.path.dirname(globals()['__file__'])
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute pa... | import json
import os
import wiki
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
WEBPACK_RESOLVE_FILE = 'webpack-extra-resolve.json'
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute path to the wiki
# static fol... | import json
import os
import wiki
PROJECT_ROOT_DIRECTORY = os.path.dirname(globals()['__file__'])
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute path to the wiki
... | <commit_before>import json
import os
import wiki
PROJECT_ROOT_DIRECTORY = os.path.dirname(globals()['__file__'])
DJANGO_WIKI_STATIC = os.path.join(os.path.dirname(wiki.__file__), 'static')
# This whole file is essentially just a big ugly hack.
# For webpack to properly build wiki static files it needs the absolute pa... |
fdf05b0fa93c350d2cd030e451b0e26ed7393209 | tests/clientlib/validate_manifest_test.py | tests/clientlib/validate_manifest_test.py |
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import run
def test_returns_0_for_valid_manifest():
assert run(['example_manifest.yaml']) == 0
def test... |
import jsonschema
import jsonschema.exceptions
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import MANIFEST_JSON_SCHEMA
from pre_commit.clientlib.validate_m... | Add better tests for manifest json schema | Add better tests for manifest json schema
| Python | mit | chriskuehl/pre-commit,pre-commit/pre-commit,philipgian/pre-commit,beni55/pre-commit,Lucas-C/pre-commit,barrysteyn/pre-commit,Lucas-C/pre-commit,Lucas-C/pre-commit,dnephin/pre-commit,philipgian/pre-commit,dnephin/pre-commit,Teino1978-Corp/pre-commit,philipgian/pre-commit,chriskuehl/pre-commit,chriskuehl/pre-commit-1,dne... |
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import run
def test_returns_0_for_valid_manifest():
assert run(['example_manifest.yaml']) == 0
def test... |
import jsonschema
import jsonschema.exceptions
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import MANIFEST_JSON_SCHEMA
from pre_commit.clientlib.validate_m... | <commit_before>
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import run
def test_returns_0_for_valid_manifest():
assert run(['example_manifest.yaml']) ... |
import jsonschema
import jsonschema.exceptions
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import MANIFEST_JSON_SCHEMA
from pre_commit.clientlib.validate_m... |
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import run
def test_returns_0_for_valid_manifest():
assert run(['example_manifest.yaml']) == 0
def test... | <commit_before>
import pytest
from pre_commit.clientlib.validate_manifest import additional_manifest_check
from pre_commit.clientlib.validate_manifest import InvalidManifestError
from pre_commit.clientlib.validate_manifest import run
def test_returns_0_for_valid_manifest():
assert run(['example_manifest.yaml']) ... |
8da5356b2a08679cbf61cff21db2068980866701 | scripts/master/factory/dart/channels.py | scripts/master/factory/dart/channels.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | Update stable channel builders to 1.6 branch | Update stable channel builders to 1.6 branch
Review URL: https://codereview.chromium.org/494783003
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@291643 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... |
70ef413e0e43103877fc94cdfebd11002e6cbcbd | scripts/master/factory/dart/channels.py | scripts/master/factory/dart/channels.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | Update stable channel to 1.1 | Update stable channel to 1.1
Review URL: https://codereview.chromium.org/138273002
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@244706 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... |
ba93ea71b87c95f4d52c85ae652496ebfb012e1f | pupa/importers/memberships.py | pupa/importers/memberships.py | from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_importer = org_impo... | from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_importer = org_impo... | Add unmatched_legislator to the spec | Add unmatched_legislator to the spec
| Python | bsd-3-clause | datamade/pupa,datamade/pupa,rshorey/pupa,mileswwatkins/pupa,rshorey/pupa,mileswwatkins/pupa,opencivicdata/pupa,influence-usa/pupa,influence-usa/pupa,opencivicdata/pupa | from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_importer = org_impo... | from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_importer = org_impo... | <commit_before>from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_impo... | from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_importer = org_impo... | from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_importer = org_impo... | <commit_before>from .base import BaseImporter
class MembershipImporter(BaseImporter):
_type = 'membership'
def __init__(self, jurisdiction_id, person_importer, org_importer):
super(MembershipImporter, self).__init__(jurisdiction_id)
self.person_importer = person_importer
self.org_impo... |
8a534a9927ac0050b3182243c2b8bbf59127549e | test/multiple_invocations_test.py | test/multiple_invocations_test.py | # Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_immediate():
with mock_api.api(__file__) as api:
api.flow_job()
... | # Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_same_flow():
with mock_api.api(__file__) as api:
api.flow_job()
... | Test two flow invocations after each other | Test two flow invocations after each other
| Python | bsd-3-clause | lechat/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow | # Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_immediate():
with mock_api.api(__file__) as api:
api.flow_job()
... | # Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_same_flow():
with mock_api.api(__file__) as api:
api.flow_job()
... | <commit_before># Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_immediate():
with mock_api.api(__file__) as api:
api.fl... | # Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_same_flow():
with mock_api.api(__file__) as api:
api.flow_job()
... | # Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_immediate():
with mock_api.api(__file__) as api:
api.flow_job()
... | <commit_before># Copyright (c) 2012 - 2014 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import mock_api
def test_multiple_invocations_immediate():
with mock_api.api(__file__) as api:
api.fl... |
dd7682dd12333b9fec63a112a0484e9391937041 | tests/cputestdata/cpu-reformat.py | tests/cputestdata/cpu-reformat.py | #!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("\n")
| #!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("")
| Make sure generated files pass syntax-check | cputest: Make sure generated files pass syntax-check
The tests/cputestdata/cpu-parse.sh would produce JSON files with QEMU
replies which wouldn't pass syntax-check. Let's fix this by not emitting
an extra new line after reformatting the JSON file.
Signed-off-by: Jiri Denemark <62bdf77dc47919a4d59a91822129d14633cfca81... | Python | lgpl-2.1 | olafhering/libvirt,andreabolognani/libvirt,eskultety/libvirt,zippy2/libvirt,andreabolognani/libvirt,jfehlig/libvirt,zippy2/libvirt,jfehlig/libvirt,olafhering/libvirt,zippy2/libvirt,olafhering/libvirt,libvirt/libvirt,crobinso/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,crobinso/libvirt,nertpinx/l... | #!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("\n")
cputest: Make sure generated files pass syntax-check
The tests/cputestdata/cpu-parse.sh would produce JSON files with QEMU
repl... | #!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("")
| <commit_before>#!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("\n")
<commit_msg>cputest: Make sure generated files pass syntax-check
The tests/cputestdata/cpu-parse.sh would produc... | #!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("")
| #!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("\n")
cputest: Make sure generated files pass syntax-check
The tests/cputestdata/cpu-parse.sh would produce JSON files with QEMU
repl... | <commit_before>#!/usr/bin/env python3
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
print("\n")
<commit_msg>cputest: Make sure generated files pass syntax-check
The tests/cputestdata/cpu-parse.sh would produc... |
fc7db2a55ad3f612ac6ef01cfa57ce03040708a5 | evelink/__init__.py | evelink/__init__.py | """EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import parsing
from evelink import server
# Implement NullHa... | """EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import server
# Implement NullHandler because it was only ad... | Remove parsing from public interface | Remove parsing from public interface
| Python | mit | zigdon/evelink,FashtimeDotCom/evelink,bastianh/evelink,ayust/evelink,Morloth1274/EVE-Online-POCO-manager | """EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import parsing
from evelink import server
# Implement NullHa... | """EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import server
# Implement NullHandler because it was only ad... | <commit_before>"""EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import parsing
from evelink import server
# I... | """EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import server
# Implement NullHandler because it was only ad... | """EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import parsing
from evelink import server
# Implement NullHa... | <commit_before>"""EVELink - Python bindings for the EVE API."""
import logging
from evelink import account
from evelink import api
from evelink import char
from evelink import constants
from evelink import corp
from evelink import eve
from evelink import map
from evelink import parsing
from evelink import server
# I... |
46df020f5f349ac02c509e334ffd7e1f5970915b | detectem/exceptions.py | detectem/exceptions.py | class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(msg)
class NoPluginsError(Exception):
def __init__(self, msg):
self.msg = ... | class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(self.msg)
class NoPluginsError(Exception):
def __init__(self, msg):
self.m... | Fix in tests for exception messages | Fix in tests for exception messages
| Python | mit | spectresearch/detectem | class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(msg)
class NoPluginsError(Exception):
def __init__(self, msg):
self.msg = ... | class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(self.msg)
class NoPluginsError(Exception):
def __init__(self, msg):
self.m... | <commit_before>class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(msg)
class NoPluginsError(Exception):
def __init__(self, msg):
... | class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(self.msg)
class NoPluginsError(Exception):
def __init__(self, msg):
self.m... | class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(msg)
class NoPluginsError(Exception):
def __init__(self, msg):
self.msg = ... | <commit_before>class DockerStartError(Exception):
pass
class NotNamedParameterFound(Exception):
pass
class SplashError(Exception):
def __init__(self, msg):
self.msg = 'Splash error: {}'.format(msg)
super().__init__(msg)
class NoPluginsError(Exception):
def __init__(self, msg):
... |
0aaa546435a261a03e27fee53a3c5f334cca6b66 | spacy/tests/regression/test_issue768.py | spacy/tests/regression/test_issue768.py | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import TOKENIZER_EXCEPTIONS, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLIT_IN... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLI... | Fix test after updating the French tokenizer stuff | Fix test after updating the French tokenizer stuff
| Python | mit | raphael0202/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,banglakit/spaCy,banglakit/spaCy,raphael0202/spaCy,recognai/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,oroszgy/spaCy.hu,explosion/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,banglakit/spaCy,banglakit/spaCy,explosion/sp... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import TOKENIZER_EXCEPTIONS, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLIT_IN... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLI... | <commit_before># coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import TOKENIZER_EXCEPTIONS, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix(... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLI... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import TOKENIZER_EXCEPTIONS, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLIT_IN... | <commit_before># coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import TOKENIZER_EXCEPTIONS, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix(... |
6f2db6743f431019a46a2b977cb17dd6f0622fbd | yolodex/urls.py | yolodex/urls.py | from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$',
Entit... | from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$',
Entit... | Fix name of entity graph url | Fix name of entity graph url | Python | mit | correctiv/django-yolodex,correctiv/django-yolodex,correctiv/django-yolodex | from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$',
Entit... | from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$',
Entit... | <commit_before>from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$'... | from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$',
Entit... | from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$',
Entit... | <commit_before>from django.conf.urls import patterns, url, include
from django.utils.translation import ugettext as _
from .views import (
RealmView,
EntityDetailView,
EntityNetworkView,
)
entity_urls = [
url(r'^$', RealmView.as_view(), name='overview'),
url(r'^(?P<type>[\w-]+)/(?P<slug>[\w-]+)/$'... |
9af4f3bc2ddc07e47f311ae51e20e3f99733ea35 | Orange/tests/test_regression.py | Orange/tests/test_regression.py | import unittest
import inspect
import pkgutil
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
pre... | import unittest
import inspect
import pkgutil
import traceback
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__... | Handle TypeError while testing all regression learners | Handle TypeError while testing all regression learners
| Python | bsd-2-clause | qPCR4vir/orange3,marinkaz/orange3,cheral/orange3,kwikadi/orange3,kwikadi/orange3,kwikadi/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,cheral/orange3,marinkaz/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,qPCR4vir/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,cheral/ora... | import unittest
import inspect
import pkgutil
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
pre... | import unittest
import inspect
import pkgutil
import traceback
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__... | <commit_before>import unittest
import inspect
import pkgutil
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
... | import unittest
import inspect
import pkgutil
import traceback
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__... | import unittest
import inspect
import pkgutil
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
pre... | <commit_before>import unittest
import inspect
import pkgutil
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
... |
441da7a34058733c298c81dbd97a35fca6e538e0 | pgpdump/__main__.py | pgpdump/__main__.py | import sys
import cProfile
from . import AsciiData, BinaryData
def parsefile(name):
with open(name) as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
counter ... | import sys
from . import AsciiData, BinaryData
def parsefile(name):
with open(name, 'rb') as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
counter += 1
... | Remove cProfile inclusion, always read file as binary | Remove cProfile inclusion, always read file as binary
Signed-off-by: Dan McGee <2591e5f46f28d303f9dc027d475a5c60d8dea17a@archlinux.org>
| Python | bsd-3-clause | toofishes/python-pgpdump | import sys
import cProfile
from . import AsciiData, BinaryData
def parsefile(name):
with open(name) as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
counter ... | import sys
from . import AsciiData, BinaryData
def parsefile(name):
with open(name, 'rb') as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
counter += 1
... | <commit_before>import sys
import cProfile
from . import AsciiData, BinaryData
def parsefile(name):
with open(name) as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
... | import sys
from . import AsciiData, BinaryData
def parsefile(name):
with open(name, 'rb') as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
counter += 1
... | import sys
import cProfile
from . import AsciiData, BinaryData
def parsefile(name):
with open(name) as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
counter ... | <commit_before>import sys
import cProfile
from . import AsciiData, BinaryData
def parsefile(name):
with open(name) as infile:
if name.endswith('.asc'):
data = AsciiData(infile.read())
else:
data = BinaryData(infile.read())
counter = 0
for packet in data.packets():
... |
bbe86b97f38a3c99e8271a5f167223a965ef1ff0 | docs/conf.py | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.... | Add link to source code in documentation | Add link to source code in documentation
| Python | mit | numberly/thingy | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
impor... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
impor... |
cf2ae3c36c18ac00092736e076be0c4c09df6958 | sklearn_porter/language/go.py | sklearn_porter/language/go.py | # -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '{dest_dir}' + s... | # -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '{dest_dir}' + s... | Remove redundant parentheses around if conditions | feature/oop-api-refactoring: Remove redundant parentheses around if conditions
| Python | bsd-3-clause | nok/sklearn-porter | # -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '{dest_dir}' + s... | # -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '{dest_dir}' + s... | <commit_before># -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '... | # -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '{dest_dir}' + s... | # -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '{dest_dir}' + s... | <commit_before># -*- coding: utf-8 -*-
from os.path import sep
KEY = 'go'
LABEL = 'Go'
DEPENDENCIES = ['go']
TEMP_DIR = 'go'
SUFFIX = 'go'
# go build -o tmp/estimator tmp/estimator.go
CMD_COMPILE = 'go build -o {dest_dir}' + sep + '{dest_file} {src_dir}' + sep + '{src_file}'
# tmp/estimator <args>
CMD_EXECUTE = '... |
8b87a55a03422cc499b2f7cc168bcc0c15c0ae42 | mycli/clibuffer.py | mycli/clibuffer.py | from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
return s... | from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
return s... | Make \G or \g to end a query. | Make \G or \g to end a query.
| Python | bsd-3-clause | j-bennet/mycli,jinstrive/mycli,mdsrosa/mycli,evook/mycli,shoma/mycli,chenpingzhao/mycli,mdsrosa/mycli,D-e-e-m-o/mycli,evook/mycli,jinstrive/mycli,martijnengler/mycli,webwlsong/mycli,webwlsong/mycli,oguzy/mycli,suzukaze/mycli,oguzy/mycli,danieljwest/mycli,MnO2/rediscli,danieljwest/mycli,martijnengler/mycli,D-e-e-m-o/myc... | from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
return s... | from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
return s... | <commit_before>from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
... | from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
return s... | from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
return s... | <commit_before>from prompt_toolkit.buffer import Buffer
from prompt_toolkit.filters import Condition
class CLIBuffer(Buffer):
def __init__(self, always_multiline, *args, **kwargs):
self.always_multiline = always_multiline
@Condition
def is_multiline():
doc = self.document
... |
f268b5e62ca8bbf1712225d4c8d6d38580f38fba | quantum/__init__.py | quantum/__init__.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC
# 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/l... | Make the quantum top-level a namespace package. | Make the quantum top-level a namespace package.
Change-Id: I8fa596dedcc72fcec73972f6bf158e53c17b7e6d
| Python | apache-2.0 | netscaler/neutron,mahak/neutron,miyakz1192/neutron,takeshineshiro/neutron,NeCTAR-RC/neutron,apporc/neutron,klmitch/neutron,JioCloud/neutron,skyddv/neutron,swdream/neutron,rossella/neutron,CiscoSystems/quantum,CiscoSystems/QL3Proto,aristanetworks/arista-ovs-quantum,psiwczak/quantum,eayunstack/neutron,liqin75/vse-vpnaas-... | Make the quantum top-level a namespace package.
Change-Id: I8fa596dedcc72fcec73972f6bf158e53c17b7e6d | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC
# 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/l... | <commit_before><commit_msg>Make the quantum top-level a namespace package.
Change-Id: I8fa596dedcc72fcec73972f6bf158e53c17b7e6d<commit_after> | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC
# 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/l... | Make the quantum top-level a namespace package.
Change-Id: I8fa596dedcc72fcec73972f6bf158e53c17b7e6d# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complian... | <commit_before><commit_msg>Make the quantum top-level a namespace package.
Change-Id: I8fa596dedcc72fcec73972f6bf158e53c17b7e6d<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
... | |
b02d7e1e288eeaf38cfc299765f4c940bad5ea36 | examples/add_misc_features.py | examples/add_misc_features.py | #!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transform')
args = pa... | #!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transform')
args = pa... | Update example with correct form, and with comment. | Update example with correct form, and with comment.
| Python | mit | pyconll/pyconll,pyconll/pyconll | #!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transform')
args = pa... | #!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transform')
args = pa... | <commit_before>#!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transf... | #!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transform')
args = pa... | #!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transform')
args = pa... | <commit_before>#!/usr/bin/env python
#
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_misc_features.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transf... |
94e822e67f3550710347f563ae1d32e301d2e08b | raven/processors.py | raven/processors.py | """
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
resp = self.get_... | """
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
resp = self.get... | Handle var names that are uppercase | Handle var names that are uppercase
| Python | bsd-3-clause | smarkets/raven-python,patrys/opbeat_python,ronaldevers/raven-python,ronaldevers/raven-python,recht/raven-python,danriti/raven-python,lepture/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,nikolas/raven-python,akalipetis/raven-python,johansteffner/raven-python,beniwohli/apm-agent-python,dbravender/raven-pytho... | """
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
resp = self.get_... | """
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
resp = self.get... | <commit_before>"""
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
r... | """
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
resp = self.get... | """
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
resp = self.get_... | <commit_before>"""
raven.core.processors
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
class Processor(object):
def __init__(self, client):
self.client = client
def process(self, data, **kwargs):
r... |
26a53141e844c11e7ff904af2620b7ee125b011d | diana/tracking.py | diana/tracking.py | from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
def update_object(self, record):
try:
oid = record['object']
except KeyError:
return
else:
self.objects.setdefault(oid, {}).update(record)
def remove_object(s... | from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
@property
def player_ship(self):
for _obj in self.objects.values():
if _obj['type'] == p.ObjectType.player_vessel:
return _obj
return {}
def update_object(self, record):
... | Add a convenience method to get the player ship | Add a convenience method to get the player ship
| Python | mit | prophile/libdiana | from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
def update_object(self, record):
try:
oid = record['object']
except KeyError:
return
else:
self.objects.setdefault(oid, {}).update(record)
def remove_object(s... | from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
@property
def player_ship(self):
for _obj in self.objects.values():
if _obj['type'] == p.ObjectType.player_vessel:
return _obj
return {}
def update_object(self, record):
... | <commit_before>from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
def update_object(self, record):
try:
oid = record['object']
except KeyError:
return
else:
self.objects.setdefault(oid, {}).update(record)
def ... | from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
@property
def player_ship(self):
for _obj in self.objects.values():
if _obj['type'] == p.ObjectType.player_vessel:
return _obj
return {}
def update_object(self, record):
... | from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
def update_object(self, record):
try:
oid = record['object']
except KeyError:
return
else:
self.objects.setdefault(oid, {}).update(record)
def remove_object(s... | <commit_before>from . import packet as p
class Tracker:
def __init__(self):
self.objects = {}
def update_object(self, record):
try:
oid = record['object']
except KeyError:
return
else:
self.objects.setdefault(oid, {}).update(record)
def ... |
7ca4b1652dc5fa35bbacc2d587addacc9ce9da83 | fuzzinator/call_job.py | fuzzinator/call_job.py | # Copyright (c) 2016 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base class for jobs... | # Copyright (c) 2016-2018 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base class for... | Prepare test hashing for complex types. | Prepare test hashing for complex types.
| Python | bsd-3-clause | renatahodovan/fuzzinator,renatahodovan/fuzzinator,renatahodovan/fuzzinator,renatahodovan/fuzzinator,akosthekiss/fuzzinator,akosthekiss/fuzzinator,akosthekiss/fuzzinator,akosthekiss/fuzzinator | # Copyright (c) 2016 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base class for jobs... | # Copyright (c) 2016-2018 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base class for... | <commit_before># Copyright (c) 2016 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base... | # Copyright (c) 2016-2018 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base class for... | # Copyright (c) 2016 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base class for jobs... | <commit_before># Copyright (c) 2016 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import hashlib
class CallJob(object):
"""
Base... |
73a4aca6e9c0c4c9ef53e498319bf754c6bb8edb | rippl/rippl/urls.py | rippl/rippl/urls.py | """rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView.as_view()),
... | """rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView.as_view()),
... | Fix line length to pass CI | Fix line length to pass CI | Python | mit | gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl,gnmerritt/dailyrippl | """rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView.as_view()),
... | """rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView.as_view()),
... | <commit_before>"""rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView... | """rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView.as_view()),
... | """rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView.as_view()),
... | <commit_before>"""rippl URL Configuration"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from .registration.forms import RecaptchaRegView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/register/$', RecaptchaRegView... |
089b1c3ab27bb5d3c343d7787a357c49ff56bfc8 | docs/conf.py | docs/conf.py | import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte... | import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte... | Fix a badly indented line. (PEP8 E121) | Fix a badly indented line. (PEP8 E121)
| Python | bsd-3-clause | lamby/django-slack | import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte... | import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte... | <commit_before>import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', '... | import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte... | import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.inte... | <commit_before>import sys
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from django.conf import settings
settings.configure()
project = 'django-slack'
version = ''
release = ''
copyright = '2014, 2015 Chris Lamb'
author = 'lamby'
extensions = ['sphinx.ext.autodoc', '... |
1b9d453f6fe0d2128849f98922f082d6ccfbee69 | channelfilter.py | channelfilter.py | #!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.config)
@prope... | #!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.config)
@prope... | Fix channel filtering to work properly | Fix channel filtering to work properly
| Python | mit | wikimedia/labs-tools-wikibugs2,wikimedia/labs-tools-wikibugs2 | #!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.config)
@prope... | #!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.config)
@prope... | <commit_before>#!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.conf... | #!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.config)
@prope... | #!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.config)
@prope... | <commit_before>#!/usr/bin/env python
import os
import yaml
class ChannelFilter(object):
def __init__(self, path=None):
if path is None:
path = os.path.join(os.path.dirname(__file__), 'channels.yaml')
with open(path) as f:
self.config = yaml.load(f)
print(self.conf... |
8ddc1e40dd505aeb1b28d05238fa198eb3260f94 | fireplace/cards/tgt/hunter.py | fireplace/cards/tgt/hunter.py | from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
##
# Spells
# Lock and Load
class AT_061:
play = Buff(FRIENDLY_HERO, "AT_061e")
class AT_061e:
events = OWN_SPELL_PLAY.on(
Give(CONTROLLER, RandomCollectible(card_class=C... | from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
# Stablemaster
class AT_057:
play = Buff(TARGET, "AT_057o")
# Brave Archer
class AT_059:
inspire = Find(CONTROLLER_HAND) | Hit(ENEMY_HERO, 2)
##
# Spells
# Powershot
cla... | Implement more TGT Hunter cards | Implement more TGT Hunter cards
| Python | agpl-3.0 | smallnamespace/fireplace,Ragowit/fireplace,Ragowit/fireplace,amw2104/fireplace,NightKev/fireplace,liujimj/fireplace,jleclanche/fireplace,Meerkov/fireplace,oftc-ftw/fireplace,liujimj/fireplace,amw2104/fireplace,Meerkov/fireplace,oftc-ftw/fireplace,beheh/fireplace,smallnamespace/fireplace | from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
##
# Spells
# Lock and Load
class AT_061:
play = Buff(FRIENDLY_HERO, "AT_061e")
class AT_061e:
events = OWN_SPELL_PLAY.on(
Give(CONTROLLER, RandomCollectible(card_class=C... | from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
# Stablemaster
class AT_057:
play = Buff(TARGET, "AT_057o")
# Brave Archer
class AT_059:
inspire = Find(CONTROLLER_HAND) | Hit(ENEMY_HERO, 2)
##
# Spells
# Powershot
cla... | <commit_before>from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
##
# Spells
# Lock and Load
class AT_061:
play = Buff(FRIENDLY_HERO, "AT_061e")
class AT_061e:
events = OWN_SPELL_PLAY.on(
Give(CONTROLLER, RandomCollectib... | from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
# Stablemaster
class AT_057:
play = Buff(TARGET, "AT_057o")
# Brave Archer
class AT_059:
inspire = Find(CONTROLLER_HAND) | Hit(ENEMY_HERO, 2)
##
# Spells
# Powershot
cla... | from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
##
# Spells
# Lock and Load
class AT_061:
play = Buff(FRIENDLY_HERO, "AT_061e")
class AT_061e:
events = OWN_SPELL_PLAY.on(
Give(CONTROLLER, RandomCollectible(card_class=C... | <commit_before>from ..utils import *
##
# Minions
# Ram Wrangler
class AT_010:
play = Find(FRIENDLY_MINIONS + BEAST) & Summon(CONTROLLER, RandomBeast())
##
# Spells
# Lock and Load
class AT_061:
play = Buff(FRIENDLY_HERO, "AT_061e")
class AT_061e:
events = OWN_SPELL_PLAY.on(
Give(CONTROLLER, RandomCollectib... |
f17da7465592eede8be261ed3f997881f596ef18 | examples/helloworld/helloworld.py | examples/helloworld/helloworld.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=512, tile_overlap=2, tile_format="png",
image_quality=0.8, resize_filter... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=128, tile_overlap=2, tile_format="png",
image_quality=0.8, resize_filter... | Tweak example image conversion settings. | Tweak example image conversion settings.
| Python | bsd-3-clause | uekeueke/deepzoom.py,edsilv/deepzoom.py,uekeueke/deepzoom.py,edsilv/deepzoom.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=512, tile_overlap=2, tile_format="png",
image_quality=0.8, resize_filter... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=128, tile_overlap=2, tile_format="png",
image_quality=0.8, resize_filter... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=512, tile_overlap=2, tile_format="png",
image_quality=0.8... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=128, tile_overlap=2, tile_format="png",
image_quality=0.8, resize_filter... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=512, tile_overlap=2, tile_format="png",
image_quality=0.8, resize_filter... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import deepzoom
# Specify your source image
SOURCE = "helloworld.jpg"
# Create Deep Zoom Image creator with weird parameters
creator = deepzoom.ImageCreator(tile_size=512, tile_overlap=2, tile_format="png",
image_quality=0.8... |
26e0d89e5178fb05b95f56cbef58ac37bfa6f1d9 | camera_opencv.py | camera_opencv.py | import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
@staticmethod
def set_video_source(source):
Camera.video_source = source
@staticmethod
def frames():
camera = cv2.VideoCapture(Camera.video_source)
if not camera.isOpened():
... | import os
import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
def __init__(self):
if os.environ.get('OPENCV_CAMERA_SOURCE'):
Camera.set_video_source(int(os.environ['OPENCV_CAMERA_SOURCE']))
super(Camera, self).__init__()
@staticmethod
... | Use OPENCV_CAMERA_SOURCE environment variable to set source | Use OPENCV_CAMERA_SOURCE environment variable to set source
| Python | mit | miguelgrinberg/flask-video-streaming,miguelgrinberg/flask-video-streaming | import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
@staticmethod
def set_video_source(source):
Camera.video_source = source
@staticmethod
def frames():
camera = cv2.VideoCapture(Camera.video_source)
if not camera.isOpened():
... | import os
import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
def __init__(self):
if os.environ.get('OPENCV_CAMERA_SOURCE'):
Camera.set_video_source(int(os.environ['OPENCV_CAMERA_SOURCE']))
super(Camera, self).__init__()
@staticmethod
... | <commit_before>import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
@staticmethod
def set_video_source(source):
Camera.video_source = source
@staticmethod
def frames():
camera = cv2.VideoCapture(Camera.video_source)
if not camera.isOpen... | import os
import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
def __init__(self):
if os.environ.get('OPENCV_CAMERA_SOURCE'):
Camera.set_video_source(int(os.environ['OPENCV_CAMERA_SOURCE']))
super(Camera, self).__init__()
@staticmethod
... | import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
@staticmethod
def set_video_source(source):
Camera.video_source = source
@staticmethod
def frames():
camera = cv2.VideoCapture(Camera.video_source)
if not camera.isOpened():
... | <commit_before>import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
video_source = 0
@staticmethod
def set_video_source(source):
Camera.video_source = source
@staticmethod
def frames():
camera = cv2.VideoCapture(Camera.video_source)
if not camera.isOpen... |
b41ac0e6a5f4518b261b9106c2fbce7c55b3b9a5 | python/test/test_survey_submit.py | python/test/test_survey_submit.py | #!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
data = 'data'
client = EpiDBClient()
res = client.survey_submit(data)
print res
| #!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
key = '0123456789abcdef0123456789abcdef01234567'
data = 'data'
client = EpiDBClient(key)
res = client.survey_submit(data)
print res
| Update example to use api-key. | [python] Update example to use api-key.
| Python | agpl-3.0 | ISIFoundation/influenzanet-epidb-client | #!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
data = 'data'
client = EpiDBClient()
res = client.survey_submit(data)
print res
[python] Update example to use api-key. | #!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
key = '0123456789abcdef0123456789abcdef01234567'
data = 'data'
client = EpiDBClient(key)
res = client.survey_submit(data)
print res
| <commit_before>#!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
data = 'data'
client = EpiDBClient()
res = client.survey_submit(data)
print res
<commit_msg>[python] Update example to use api-key.<commit_after> | #!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
key = '0123456789abcdef0123456789abcdef01234567'
data = 'data'
client = EpiDBClient(key)
res = client.survey_submit(data)
print res
| #!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
data = 'data'
client = EpiDBClient()
res = client.survey_submit(data)
print res
[python] Update example to use api-key.#!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
key = '01234... | <commit_before>#!/usr/bin/env python
import sys
sys.path += ['../']
from epidb.client import EpiDBClient
data = 'data'
client = EpiDBClient()
res = client.survey_submit(data)
print res
<commit_msg>[python] Update example to use api-key.<commit_after>#!/usr/bin/env python
import sys
sys.path += ['../']
from epid... |
8dc4245db8e64fd5024e1d6fe0bc1b230b2dce85 | server/cg/manage.py | server/cg/manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings.dev")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| Set default settings to dev | Set default settings to dev
| Python | mit | pramodliv1/conceptgrapher,pramodliv1/conceptgrapher,pramodliv1/conceptgrapher | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Set default settings to dev | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings.dev")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Set default settings to dev<commit_after> | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings.dev")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Set default settings to dev#!/usr/bin/env python
import os
import sys
if _... | <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cg.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Set default settings to dev<commit_after>#!/usr/... |
f034f69a24cd2a4048e23c54c73badd0674eb1aa | views/base.py | views/base.py | from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first()
return re... | from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first()
return re... | Fix the events page, so that upcoming event shows up. | Fix the events page, so that upcoming event shows up.
| Python | mit | saseumn/website,saseumn/website | from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first()
return re... | from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first()
return re... | <commit_before>from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first(... | from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first()
return re... | from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first()
return re... | <commit_before>from datetime import datetime, timedelta
from flask import Blueprint, render_template
from sqlalchemy import and_
from models import Event
blueprint = Blueprint("base", __name__)
@blueprint.route("/")
def index():
upcoming = Event.query.filter_by(published=True).order_by(Event.start_time).first(... |
3f48d0fb0e44d35f29990c0d32c032ecee8fbe65 | conftest.py | conftest.py | import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
os.environ['DJANGO_CONFIGURATION'] = 'Test... | import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
import dotenv
dotenv.read_dotenv()
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
... | Read our .env when we test. | Read our .env when we test.
| Python | apache-2.0 | hello-base/web,hello-base/web,hello-base/web,hello-base/web | import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
os.environ['DJANGO_CONFIGURATION'] = 'Test... | import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
import dotenv
dotenv.read_dotenv()
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
... | <commit_before>import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
os.environ['DJANGO_CONFIGUR... | import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
import dotenv
dotenv.read_dotenv()
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
... | import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
os.environ['DJANGO_CONFIGURATION'] = 'Test... | <commit_before>import os
from django import get_version
from django.conf import settings
def pytest_report_header(config):
return 'django: ' + get_version()
def pytest_configure():
if not settings.configured:
os.environ['DJANGO_SETTINGS_MODULE'] = 'base.settings'
os.environ['DJANGO_CONFIGUR... |
8a663ecc384a1b0d43f554b894571103348ad7ab | responsive_design_helper/views.py | responsive_design_helper/views.py | from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(self, **kwargs):... | from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(self, **kwargs):... | Adjust so it works properly with types | Adjust so it works properly with types
| Python | apache-2.0 | tswicegood/django-responsive-design-helper,tswicegood/django-responsive-design-helper | from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(self, **kwargs):... | from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(self, **kwargs):... | <commit_before>from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(s... | from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(self, **kwargs):... | from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(self, **kwargs):... | <commit_before>from django.views.generic import TemplateView
class ResponsiveTestView(TemplateView):
template_name = "responsive_design_helper/%s.html"
def get_template_names(self, **kwargs):
t = self.kwargs.get('type', 'all') or 'all'
return self.template_name % t
def get_context_data(s... |
005ac5832a4992c2d1091505c2be10ae6ad34ef5 | seleniumbase/config/proxy_list.py | seleniumbase/config/proxy_list.py | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | Update the example proxy list | Update the example proxy list
| Python | mit | mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | <commit_before>"""
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:passwor... | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | """
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:password@ip_address:po... | <commit_before>"""
Proxy Server "Phone Book".
Simplify running browser tests through a proxy server
by adding your frequently-used proxies here.
Now you can do something like this on the command line:
"pytest SOME_TEST.py --proxy=proxy1"
Format of PROXY_LIST server entries:
* "ip_address:port" OR "username:passwor... |
eda35123356edd20b361aa2f1d1f20cc7b922e39 | settings_example.py | settings_example.py | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''.join([
r'(?P<year>\d{4})',
r'(?P<month>\d{2})',
r'(?P<day... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''... | Add CSV file name format setting example | Add CSV file name format setting example
| Python | mit | AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''.join([
r'(?P<year>\d{4})',
r'(?P<month>\d{2})',
r'(?P<day... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''... | <commit_before>import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''.join([
r'(?P<year>\d{4})',
r'(?P<month>\d{2... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''.join([
r'(?P<year>\d{4})',
r'(?P<month>\d{2})',
r'(?P<day... | <commit_before>import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Restrict emails by sender.
EMAIL_FROM = 'sender@example.com'
# Restrict emails by subject.
EMAIL_SUBJECT_RE = re.compile(''.join([
r'(?P<year>\d{4})',
r'(?P<month>\d{2... |
020d6e2bff5975aad79833bdf28c6a791e7953d1 | instabrade/__init__.py | instabrade/__init__.py | from __future__ import absolute_import
from collections import namedtuple
import pbr.version
__version__ = pbr.version.VersionInfo('instabrade').version_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
css_... | from __future__ import absolute_import
from collections import namedtuple
from pbr.version import VersionInfo
__version__ = VersionInfo('instabrade').semantic_version().release_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
... | Update how version is determined | Update how version is determined
| Python | mit | levi-rs/instabrade | from __future__ import absolute_import
from collections import namedtuple
import pbr.version
__version__ = pbr.version.VersionInfo('instabrade').version_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
css_... | from __future__ import absolute_import
from collections import namedtuple
from pbr.version import VersionInfo
__version__ = VersionInfo('instabrade').semantic_version().release_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
... | <commit_before>from __future__ import absolute_import
from collections import namedtuple
import pbr.version
__version__ = pbr.version.VersionInfo('instabrade').version_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
... | from __future__ import absolute_import
from collections import namedtuple
from pbr.version import VersionInfo
__version__ = VersionInfo('instabrade').semantic_version().release_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
... | from __future__ import absolute_import
from collections import namedtuple
import pbr.version
__version__ = pbr.version.VersionInfo('instabrade').version_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
css_... | <commit_before>from __future__ import absolute_import
from collections import namedtuple
import pbr.version
__version__ = pbr.version.VersionInfo('instabrade').version_string()
PageID = namedtuple("PageID", "name css_path attr attr_value")
LOG_IN_IDENTIFIER = PageID(name='Log In Page Identifier',
... |
438d78058951179f947480b0340752fa9b372a9d | sqs.py | sqs.py | from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
super(SQSRequest, self).__init__... | from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
t = datetime.datetime.utcnow()
... | Add init code to deal with AWS HTTP API | Add init code to deal with AWS HTTP API
| Python | mit | MA3STR0/AsyncAWS | from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
super(SQSRequest, self).__init__... | from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
t = datetime.datetime.utcnow()
... | <commit_before>from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
super(SQSRequest,... | from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
t = datetime.datetime.utcnow()
... | from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
super(SQSRequest, self).__init__... | <commit_before>from tornado.httpclient import AsyncHTTPClient, HTTPRequest, HTTPClient
from tornado.httputil import url_concat
import datetime
import hashlib
import hmac
class SQSRequest(HTTPRequest):
"""SQS AWS Adapter for Tornado HTTP request"""
def __init__(self, *args, **kwargs):
super(SQSRequest,... |
d5c65f6ac2cdae3310f41efb9ab0a6d5cae63357 | kopytka/managers.py | kopytka/managers.py | from django.db import models
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
| from django.db import models
from .transforms import SKeys
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
def fragment_keys(self):
return self.annotate(keys=SKeys('fragments')).values_list('keys', flat=True)
| Add fragment_keys method to PageQuerySet | Add fragment_keys method to PageQuerySet
| Python | mit | funkybob/kopytka,funkybob/kopytka,funkybob/kopytka | from django.db import models
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
Add fragment_keys method to PageQuerySet | from django.db import models
from .transforms import SKeys
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
def fragment_keys(self):
return self.annotate(keys=SKeys('fragments')).values_list('keys', flat=True)
| <commit_before>from django.db import models
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
<commit_msg>Add fragment_keys method to PageQuerySet<commit_after> | from django.db import models
from .transforms import SKeys
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
def fragment_keys(self):
return self.annotate(keys=SKeys('fragments')).values_list('keys', flat=True)
| from django.db import models
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
Add fragment_keys method to PageQuerySetfrom django.db import models
from .transforms import SKeys
class PageQuerySet(models.QuerySet):
def published(self):
return s... | <commit_before>from django.db import models
class PageQuerySet(models.QuerySet):
def published(self):
return self.filter(is_published=True)
<commit_msg>Add fragment_keys method to PageQuerySet<commit_after>from django.db import models
from .transforms import SKeys
class PageQuerySet(models.QuerySet):
... |
4bf7f15896677b1ffb5678710086e13ff0c3e094 | PyFVCOM/__init__.py | PyFVCOM/__init__.py | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_tools
from PyFV... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_tools
from PyFV... | Fix sorting of the imports. | Fix sorting of the imports.
| Python | mit | pwcazenave/PyFVCOM | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_tools
from PyFV... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_tools
from PyFV... | <commit_before>"""
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_tools
from PyFV... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_tools
from PyFV... | <commit_before>"""
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '1.6.2'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy_... |
fcad1fa7187fe81d80b8861df2851402be01b667 | PyFVCOM/__init__.py | PyFVCOM/__init__.py | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy
from PyFVCOM im... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave', 'Michael Bedington']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import... | Add Mike as a contributor. | Add Mike as a contributor.
| Python | mit | pwcazenave/PyFVCOM | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy
from PyFVCOM im... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave', 'Michael Bedington']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import... | <commit_before>"""
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy
... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave', 'Michael Bedington']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import... | """
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy
from PyFVCOM im... | <commit_before>"""
The FVCOM Python toolbox (PyFVCOM)
"""
__version__ = '2.0.0'
__author__ = 'Pierre Cazenave'
__credits__ = ['Pierre Cazenave']
__license__ = 'MIT'
__maintainer__ = 'Pierre Cazenave'
__email__ = 'pica@pml.ac.uk'
import inspect
from warnings import warn
# Import everything!
from PyFVCOM import buoy
... |
cf2615c2488198bd9f904a4e65ac4fc0e0d6c475 | insertion.py | insertion.py | import timeit
def insertion(_list):
'''Sorts a list via the insertion method.'''
if type(_list) is not list:
raise TypeError('Entire list must be numbers')
for i in range(1, len(_list)):
key = _list[i]
if not isinstance(key, int):
raise TypeError('Entire list must be nu... | import time
def timed_func(func):
"""Decorator for timing our traversal methods."""
def timed(*args, **kwargs):
start = time.time()
result = func(*args, **kwargs)
elapsed = time.time() - start
# print "time expired: %s" % elapsed
return (result, elapsed)
return time... | Add timing to show time complexity. | Add timing to show time complexity.
| Python | mit | bm5w/second_dataS | import timeit
def insertion(_list):
'''Sorts a list via the insertion method.'''
if type(_list) is not list:
raise TypeError('Entire list must be numbers')
for i in range(1, len(_list)):
key = _list[i]
if not isinstance(key, int):
raise TypeError('Entire list must be nu... | import time
def timed_func(func):
"""Decorator for timing our traversal methods."""
def timed(*args, **kwargs):
start = time.time()
result = func(*args, **kwargs)
elapsed = time.time() - start
# print "time expired: %s" % elapsed
return (result, elapsed)
return time... | <commit_before>import timeit
def insertion(_list):
'''Sorts a list via the insertion method.'''
if type(_list) is not list:
raise TypeError('Entire list must be numbers')
for i in range(1, len(_list)):
key = _list[i]
if not isinstance(key, int):
raise TypeError('Entire ... | import time
def timed_func(func):
"""Decorator for timing our traversal methods."""
def timed(*args, **kwargs):
start = time.time()
result = func(*args, **kwargs)
elapsed = time.time() - start
# print "time expired: %s" % elapsed
return (result, elapsed)
return time... | import timeit
def insertion(_list):
'''Sorts a list via the insertion method.'''
if type(_list) is not list:
raise TypeError('Entire list must be numbers')
for i in range(1, len(_list)):
key = _list[i]
if not isinstance(key, int):
raise TypeError('Entire list must be nu... | <commit_before>import timeit
def insertion(_list):
'''Sorts a list via the insertion method.'''
if type(_list) is not list:
raise TypeError('Entire list must be numbers')
for i in range(1, len(_list)):
key = _list[i]
if not isinstance(key, int):
raise TypeError('Entire ... |
fb8db56ca83a18860ed1ae279d3f390456e224fe | cinder/brick/initiator/host_driver.py | cinder/brick/initiator/host_driver.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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.apac... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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.apac... | Check if dir exists before calling listdir | Check if dir exists before calling listdir
Changes along the way to how we clean up and detach after
copying an image to a volume exposed a problem in the cleanup
of the brick/initiator routines.
The clean up in the initiator detach was doing a blind listdir
of /dev/disk/by-path, however due to detach and cleanup bei... | Python | apache-2.0 | rickerc/cinder_audit,rickerc/cinder_audit | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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.apac... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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.apac... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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
#
# ... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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.apac... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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.apac... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# 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
#
# ... |
d7157d2999a4d9a8f624c3b509726b49d9193a01 | conllu/compat.py | conllu/compat.py | try:
from io import StringIO
except ImportError:
from StringIO import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextlib.contextmanag... | from io import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextlib.contextmanager
def redirect_stdout(target):
original = sys.stdo... | Remove special case from StringIO. | Remove special case from StringIO.
| Python | mit | EmilStenstrom/conllu | try:
from io import StringIO
except ImportError:
from StringIO import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextlib.contextmanag... | from io import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextlib.contextmanager
def redirect_stdout(target):
original = sys.stdo... | <commit_before>try:
from io import StringIO
except ImportError:
from StringIO import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextl... | from io import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextlib.contextmanager
def redirect_stdout(target):
original = sys.stdo... | try:
from io import StringIO
except ImportError:
from StringIO import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextlib.contextmanag... | <commit_before>try:
from io import StringIO
except ImportError:
from StringIO import StringIO
try:
FileNotFoundError = FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
import sys
@contextl... |
d1e1ce5612e1437b2776043f3b6276be5b1d25a6 | csv_converter.py | csv_converter.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
self.rows = [... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
self.rows = [... | Add checking empty product code | Add checking empty product code
| Python | mit | stormaaja/csvconverter,stormaaja/csvconverter,stormaaja/csvconverter | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
self.rows = [... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
self.rows = [... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
self.rows = [... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
self.rows = [... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
class CsvConverter:
def __init__(self, csv_file_path):
self.csv_file_path = csv_file_path
self.rows = []
self.source_product_code = "product_code"
self.source_quantity = "quantity"
def clear(self):
... |
d78188713ffd3e36514ba0db5f74bae111e6a7dc | calc.py | calc.py | """calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
elif command =... | """calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
elif command =... | Add usage string for fallthrough cases | Add usage string for fallthrough cases
| Python | bsd-3-clause | mkuiper/calc-1 | """calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
elif command =... | """calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
elif command =... | <commit_before>"""calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
... | """calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
elif command =... | """calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
elif command =... | <commit_before>"""calc.py: A simple calculator."""
import sys
def add_all(nums):
return sum(nums)
def multiply_all(nums):
return reduce(lambda a, b: a * b, nums)
if __name__ == '__main__':
command = sys.argv[1]
nums = map(float, sys.argv[2:])
if command == 'add':
print(add_all(nums))
... |
b43504e09881a92525ae18ef76591f7c2ebe5f8c | newsman/watchdog/clean_process.py | newsman/watchdog/clean_process.py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"""
command ... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"""
command ... | Change process killing from -9 to -15 | Change process killing from -9 to -15
| Python | agpl-3.0 | chengdujin/newsman,chengdujin/newsman,chengdujin/newsman | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"""
command ... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"""
command ... | <commit_before>#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"""
command ... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"""
command ... | <commit_before>#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
clean zombie processes
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Aug. 22, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
import subprocess
def clean():
"""
kill zombie processes if there is any
"... |
3ac6f578397235e8eda686fe3589cda780af53d5 | ginga/qtw/Plot.py | ginga/qtw/Plot.py | #
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui, QtCore
from g... | #
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui, QtCore
from g... | Fix for import error with matplotlib Qt4Agg backend | Fix for import error with matplotlib Qt4Agg backend
| Python | bsd-3-clause | stscieisenhamer/ginga,ejeschke/ginga,sosey/ginga,Cadair/ginga,rupak0577/ginga,eteq/ginga,rajul/ginga,ejeschke/ginga,pllim/ginga,ejeschke/ginga,sosey/ginga,naojsoft/ginga,naojsoft/ginga,Cadair/ginga,rupak0577/ginga,rajul/ginga,eteq/ginga,stscieisenhamer/ginga,rupak0577/ginga,pllim/ginga,sosey/ginga,stscieisenhamer/ginga... | #
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui, QtCore
from g... | #
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui, QtCore
from g... | <commit_before>#
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui... | #
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui, QtCore
from g... | #
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui, QtCore
from g... | <commit_before>#
# Plot.py -- Plotting function for Ginga FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
# GUI imports
from ginga.qtw.QtHelp import QtGui... |
8ccbddffc2c41cbe623439c76cfde7097f5fa801 | nighttrain/utils.py | nighttrain/utils.py | # Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | # Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | Fix crash when there are no includes for a task | Fix crash when there are no includes for a task
| Python | apache-2.0 | ssssam/nightbus,ssssam/nightbus | # Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | # Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | <commit_before># Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | # Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | # Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | <commit_before># Copyright 2017 Codethink Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
f0b27af3cc09808146442c94df7c76127776acf8 | gslib/devshell_auth_plugin.py | gslib/devshell_auth_plugin.py | # -*- coding: utf-8 -*-
# Copyright 2015 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 require... | # -*- coding: utf-8 -*-
# Copyright 2015 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 require... | Fix provider check causing Devshell auth failure | Fix provider check causing Devshell auth failure
This commit builds on commit 13c4926, allowing Devshell credentials to
be used only with Google storage.
| Python | apache-2.0 | GoogleCloudPlatform/gsutil,GoogleCloudPlatform/gsutil,fishjord/gsutil,BrandonY/gsutil | # -*- coding: utf-8 -*-
# Copyright 2015 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 require... | # -*- coding: utf-8 -*-
# Copyright 2015 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 require... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2015 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
#
#... | # -*- coding: utf-8 -*-
# Copyright 2015 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 require... | # -*- coding: utf-8 -*-
# Copyright 2015 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 require... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2015 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
#
#... |
519a5afc8c8561166f4d8fb0ca43f0ff35a0389b | addons/hr_payroll_account/__manifest__.py | addons/hr_payroll_account/__manifest__.py | #-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expense Encoding
... | #-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expense Encoding
... | Remove useless dependency to hr_expense | [IMP] hr_payroll_account: Remove useless dependency to hr_expense
| Python | agpl-3.0 | ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo | #-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expense Encoding
... | #-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expense Encoding
... | <commit_before>#-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expen... | #-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expense Encoding
... | #-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expense Encoding
... | <commit_before>#-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Payroll Accounting',
'category': 'Human Resources',
'description': """
Generic Payroll system Integrated with Accounting.
==================================================
* Expen... |
84f111f6b5029fc86645311866310b5de48a39e3 | mqo_program/__openerp__.py | mqo_program/__openerp__.py | # -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules list... | # -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules list... | Add required dependency to mqo_programs. | [IMP] Add required dependency to mqo_programs. | Python | agpl-3.0 | drummingbird/mqo,drummingbird/mqo | # -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules list... | # -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules list... | <commit_before># -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules ... | # -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules list... | # -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules list... | <commit_before># -*- coding: utf-8 -*-
{
'name': "MQO Programs",
'summary': """Manage programs""",
'description': """
MQO module for managing programs:
""",
'author': "Your Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules ... |
671a932682f37912b11413f989ad52cf6b046ed6 | basex-api/src/main/python/QueryExample.py | basex-api/src/main/python/QueryExample.py | # This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session
session = B... | # This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session
session = B... | Fix a bug on a query example for python | Fix a bug on a query example for python
Methods used by the former example, `query.more()` and `query.next()`, do not exist any longer.
I've modified them to `query.execute()`, according to `BaseXClient.py`, to make it run as good as it should be. | Python | bsd-3-clause | ksclarke/basex,deshmnnit04/basex,dimitarp/basex,joansmith/basex,joansmith/basex,dimitarp/basex,ksclarke/basex,drmacro/basex,dimitarp/basex,dimitarp/basex,BaseXdb/basex,joansmith/basex,vincentml/basex,drmacro/basex,joansmith/basex,BaseXdb/basex,BaseXdb/basex,JensErat/basex,joansmith/basex,JensErat/basex,ksclarke/basex,J... | # This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session
session = B... | # This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session
session = B... | <commit_before># This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session... | # This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session
session = B... | # This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session
session = B... | <commit_before># This example shows how queries can be executed in an iterative manner.
# Iterative evaluation will be slower, as more server requests are performed.
#
# Documentation: http://docs.basex.org/wiki/Clients
#
# (C) BaseX Team 2005-12, BSD License
import BaseXClient, time
try:
# create session... |
c6cf2fbe34f536f4c2f25e7359c6cdf1d05a55cb | image_analysis.py | image_analysis.py | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
input... | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
input... | Fix extracted star coordinates from 1- to 0-based indexing | Fix extracted star coordinates from 1- to 0-based indexing
Note that center of first pixel is 0, ie. edge of first pixel is -0.5
| Python | mit | lkangas/python-tycho2 | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
input... | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
input... | <commit_before># -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
... | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
input... | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
input... | <commit_before># -*- coding: utf-8 -*-
"""
Created on Mon Dec 25 15:19:55 2017
@author: vostok
"""
import os
import tempfile
from astropy.io import fits
def extract_stars(input_array):
(infilehandle, infilepath) = tempfile.mkstemp(suffix='.fits')
os.close(infilehandle)
fits.writeto(infilepath, \
... |
5b4684b3a5b2c37c23fb83bc14ceda6cf7c01412 | ironic/tests/unit/__init__.py | ironic/tests/unit/__init__.py | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | Stop adding translation function to builtins | Stop adding translation function to builtins
In unittests __init__ translation function is still being added to
builtins, this is not required anymore as it is not being installed.
Change-Id: I19da395b72622a6db348f5a6dd569c7747eaa40d
| Python | apache-2.0 | SauloAislan/ironic,NaohiroTamura/ironic,openstack/ironic,pshchelo/ironic,hpproliant/ironic,devananda/ironic,ionutbalutoiu/ironic,dims/ironic,bacaldwell/ironic,ionutbalutoiu/ironic,bacaldwell/ironic,NaohiroTamura/ironic,openstack/ironic,pshchelo/ironic,dims/ironic,SauloAislan/ironic | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | <commit_before># Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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... | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | <commit_before># Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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... |
35c66f3ade85b6b7b4e19c95b0d6a09e53b12bee | src/pip/_internal/models/index.py | src/pip/_internal/models/index.py | from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
self.netloc = urll... | from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
self.netloc = urll... | Fix a mistake made while merging | Fix a mistake made while merging
| Python | mit | xavfernandez/pip,rouge8/pip,pfmoore/pip,techtonik/pip,rouge8/pip,pradyunsg/pip,pypa/pip,rouge8/pip,xavfernandez/pip,xavfernandez/pip,sbidoul/pip,techtonik/pip,pypa/pip,pradyunsg/pip,pfmoore/pip,sbidoul/pip,techtonik/pip | from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
self.netloc = urll... | from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
self.netloc = urll... | <commit_before>from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
sel... | from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
self.netloc = urll... | from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
self.netloc = urll... | <commit_before>from pip._vendor.six.moves.urllib import parse as urllib_parse
class PackageIndex(object):
"""Represents a Package Index and provides easier access to endpoints
"""
def __init__(self, url, file_storage_domain):
super(PackageIndex, self).__init__()
self.url = url
sel... |
73660f4f539a1aeb520c33112cfc41183e4dd43a | luigi/tasks/rfam/clans_csv.py | luigi/tasks/rfam/clans_csv.py | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... | Use MysqlQueryTask for getting clan data | Use MysqlQueryTask for getting clan data
| Python | apache-2.0 | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.... |
d0ccfd4558b9dcf1610140c9df95cec284f0fbe3 | correos_project/correos/managers.py | correos_project/correos/managers.py | from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
realnames =... | from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
realnames =... | Use email username if no realname is found in header | Use email username if no realname is found in header
| Python | bsd-3-clause | transcode-de/correos,transcode-de/correos,transcode-de/correos | from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
realnames =... | from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
realnames =... | <commit_before>from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
... | from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
realnames =... | from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
realnames =... | <commit_before>from email import message_from_string, utils
import json
from django.db import models
from dateutil.parser import parse
class EmailManager(models.Manager):
def create_from_message(self, mailfrom, rcpttos, data):
from .models import Recipient
message = message_from_string(data)
... |
b8b18160e4dad9d87bfdf4207b3cf4841af0140d | examples/dot/dot.py | examples/dot/dot.py | """\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
def main(args=No... | """\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
def main(args=No... | Add validation to example script. | Add validation to example script.
| Python | mit | joeyespo/path-and-address | """\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
def main(args=No... | """\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
def main(args=No... | <commit_before>"""\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
d... | """\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
def main(args=No... | """\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
def main(args=No... | <commit_before>"""\
Usage:
dot.py [options] [<path>] [<address>]
dot.py -h | --help
dot.py --version
Where:
<path> is the file to serve
<address> is what to listen on, of the form <host>[:<port>], or just <port>
"""
import sys
from docopt import docopt
from path_and_address import resolve, split_address
d... |
446a760261ce4f8e8e210b2a29324c749f2bfdfb | inspector/urls.py | inspector/urls.py | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
admin.autodiscover()
urlpatterns = [
url(r'^$', HomeView.as_view(), name='... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
urlpatterns = [
url(r'^$', HomeView.as_view(), name='home'),
url(r'^proje... | Remove admin autodiscovery since Django does that for us now | Remove admin autodiscovery since Django does that for us now
| Python | bsd-2-clause | refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
admin.autodiscover()
urlpatterns = [
url(r'^$', HomeView.as_view(), name='... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
urlpatterns = [
url(r'^$', HomeView.as_view(), name='home'),
url(r'^proje... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
admin.autodiscover()
urlpatterns = [
url(r'^$', HomeView.as... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
urlpatterns = [
url(r'^$', HomeView.as_view(), name='home'),
url(r'^proje... | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
admin.autodiscover()
urlpatterns = [
url(r'^$', HomeView.as_view(), name='... | <commit_before>from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from cbv.views import HomeView, Sitemap
admin.autodiscover()
urlpatterns = [
url(r'^$', HomeView.as... |
66091bae24425c633d60dabfa1d1ee85869b20cb | platformio/debug/config/native.py | platformio/debug/config/native.py | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | Disable GDB "startup-with-shell" only on Unix platform | Disable GDB "startup-with-shell" only on Unix platform
| Python | apache-2.0 | platformio/platformio-core,platformio/platformio-core,platformio/platformio | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | <commit_before># Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 re... | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | <commit_before># Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 re... |
e80817032456fe4fb6ea4735abc0ca0b5bc18ddd | facenet/__init__.py | facenet/__init__.py | # Copyright 2015 Carnegie Mellon University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2015 Carnegie Mellon University
#
# 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 ... | Return the vector rather than printing it. | Python: Return the vector rather than printing it.
| Python | apache-2.0 | francisleunggie/openface,sahilshah/openface,cmusatyalab/openface,sahilshah/openface,cmusatyalab/openface,nmabhi/Webface,Alexx-G/openface,nhzandi/openface,nmabhi/Webface,xinfang/face-recognize,nhzandi/openface,nmabhi/Webface,francisleunggie/openface,xinfang/face-recognize,Alexx-G/openface,xinfang/face-recognize,Alexx-G/... | # Copyright 2015 Carnegie Mellon University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2015 Carnegie Mellon University
#
# 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 ... | <commit_before># Copyright 2015 Carnegie Mellon University
#
# 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... | # Copyright 2015 Carnegie Mellon University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2015 Carnegie Mellon University
#
# 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 ... | <commit_before># Copyright 2015 Carnegie Mellon University
#
# 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... |
1feed219746a2963bddc6080a5d8e9e467e50fa7 | py/g1/networks/servers/g1/networks/servers/__init__.py | py/g1/networks/servers/g1/networks/servers/__init__.py | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._socket = socket
... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._socket = socket
... | Add warning when server handler task queue is full | Add warning when server handler task queue is full
| Python | mit | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._socket = socket
... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._socket = socket
... | <commit_before>__all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._s... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._socket = socket
... | __all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._socket = socket
... | <commit_before>__all__ = [
'SocketServer',
]
import errno
import logging
from g1.asyncs.bases import servers
from g1.asyncs.bases import tasks
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
class SocketServer:
def __init__(self, socket, handler, max_connections=0):
self._s... |
6cf5d7db54ee272fa9af66d45a504d5994693ae4 | tests/functional/test_configuration.py | tests/functional/test_configuration.py | """Tests for the config command
"""
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR
class TestBasicLoading(Confi... | """Tests for the config command
"""
import pytest
import textwrap
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR... | Add basic tests for configuration | Add basic tests for configuration
| Python | mit | zvezdan/pip,pypa/pip,xavfernandez/pip,xavfernandez/pip,techtonik/pip,pradyunsg/pip,RonnyPfannschmidt/pip,pradyunsg/pip,zvezdan/pip,RonnyPfannschmidt/pip,RonnyPfannschmidt/pip,rouge8/pip,sbidoul/pip,xavfernandez/pip,rouge8/pip,pfmoore/pip,zvezdan/pip,techtonik/pip,pypa/pip,sbidoul/pip,pfmoore/pip,rouge8/pip,techtonik/pi... | """Tests for the config command
"""
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR
class TestBasicLoading(Confi... | """Tests for the config command
"""
import pytest
import textwrap
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR... | <commit_before>"""Tests for the config command
"""
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR
class TestBas... | """Tests for the config command
"""
import pytest
import textwrap
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR... | """Tests for the config command
"""
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR
class TestBasicLoading(Confi... | <commit_before>"""Tests for the config command
"""
from pip.status_codes import ERROR
from tests.lib.configuration_helpers import kinds, ConfigurationFileIOMixin
def test_no_options_passed_should_error(script):
result = script.pip('config', expect_error=True)
assert result.returncode == ERROR
class TestBas... |
5b71b9e86dc09fe21717a75e45748a81d833c632 | src/test-python.py | src/test-python.py | def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platform; print (pla... | def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platform; print (pla... | Check if the installed python2.4 have ssl support. | Check if the installed python2.4 have ssl support.
| Python | mit | upiq/plonebuild,upiq/plonebuild | def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platform; print (pla... | def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platform; print (pla... | <commit_before>def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platf... | def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platform; print (pla... | def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platform; print (pla... | <commit_before>def test(options, buildout):
from subprocess import Popen, PIPE
import os
import sys
python = options['python']
if not os.path.exists(python):
raise IOError("There is no file at %s" % python)
if sys.platform == 'darwin':
output = Popen([python, "-c", "import platf... |
b3b28bd582d3f1e2ed5e646275760d1d0669acea | WikimediaUtilities.py | WikimediaUtilities.py | from urllib.request import urlopen
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Returns (success, url... | from urllib.request import urlopen, quote
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Returns (succe... | Use python's built in system for percent-encoding | Use python's built in system for percent-encoding
| Python | mit | alset333/PeopleLookerUpper | from urllib.request import urlopen
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Returns (success, url... | from urllib.request import urlopen, quote
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Returns (succe... | <commit_before>from urllib.request import urlopen
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Return... | from urllib.request import urlopen, quote
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Returns (succe... | from urllib.request import urlopen
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Returns (success, url... | <commit_before>from urllib.request import urlopen
import Utilities
FILENAME_CUE = "File:"
IMAGE_LOCATION_CUE = '<div class="fullMedia"><a href="https://upload.wikimedia.org/wikipedia/commons/'
IMAGE_LOCATION_URL_START = 'https://upload.wikimedia.org/wikipedia/commons/'
def directUrlOfFile(mediaPageURL):
"""Return... |
3ea008feb5ebd0e4e67952267aa5e3a0c5e13e89 | hoomd/operations.py | hoomd/operations.py | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... | Add integrator property for Operations | Add integrator property for Operations
| Python | bsd-3-clause | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... | <commit_before>import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
... | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... | <commit_before>import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
... |
b6e532f01d852738f40eb8bedc89f5c056b2f62c | netbox/generate_secret_key.py | netbox/generate_secret_key.py | #!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import random
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
secure_random = random.SystemRandom()
print(''.join(secure_random.sample(charset, 50)))
| #!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import secrets
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
print(''.join(secrets.choice(charset) for _ in range(50)))
| Fix how SECRET_KEY is generated | Fix how SECRET_KEY is generated
Use secrets.choice instead of random.sample to generate the secret key. | Python | apache-2.0 | digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox | #!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import random
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
secure_random = random.SystemRandom()
print(''.join(secure_random.sample(charset, 50)))
Fix how SECRET_... | #!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import secrets
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
print(''.join(secrets.choice(charset) for _ in range(50)))
| <commit_before>#!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import random
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
secure_random = random.SystemRandom()
print(''.join(secure_random.sample(charset, 50)))
... | #!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import secrets
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
print(''.join(secrets.choice(charset) for _ in range(50)))
| #!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import random
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
secure_random = random.SystemRandom()
print(''.join(secure_random.sample(charset, 50)))
Fix how SECRET_... | <commit_before>#!/usr/bin/env python
# This script will generate a random 50-character string suitable for use as a SECRET_KEY.
import random
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
secure_random = random.SystemRandom()
print(''.join(secure_random.sample(charset, 50)))
... |
7f649a9e4e90587bd88b4b83b648f76287610f16 | pytest_django_haystack.py | pytest_django_haystack.py | import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def _haystack_marke... | import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def _haystack_marke... | Move db fixture to the inside of the method | Move db fixture to the inside of the method
| Python | mit | rouge8/pytest-django-haystack | import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def _haystack_marke... | import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def _haystack_marke... | <commit_before>import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def ... | import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def _haystack_marke... | import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def _haystack_marke... | <commit_before>import pytest
__version__ = '0.1.1'
def pytest_configure(config):
# Register the marks
config.addinivalue_line(
'markers',
'haystack: Mark the test as using the django-haystack search engine, '
'rebuilding the index for each test.')
@pytest.fixture(autouse=True)
def ... |
e1ddf1806cf80bf14a6ebe5a2d928f375943a9e4 | alignak_backend/__init__.py | alignak_backend/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join((str(each) for ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join((str(each) fo... | Fix bad indentation that broke the PEP8 ! | Fix bad indentation that broke the PEP8 !
| Python | agpl-3.0 | Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join((str(each) for ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join((str(each) fo... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join(... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join((str(each) fo... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join((str(each) for ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend
This module is an Alignak REST backend
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak_Backend"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join(... |
cf836d147c3f55261e41815fb1c5e0a4bd53d41a | resolver_test/__init__.py | resolver_test/__init__.py | # Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if mock.call_args_lis... | # Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if mock.call_args_lis... | Allow arbitrary kwargs for die utility function. by: Glenn, Giles | Allow arbitrary kwargs for die utility function. by: Glenn, Giles | Python | mit | pythonanywhere/resolver_test | # Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if mock.call_args_lis... | # Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if mock.call_args_lis... | <commit_before># Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if moc... | # Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if mock.call_args_lis... | # Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if mock.call_args_lis... | <commit_before># Copyright (c) 2011 Resolver Systems Ltd.
# All Rights Reserved
#
try:
import unittest2 as unittest
except ImportError:
import unittest
from datetime import timedelta
from mock import call
class ResolverTestMixins(object):
def assertCalledOnce(self, mock, *args, **kwargs):
if moc... |
fc37b45a461d8973f78a359016a458b5a3769689 | masters/master.client.v8.ports/master_site_config.py | masters/master.client.v8.ports/master_site_config.py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3):
base_app_url = 'https://v8-status.appspot.com'
tree_s... | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3a):
base_app_url = 'https://v8-status.appspot.com'
tree_... | Switch new ports master to master3a | V8: Switch new ports master to master3a
BUG=595708
TBR=tandrii@chromium.org
Review URL: https://codereview.chromium.org/1854673002
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@299638 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3):
base_app_url = 'https://v8-status.appspot.com'
tree_s... | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3a):
base_app_url = 'https://v8-status.appspot.com'
tree_... | <commit_before># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3):
base_app_url = 'https://v8-status.appspo... | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3a):
base_app_url = 'https://v8-status.appspot.com'
tree_... | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3):
base_app_url = 'https://v8-status.appspot.com'
tree_s... | <commit_before># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class V8Ports(Master.Master3):
base_app_url = 'https://v8-status.appspo... |
b145b03b2569f4a82adefe57e843ef91384c47a4 | panoptes/state_machine/states/core.py | panoptes/state_machine/states/core.py | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | Raise exception for state not overriding main | Raise exception for state not overriding main
| Python | mit | joshwalawender/POCS,panoptes/POCS,panoptes/POCS,joshwalawender/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,joshwalawender/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | <commit_before>import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('p... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | <commit_before>import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('p... |
3cfa4f48c6bf28ed4273004d9a44173ecb4b195c | parliament/templatetags/parliament.py | parliament/templatetags/parliament.py | from django import template
register = template.Library()
@register.filter(name='governing')
def governing(party, date):
return party.is_governing(date)
| from django import template
from ..models import Party, Statement
register = template.Library()
@register.filter(name='governing')
def governing(obj, date=None):
if isinstance(obj, Party):
assert date is not None, "Date must be supplied when 'govern' is called with a Party object"
return obj.is_go... | Allow governing templatetag to be called with a Statement object | Allow governing templatetag to be called with a Statement object
| Python | agpl-3.0 | kansanmuisti/kamu,kansanmuisti/kamu,kansanmuisti/kamu,kansanmuisti/kamu,kansanmuisti/kamu | from django import template
register = template.Library()
@register.filter(name='governing')
def governing(party, date):
return party.is_governing(date)
Allow governing templatetag to be called with a Statement object | from django import template
from ..models import Party, Statement
register = template.Library()
@register.filter(name='governing')
def governing(obj, date=None):
if isinstance(obj, Party):
assert date is not None, "Date must be supplied when 'govern' is called with a Party object"
return obj.is_go... | <commit_before>from django import template
register = template.Library()
@register.filter(name='governing')
def governing(party, date):
return party.is_governing(date)
<commit_msg>Allow governing templatetag to be called with a Statement object<commit_after> | from django import template
from ..models import Party, Statement
register = template.Library()
@register.filter(name='governing')
def governing(obj, date=None):
if isinstance(obj, Party):
assert date is not None, "Date must be supplied when 'govern' is called with a Party object"
return obj.is_go... | from django import template
register = template.Library()
@register.filter(name='governing')
def governing(party, date):
return party.is_governing(date)
Allow governing templatetag to be called with a Statement objectfrom django import template
from ..models import Party, Statement
register = template.Library()... | <commit_before>from django import template
register = template.Library()
@register.filter(name='governing')
def governing(party, date):
return party.is_governing(date)
<commit_msg>Allow governing templatetag to be called with a Statement object<commit_after>from django import template
from ..models import Party,... |
5c074950663d2e508fee0e015472e8460bf5b183 | rootpy/plotting/canvas.py | rootpy/plotting/canvas.py | """
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ctypes, ctypes.util
ctypes.cdll.LoadLibrary(ctypes.util.find_library("Gui"))
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import defaults, QROOT
... | """
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import defaults, QROOT
class _PadBase(Object):
def _post_init(self):
self.members = []
... | Remove code which should never have made it in | Remove code which should never have made it in
| Python | bsd-3-clause | rootpy/rootpy,kreczko/rootpy,kreczko/rootpy,kreczko/rootpy,rootpy/rootpy,ndawe/rootpy,rootpy/rootpy,ndawe/rootpy,ndawe/rootpy | """
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ctypes, ctypes.util
ctypes.cdll.LoadLibrary(ctypes.util.find_library("Gui"))
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import defaults, QROOT
... | """
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import defaults, QROOT
class _PadBase(Object):
def _post_init(self):
self.members = []
... | <commit_before>"""
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ctypes, ctypes.util
ctypes.cdll.LoadLibrary(ctypes.util.find_library("Gui"))
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import d... | """
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import defaults, QROOT
class _PadBase(Object):
def _post_init(self):
self.members = []
... | """
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ctypes, ctypes.util
ctypes.cdll.LoadLibrary(ctypes.util.find_library("Gui"))
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import defaults, QROOT
... | <commit_before>"""
This module implements python classes which inherit from
and extend the functionality of the ROOT canvas classes.
"""
import ctypes, ctypes.util
ctypes.cdll.LoadLibrary(ctypes.util.find_library("Gui"))
import ROOT
from ..core import Object
from .. import rootpy_globals as _globals
from .. import d... |
fc6ca51d4a865368f82c26426a2d6c8d8366e25d | tcconfig/tcshow.py | tcconfig/tcshow.py | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
try:
import json
except ImportError:
import simplejson as json
import six
import thutils
import tcconfig
import tcc... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import json
import sys
import six
import thutils
import tcconfig
import tcconfig.traffic_control
from ._common import verify_network_in... | Drop support for Python 2.6 | Drop support for Python 2.6
| Python | mit | thombashi/tcconfig,thombashi/tcconfig | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
try:
import json
except ImportError:
import simplejson as json
import six
import thutils
import tcconfig
import tcc... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import json
import sys
import six
import thutils
import tcconfig
import tcconfig.traffic_control
from ._common import verify_network_in... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
try:
import json
except ImportError:
import simplejson as json
import six
import thutils
import tcco... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import json
import sys
import six
import thutils
import tcconfig
import tcconfig.traffic_control
from ._common import verify_network_in... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
try:
import json
except ImportError:
import simplejson as json
import six
import thutils
import tcconfig
import tcc... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
from __future__ import absolute_import
from __future__ import with_statement
import sys
try:
import json
except ImportError:
import simplejson as json
import six
import thutils
import tcco... |
2b892b58049bd2b99ae97b62149f88c8001c82ca | ceph_deploy/tests/test_cli_osd.py | ceph_deploy/tests/test_cli_osd.py | import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert 'optional argum... | import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert 'optional argum... | Remove unneeded creation of .conf file | [RM-11742] Remove unneeded creation of .conf file
Signed-off-by: Travis Rhoden <e5e44d6dbac12e32e01c3bb8b67940d8b42e225b@redhat.com>
| Python | mit | trhoden/ceph-deploy,branto1/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,branto1/ceph-deploy,ceph/ceph-deploy,SUSE/ceph-deploy,isyippee/ceph-deploy,ghxandsky/ceph-deploy,imzhulei/ceph-deploy,codenrhoden/ceph-deploy,codenrhoden/ceph-deploy,shenhequnying/ceph-deploy,zhouyuan/ceph-deploy,shenhequnying/ceph-deploy,ghxandsky/... | import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert 'optional argum... | import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert 'optional argum... | <commit_before>import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert ... | import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert 'optional argum... | import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert 'optional argum... | <commit_before>import pytest
import subprocess
def test_help(tmpdir, cli):
with cli(
args=['ceph-deploy', 'osd', '--help'],
stdout=subprocess.PIPE,
) as p:
result = p.stdout.read()
assert 'usage: ceph-deploy osd' in result
assert 'positional arguments' in result
assert ... |
913590519e05a6209efb1102649ea7aba4abfbf5 | airship/__init__.py | airship/__init__.py | import os
import json
from flask import Flask, render_template
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels()]
jsonbody = json.dumps(channels)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def make_airship(s... | import os
import json
from flask import Flask, render_template
def jsonate(obj, escaped):
jsonbody = json.dumps(obj)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels... | Fix the grefs route in the airship server | Fix the grefs route in the airship server
| Python | mit | richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation | import os
import json
from flask import Flask, render_template
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels()]
jsonbody = json.dumps(channels)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def make_airship(s... | import os
import json
from flask import Flask, render_template
def jsonate(obj, escaped):
jsonbody = json.dumps(obj)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels... | <commit_before>import os
import json
from flask import Flask, render_template
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels()]
jsonbody = json.dumps(channels)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def... | import os
import json
from flask import Flask, render_template
def jsonate(obj, escaped):
jsonbody = json.dumps(obj)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels... | import os
import json
from flask import Flask, render_template
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels()]
jsonbody = json.dumps(channels)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def make_airship(s... | <commit_before>import os
import json
from flask import Flask, render_template
def channels_json(station, escaped=False):
channels = [{"name": channel} for channel in station.channels()]
jsonbody = json.dumps(channels)
if escaped:
jsonbody = jsonbody.replace("</", "<\\/")
return jsonbody
def... |
37953d6ee56fedbe5e03f738ddbf28c3433718e7 | onestop/registry.py | onestop/registry.py | """Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path='.'):
"""Path to directory containing feeds."""
# Path to... | """Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path=None):
"""Path to directory containing feeds."""
# Path t... | Fix bug where ONESTOP_REGISTRY env var was not checked | Fix bug where ONESTOP_REGISTRY env var was not checked
| Python | mit | transitland/transitland-python-client,srthurman/transitland-python-client | """Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path='.'):
"""Path to directory containing feeds."""
# Path to... | """Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path=None):
"""Path to directory containing feeds."""
# Path t... | <commit_before>"""Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path='.'):
"""Path to directory containing feeds.""... | """Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path=None):
"""Path to directory containing feeds."""
# Path t... | """Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path='.'):
"""Path to directory containing feeds."""
# Path to... | <commit_before>"""Read and write Onestop data."""
import sys
import os
import glob
import json
import argparse
import urllib
import mzgeohash
import util
import entities
import errors
class OnestopRegistry(object):
"""Onestop Registry."""
def __init__(self, path='.'):
"""Path to directory containing feeds.""... |
06b7a81a0c89177e6ac1913cab65819b7b565754 | python/ssc/__init__.py | python/ssc/__init__.py | # outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import predictive_dm, decode_dm
from ssc.btc import lin2btc, btc2lin, calc_rc
from ssc.configure import *
| # outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import lin2dm, dm2lin, calc_a_value
from ssc.btc import lin2btc, btc2lin, calc_rc
| Update function names from dm.py and removed import to configure.py | Update function names from dm.py and removed import to configure.py
| Python | bsd-3-clause | Zardoz89/Simple-Sound-Codecs,Zardoz89/Simple-Sound-Codecs | # outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import predictive_dm, decode_dm
from ssc.btc import lin2btc, btc2lin, calc_rc
from ssc.configure import *
Update function names from dm.py and removed import to configure... | # outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import lin2dm, dm2lin, calc_a_value
from ssc.btc import lin2btc, btc2lin, calc_rc
| <commit_before># outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import predictive_dm, decode_dm
from ssc.btc import lin2btc, btc2lin, calc_rc
from ssc.configure import *
<commit_msg>Update function names from dm.py and ... | # outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import lin2dm, dm2lin, calc_a_value
from ssc.btc import lin2btc, btc2lin, calc_rc
| # outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import predictive_dm, decode_dm
from ssc.btc import lin2btc, btc2lin, calc_rc
from ssc.configure import *
Update function names from dm.py and removed import to configure... | <commit_before># outer __init__.py
"""
Implementation of some simple and dumb audio codecs, like Delta Modualtion
"""
from ssc.aux import pack, unpack
from ssc.dm import predictive_dm, decode_dm
from ssc.btc import lin2btc, btc2lin, calc_rc
from ssc.configure import *
<commit_msg>Update function names from dm.py and ... |
6d15230f46c22226f6a2e84ac41fc39e6c5c190b | linode/objects/linode/backup.py | linode/objects/linode/backup.py | from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'create_dt': Property(is_da... | from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'created': Property(is_date... | Fix datetime fields in Backup and SupportTicket | Fix datetime fields in Backup and SupportTicket
This closes #23.
| Python | bsd-3-clause | linode/python-linode-api,jo-tez/python-linode-api | from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'create_dt': Property(is_da... | from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'created': Property(is_date... | <commit_before>from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'create_dt':... | from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'created': Property(is_date... | from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'create_dt': Property(is_da... | <commit_before>from .. import DerivedBase, Property, Base
class Backup(DerivedBase):
api_name = 'backups'
api_endpoint = '/linode/instances/{linode_id}/backups/{id}'
derived_url_path = 'backups'
parent_id_name='linode_id'
properties = {
'id': Property(identifier=True),
'create_dt':... |
19c087941e193b79b6f76e75cc024878ef8c7c6f | examples/test.py | examples/test.py | from nanomon import resources
from nanomon import registry
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Host('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.Command('check_h... | from nanomon import resources
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Node('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.Command('check_http',
'check_http {ho... | Update to use Node instead of Host | Update to use Node instead of Host
| Python | bsd-2-clause | cloudtools/nymms | from nanomon import resources
from nanomon import registry
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Host('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.Command('check_h... | from nanomon import resources
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Node('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.Command('check_http',
'check_http {ho... | <commit_before>from nanomon import resources
from nanomon import registry
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Host('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.C... | from nanomon import resources
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Node('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.Command('check_http',
'check_http {ho... | from nanomon import resources
from nanomon import registry
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Host('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.Command('check_h... | <commit_before>from nanomon import resources
from nanomon import registry
import logging
logging.basicConfig(level=logging.DEBUG)
webserver_group = resources.MonitoringGroup('webservers', port=80)
www1 = resources.Host('www1', monitoring_groups=[webserver_group,], port=443, type='m1.xlarge')
http_check = resources.C... |
8b3538150bbd3aa1dea0ad060b32a35acb80c51a | common/test/acceptance/edxapp_pages/lms/find_courses.py | common/test/acceptance/edxapp_pages/lms/find_courses.py | """
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_page(self):
... | """
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_page(self):
... | Fix find courses page title in bok choy test suite | Fix find courses page title in bok choy test suite
| Python | agpl-3.0 | nttks/jenkins-test,Unow/edx-platform,amir-qayyum-khan/edx-platform,nttks/edx-platform,DNFcode/edx-platform,jbassen/edx-platform,morenopc/edx-platform,procangroup/edx-platform,atsolakid/edx-platform,itsjeyd/edx-platform,jazztpt/edx-platform,jamesblunt/edx-platform,eduNEXT/edunext-platform,jruiperezv/ANALYSE,stvstnfrd/ed... | """
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_page(self):
... | """
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_page(self):
... | <commit_before>"""
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_pa... | """
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_page(self):
... | """
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_page(self):
... | <commit_before>"""
Find courses page (main page of the LMS).
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import BrokenPromise
from . import BASE_URL
class FindCoursesPage(PageObject):
"""
Find courses page (main page of the LMS).
"""
url = BASE_URL
def is_browser_on_pa... |
ad4b972667e9111c403c1d3726b2cde87fcbc88e | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accessed(__file__)
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accessed(__file__)
... | Use 2to3 for Python 3 | Use 2to3 for Python 3
| Python | mit | tehmaze/natural | #!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accessed(__file__)
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accessed(__file__)
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accesse... | #!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accessed(__file__)
... | #!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accessed(__file__)
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='natural',
version='0.1.4',
description='Convert data to their natural (human-readable) format',
long_description='''
Example Usage
=============
Basic usage::
>>> from natural.file import accessed
>>> print accesse... |
ffcc9d8c87ddc7fd386dd51c1fca1ac8b62d5828 | setup.py | setup.py | #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http:/... | #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http:/... | Update Django requirements for 1.8 | Update Django requirements for 1.8
| Python | bsd-3-clause | MasonM/django-elect,MasonM/django-elect,MasonM/django-elect | #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http:/... | #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http:/... | <commit_before>#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
... | #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http:/... | #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http:/... | <commit_before>#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-elect',
version='0.1',
description='A simple voting app for Django',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.