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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab5d343a91374119b1983e93a57fd47ab09ebc63 | plinyproj/__version__.py | plinyproj/__version__.py | <<<<<<< HEAD
__version_info__ = (0, 6, 0)
=======
__version_info__ = (0, 5, 7)
>>>>>>> hotfix/0.5.7
__version__ = '.'.join([str(i) for i in __version_info__])
| __version_info__ = (0, 6, 0)
__version__ = '.'.join([str(i) for i in __version_info__])
| Fix version conflict and bump to 0.6 | Fix version conflict and bump to 0.6
| Python | mit | bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject | <<<<<<< HEAD
__version_info__ = (0, 6, 0)
=======
__version_info__ = (0, 5, 7)
>>>>>>> hotfix/0.5.7
__version__ = '.'.join([str(i) for i in __version_info__])
Fix version conflict and bump to 0.6 | __version_info__ = (0, 6, 0)
__version__ = '.'.join([str(i) for i in __version_info__])
| <commit_before><<<<<<< HEAD
__version_info__ = (0, 6, 0)
=======
__version_info__ = (0, 5, 7)
>>>>>>> hotfix/0.5.7
__version__ = '.'.join([str(i) for i in __version_info__])
<commit_msg>Fix version conflict and bump to 0.6<commit_after> | __version_info__ = (0, 6, 0)
__version__ = '.'.join([str(i) for i in __version_info__])
| <<<<<<< HEAD
__version_info__ = (0, 6, 0)
=======
__version_info__ = (0, 5, 7)
>>>>>>> hotfix/0.5.7
__version__ = '.'.join([str(i) for i in __version_info__])
Fix version conflict and bump to 0.6__version_info__ = (0, 6, 0)
__version__ = '.'.join([str(i) for i in __version_info__])
| <commit_before><<<<<<< HEAD
__version_info__ = (0, 6, 0)
=======
__version_info__ = (0, 5, 7)
>>>>>>> hotfix/0.5.7
__version__ = '.'.join([str(i) for i in __version_info__])
<commit_msg>Fix version conflict and bump to 0.6<commit_after>__version_info__ = (0, 6, 0)
__version__ = '.'.join([str(i) for i in __version_info_... |
b2ffa1616c1ca31916047e1524e73395f0f45936 | bokeh/charts/tests/test_stats.py | bokeh/charts/tests/test_stats.py | import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_auto_bin_count(d... | import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_auto_bin_count(d... | Add auto binning test to stats. | Add auto binning test to stats.
| Python | bsd-3-clause | percyfal/bokeh,msarahan/bokeh,schoolie/bokeh,mindriot101/bokeh,Karel-van-de-Plassche/bokeh,timsnyder/bokeh,dennisobrien/bokeh,aiguofer/bokeh,phobson/bokeh,ericmjl/bokeh,phobson/bokeh,draperjames/bokeh,timsnyder/bokeh,stonebig/bokeh,timsnyder/bokeh,stonebig/bokeh,ptitjano/bokeh,maxalbert/bokeh,jakirkham/bokeh,DuCorey/bo... | import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_auto_bin_count(d... | import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_auto_bin_count(d... | <commit_before>import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_a... | import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_auto_bin_count(d... | import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_auto_bin_count(d... | <commit_before>import pytest
from bokeh.charts.stats import Bins
from bokeh.models import ColumnDataSource
@pytest.fixture
def ds(test_data):
return ColumnDataSource(test_data.auto_data)
def test_explicit_bin_count(ds):
b = Bins(source=ds, column='mpg', bin_count=2)
assert len(b.bins) == 2
def test_a... |
688dfc501e336b29db2fd3a7dc7bda6a8446c5e9 | main.py | main.py | # -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
def send_on_email(report, subject, mail_from, mail_to, smtp_auth):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.encode('utf-8'), 'html', 'utf-8')
msg["Subject"] = subject
msg["From"] = mail_from
... | # -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
from logging import INFO as LOGGING_INFO, DEBUG as LOGGING_DEBUG
def send_on_email(report, subject, mail_from, mail_to, smtp_auth, log_level=LOGGING_INFO):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.en... | Add log level setting to mailer function | Add log level setting to mailer function
| Python | mit | vv-p/jira-reports,vv-p/jira-reports | # -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
def send_on_email(report, subject, mail_from, mail_to, smtp_auth):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.encode('utf-8'), 'html', 'utf-8')
msg["Subject"] = subject
msg["From"] = mail_from
... | # -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
from logging import INFO as LOGGING_INFO, DEBUG as LOGGING_DEBUG
def send_on_email(report, subject, mail_from, mail_to, smtp_auth, log_level=LOGGING_INFO):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.en... | <commit_before># -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
def send_on_email(report, subject, mail_from, mail_to, smtp_auth):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.encode('utf-8'), 'html', 'utf-8')
msg["Subject"] = subject
msg["From... | # -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
from logging import INFO as LOGGING_INFO, DEBUG as LOGGING_DEBUG
def send_on_email(report, subject, mail_from, mail_to, smtp_auth, log_level=LOGGING_INFO):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.en... | # -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
def send_on_email(report, subject, mail_from, mail_to, smtp_auth):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.encode('utf-8'), 'html', 'utf-8')
msg["Subject"] = subject
msg["From"] = mail_from
... | <commit_before># -*- coding: utf-8 -*-
import smtplib
import arrow
from email.mime.text import MIMEText
def send_on_email(report, subject, mail_from, mail_to, smtp_auth):
smtp_login, smtp_password = smtp_auth
msg = MIMEText(report.encode('utf-8'), 'html', 'utf-8')
msg["Subject"] = subject
msg["From... |
ea7b84d4685a48e13bd58cfd52d14fff4ed7001a | main.py | main.py | from game import Game
from self_play import SelfPlay
g = Game()
runtime = SelfPlay(g)
runtime.play()
| from game import Game
from self_play import SelfPlay
import game_stats_tree
g = Game()
runtime = SelfPlay(g)
runtime.play()
game_stats_tree = game_stats_tree.Node()
update_game_stats(game_stats_tree, runtime.log) | Add log to self play | Add log to self play
| Python | mit | misterwilliam/connect-four | from game import Game
from self_play import SelfPlay
g = Game()
runtime = SelfPlay(g)
runtime.play()
Add log to self play | from game import Game
from self_play import SelfPlay
import game_stats_tree
g = Game()
runtime = SelfPlay(g)
runtime.play()
game_stats_tree = game_stats_tree.Node()
update_game_stats(game_stats_tree, runtime.log) | <commit_before>from game import Game
from self_play import SelfPlay
g = Game()
runtime = SelfPlay(g)
runtime.play()
<commit_msg>Add log to self play<commit_after> | from game import Game
from self_play import SelfPlay
import game_stats_tree
g = Game()
runtime = SelfPlay(g)
runtime.play()
game_stats_tree = game_stats_tree.Node()
update_game_stats(game_stats_tree, runtime.log) | from game import Game
from self_play import SelfPlay
g = Game()
runtime = SelfPlay(g)
runtime.play()
Add log to self playfrom game import Game
from self_play import SelfPlay
import game_stats_tree
g = Game()
runtime = SelfPlay(g)
runtime.play()
game_stats_tree = game_stats_tree.Node()
update_game_stats(game_stats... | <commit_before>from game import Game
from self_play import SelfPlay
g = Game()
runtime = SelfPlay(g)
runtime.play()
<commit_msg>Add log to self play<commit_after>from game import Game
from self_play import SelfPlay
import game_stats_tree
g = Game()
runtime = SelfPlay(g)
runtime.play()
game_stats_tree = game_stats... |
df4967b5e71e32f70e97d52a320d9b32d70095b7 | main.py | main.py | #!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def now_playing(itunes):
track = itunes.current_track.get()
return print('{} - {}\n{}'.format(colored(track.name(), at... | #!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def is_playing(itunes):
return itunes.player_state.get() == k.playing
def now_playing(itunes):
if not is_playing(itu... | Check if song is_playing before play | Check if song is_playing before play
| Python | mit | kshvmdn/nowplaying | #!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def now_playing(itunes):
track = itunes.current_track.get()
return print('{} - {}\n{}'.format(colored(track.name(), at... | #!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def is_playing(itunes):
return itunes.player_state.get() == k.playing
def now_playing(itunes):
if not is_playing(itu... | <commit_before>#!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def now_playing(itunes):
track = itunes.current_track.get()
return print('{} - {}\n{}'.format(colored(t... | #!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def is_playing(itunes):
return itunes.player_state.get() == k.playing
def now_playing(itunes):
if not is_playing(itu... | #!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def now_playing(itunes):
track = itunes.current_track.get()
return print('{} - {}\n{}'.format(colored(track.name(), at... | <commit_before>#!/usr/bin/env python3
import sys
from appscript import *
from termcolor import colored, cprint
def open(itunes):
return itunes.activate()
def close(itunes):
return itunes.quit()
def now_playing(itunes):
track = itunes.current_track.get()
return print('{} - {}\n{}'.format(colored(t... |
fe308f4b9372a4839af4d2374500c7a421fca14b | app/schedule/tasks.py | app/schedule/tasks.py | from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.SMS_GATEWAY_PASS... | from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.SMS_GATEWAY_PASS... | Return the message status to the message broker | fix: Return the message status to the message broker
| Python | agpl-3.0 | agendaodonto/server,agendaodonto/server | from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.SMS_GATEWAY_PASS... | from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.SMS_GATEWAY_PASS... | <commit_before>from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.S... | from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.SMS_GATEWAY_PASS... | from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.SMS_GATEWAY_PASS... | <commit_before>from django.conf import settings
from app.schedule.celery import celery_app
from app.schedule.libs.sms import DeviceNotFoundError
@celery_app.task(bind=True)
def send_message(self, to, message):
messenger = settings.APP_MESSENGER_CLASS
user = settings.SMS_GATEWAY_USER
password = settings.S... |
8ef4417a95fdd9b5dde26583a9624181639df600 | nix/__init__.py | nix/__init__.py | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode, Block, DataTy... | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode, Block, DataTy... | Remove mixins from namespace after monkey patching | Remove mixins from namespace after monkey patching
After their job is done, they can go home ;-)
| Python | bsd-3-clause | stoewer/nixpy,stoewer/nixpy | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode, Block, DataTy... | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode, Block, DataTy... | <commit_before># Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode... | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode, Block, DataTy... | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode, Block, DataTy... | <commit_before># Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from nix.core import File, FileMode... |
69d6d87688d9f805689407b839c4fb88f397269e | cla_backend/apps/status/views.py | cla_backend/apps/status/views.py | from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONResponse(HttpRes... | from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONResponse(HttpRes... | Revert "Deliberately break status check" | Revert "Deliberately break status check"
This reverts commit da7f671ec287afc0c42f58794053b8bf69ddf620.
| Python | mit | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONResponse(HttpRes... | from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONResponse(HttpRes... | <commit_before>from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONR... | from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONResponse(HttpRes... | from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONResponse(HttpRes... | <commit_before>from django.db import connection, DatabaseError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from cla_common.smoketest import smoketest
from moj_irat.views import PingJsonView as BasePingJsonView
class JSONR... |
661c9413900d74baa308feec3232bc3c9edee361 | repl.py | repl.py | #!/usr/bin/python3
"""Command line runtime for Tea."""
from runtime import tokenizer, parser, ast, std
TEA_VERSION = "0.0.3-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, parsing and e... | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import tokenizer, parser, env
TEA_VERSION = "0.0.4-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing,... | Fix bugs and increment version number | Fix bugs and increment version number
| Python | mit | lnsp/tea,lnsp/tea | #!/usr/bin/python3
"""Command line runtime for Tea."""
from runtime import tokenizer, parser, ast, std
TEA_VERSION = "0.0.3-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, parsing and e... | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import tokenizer, parser, env
TEA_VERSION = "0.0.4-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing,... | <commit_before>#!/usr/bin/python3
"""Command line runtime for Tea."""
from runtime import tokenizer, parser, ast, std
TEA_VERSION = "0.0.3-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing... | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import tokenizer, parser, env
TEA_VERSION = "0.0.4-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing,... | #!/usr/bin/python3
"""Command line runtime for Tea."""
from runtime import tokenizer, parser, ast, std
TEA_VERSION = "0.0.3-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, parsing and e... | <commit_before>#!/usr/bin/python3
"""Command line runtime for Tea."""
from runtime import tokenizer, parser, ast, std
TEA_VERSION = "0.0.3-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing... |
542ec659bf8545fcb50d0a4df068aa28d073dacc | cmsplugin_zinnia/forms.py | cmsplugin_zinnia/forms.py | """Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
data = self.cl... | """Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
data = self.cl... | Add fields attribute to CalendarEntriesAdminForm. | Add fields attribute to CalendarEntriesAdminForm.
Django 1.8 requires either the 'fields' or 'exclude' attribute to be set for modelForm. Omitting any definition of the fields to use will result in an ImproperlyConfigured exception. See https://docs.djangoproject.com/en/1.8/ref/forms/models/. | Python | bsd-3-clause | bittner/cmsplugin-zinnia,django-blog-zinnia/cmsplugin-zinnia,django-blog-zinnia/cmsplugin-zinnia,django-blog-zinnia/cmsplugin-zinnia,bittner/cmsplugin-zinnia,bittner/cmsplugin-zinnia | """Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
data = self.cl... | """Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
data = self.cl... | <commit_before>"""Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
... | """Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
data = self.cl... | """Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
data = self.cl... | <commit_before>"""Forms for cmsplugin-zinnia"""
from django import forms
from django.utils.translation import ugettext as _
from cmsplugin_zinnia.models import CalendarEntriesPlugin
class CalendarEntriesAdminForm(forms.ModelForm):
"""
Admin Form for CalendarEntriesPlugin
"""
def clean(self):
... |
4a8e1c8ef51e38ceb8ae8cabcb61651f59f601c0 | urls.py | urls.py | __author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home', name='home')... | __author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home', name='home')... | Update Root URL config to set the default mapping | Update Root URL config to set the default mapping
| Python | bsd-2-clause | ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark | __author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home', name='home')... | __author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home', name='home')... | <commit_before>__author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home... | __author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home', name='home')... | __author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home', name='home')... | <commit_before>__author__ = 'ankesh'
from django.conf.urls import patterns, include, url
from django.http import HttpResponseRedirect
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'upload.views.home... |
97418e6815faacbaa46a3a29bef0c4c0454bede1 | urls.py | urls.py | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<path>.*)$', 'django.views.static.serve', ... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
from django.views.static import serve
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<pat... | Support for string view arguments to url() will be removed | [DJ1.10] Support for string view arguments to url() will be removed
| Python | apache-2.0 | benadida/helios-server,shirlei/helios-server,shirlei/helios-server,benadida/helios-server,benadida/helios-server,shirlei/helios-server,benadida/helios-server,shirlei/helios-server,shirlei/helios-server,benadida/helios-server | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<path>.*)$', 'django.views.static.serve', ... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
from django.views.static import serve
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<pat... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<path>.*)$', 'django.views.... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
from django.views.static import serve
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<pat... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<path>.*)$', 'django.views.static.serve', ... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import url, include
urlpatterns = [
url(r'^auth/', include('helios_auth.urls')),
url(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PATH
url(r'booth/(?P<path>.*)$', 'django.views.... |
96a2839da4963303ace6e147bb436d2e24a5efd4 | main.py | main.py | from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.inf.upol.cz")
def is_worker_running():
inspect = app.control.inspect()
active = inspect.active()
s... | from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.upol.cz")
db.insert_url("http://www.cmtf.upol.cz")
db.insert_url("http://www.lf.upol.cz")
db.insert_url("http://w... | Fix is_worker_running + new seed | Fix is_worker_running + new seed
| Python | mit | UPOLSearch/UPOL-Search-Engine,UPOLSearch/UPOL-Search-Engine,UPOLSearch/UPOL-Search-Engine,UPOLSearch/UPOL-Search-Engine | from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.inf.upol.cz")
def is_worker_running():
inspect = app.control.inspect()
active = inspect.active()
s... | from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.upol.cz")
db.insert_url("http://www.cmtf.upol.cz")
db.insert_url("http://www.lf.upol.cz")
db.insert_url("http://w... | <commit_before>from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.inf.upol.cz")
def is_worker_running():
inspect = app.control.inspect()
active = inspect... | from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.upol.cz")
db.insert_url("http://www.cmtf.upol.cz")
db.insert_url("http://www.lf.upol.cz")
db.insert_url("http://w... | from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.inf.upol.cz")
def is_worker_running():
inspect = app.control.inspect()
active = inspect.active()
s... | <commit_before>from crawler import tasks
from crawler.db import db_mongodb as db
from time import sleep
from celery.app.control import Control
from crawler.celery import app
# Temporal solution
db.insert_url("http://www.inf.upol.cz")
def is_worker_running():
inspect = app.control.inspect()
active = inspect... |
dc87229eeeef35325d72a1b97e0790204673a5aa | main.py | main.py | from curses import wrapper
from ui import ChatUI
from client import Client
import ConfigParser
def main(stdscr):
cp = ConfigParser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password')
stdscr.clear()
ui = ChatUI(stdscr)
... | from curses import wrapper
from ui import ChatUI
from client import Client
import configparser
def main(stdscr):
cp = configparser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password').encode('utf-8')
stdscr.clear()
ui = ... | Make it work with Py3 | Make it work with Py3
| Python | mit | vhf/kwak_cli | from curses import wrapper
from ui import ChatUI
from client import Client
import ConfigParser
def main(stdscr):
cp = ConfigParser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password')
stdscr.clear()
ui = ChatUI(stdscr)
... | from curses import wrapper
from ui import ChatUI
from client import Client
import configparser
def main(stdscr):
cp = configparser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password').encode('utf-8')
stdscr.clear()
ui = ... | <commit_before>from curses import wrapper
from ui import ChatUI
from client import Client
import ConfigParser
def main(stdscr):
cp = ConfigParser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password')
stdscr.clear()
ui = C... | from curses import wrapper
from ui import ChatUI
from client import Client
import configparser
def main(stdscr):
cp = configparser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password').encode('utf-8')
stdscr.clear()
ui = ... | from curses import wrapper
from ui import ChatUI
from client import Client
import ConfigParser
def main(stdscr):
cp = ConfigParser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password')
stdscr.clear()
ui = ChatUI(stdscr)
... | <commit_before>from curses import wrapper
from ui import ChatUI
from client import Client
import ConfigParser
def main(stdscr):
cp = ConfigParser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password')
stdscr.clear()
ui = C... |
3e89c102e9a47de1288b268b04a11ff73a22cd2e | main.py | main.py | # coding: utf-8
from web import app
import db, config
import os.path
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
db.init_db()
app.run(debug = True)
... | # coding: utf-8
import config
import os.path, sys
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
import db
from web import app
db.init_db()
app.run(... | Fix handling of missing config file | Fix handling of missing config file
| Python | agpl-3.0 | hhm0/supysonic,nwokeo/supysonic,ezpuzz/supysonic,spl0k/supysonic,hhm0/supysonic,spl0k/supysonic,nwokeo/supysonic,nwokeo/supysonic,hhm0/supysonic,nwokeo/supysonic,spl0k/supysonic,nwokeo/supysonic,ezpuzz/supysonic | # coding: utf-8
from web import app
import db, config
import os.path
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
db.init_db()
app.run(debug = True)
... | # coding: utf-8
import config
import os.path, sys
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
import db
from web import app
db.init_db()
app.run(... | <commit_before># coding: utf-8
from web import app
import db, config
import os.path
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
db.init_db()
app.run... | # coding: utf-8
import config
import os.path, sys
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
import db
from web import app
db.init_db()
app.run(... | # coding: utf-8
from web import app
import db, config
import os.path
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
db.init_db()
app.run(debug = True)
... | <commit_before># coding: utf-8
from web import app
import db, config
import os.path
if __name__ == '__main__':
if not config.check():
print >>sys.stderr, "Couldn't find configuration file"
sys.exit(1)
if not os.path.exists(config.get('CACHE_DIR')):
os.makedirs(config.get('CACHE_DIR'))
db.init_db()
app.run... |
a290a53a4323ad20ca0692f603cd2fc7a6c85c18 | test_patois.py | test_patois.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for patois."""
from __future__ import (print_function, absolute_import,
unicode_literals, division)
# Copyright (c) 2014 Hank Gay
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associa... | Add test for first compatibility function. | TDD: Add test for first compatibility function.
| Python | mit | gthank/patois,gthank/patois | TDD: Add test for first compatibility function. | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for patois."""
from __future__ import (print_function, absolute_import,
unicode_literals, division)
# Copyright (c) 2014 Hank Gay
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associa... | <commit_before><commit_msg>TDD: Add test for first compatibility function.<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for patois."""
from __future__ import (print_function, absolute_import,
unicode_literals, division)
# Copyright (c) 2014 Hank Gay
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associa... | TDD: Add test for first compatibility function.#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for patois."""
from __future__ import (print_function, absolute_import,
unicode_literals, division)
# Copyright (c) 2014 Hank Gay
#
# Permission is hereby granted, free of charge, to any person ... | <commit_before><commit_msg>TDD: Add test for first compatibility function.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for patois."""
from __future__ import (print_function, absolute_import,
unicode_literals, division)
# Copyright (c) 2014 Hank Gay
#
# Permission is hereb... | |
1fa3c49f692e311e67db4f128928ac93e51830ff | babybuddy/tests/tests_commands.py | babybuddy/tests/tests_commands.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TestCase):
def test_migrate(self):
call_command('migrate', ver... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TransactionTestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TransactionTestCase):
def test_migrate(self):
call_... | Fix and re-enable the reset management command test. | Fix and re-enable the reset management command test.
Not 100% sure of why this fixes the issue - it appears that changes to django.test.TestCase in Django 2.0 led to the test failing.
| Python | bsd-2-clause | cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TestCase):
def test_migrate(self):
call_command('migrate', ver... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TransactionTestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TransactionTestCase):
def test_migrate(self):
call_... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TestCase):
def test_migrate(self):
call_command... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TransactionTestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TransactionTestCase):
def test_migrate(self):
call_... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TestCase):
def test_migrate(self):
call_command('migrate', ver... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.contrib.auth.models import User
from django.core.management import call_command
from core.models import Child
class CommandsTestCase(TestCase):
def test_migrate(self):
call_command... |
3157151d835377a4ddf80d5514ea1edc0a2a8203 | account/decorators.py | account/decorators.py | import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that checks that the use... | import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that checks that the user is logged in, redirecting
to the log in page i... | Fix a 3.0 compat issue | Fix a 3.0 compat issue
| Python | mit | pinax/django-user-accounts,pinax/django-user-accounts | import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that checks that the use... | import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that checks that the user is logged in, redirecting
to the log in page i... | <commit_before>import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that chec... | import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that checks that the user is logged in, redirecting
to the log in page i... | import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that checks that the use... | <commit_before>import functools
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.utils.decorators import available_attrs
from account.utils import handle_redirect_to_login
def login_required(func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
"""
Decorator for views that chec... |
b1ffe99226cae1da873d249d8299b4b6b721dde3 | go_contacts/server.py | go_contacts/server.py | """
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
"""
def __in... | """
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone.handlers import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
"""
... | Read config file passed as --appopts param. | Read config file passed as --appopts param.
| Python | bsd-3-clause | praekelt/go-contacts-api,praekelt/go-contacts-api | """
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
"""
def __in... | """
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone.handlers import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
"""
... | <commit_before>"""
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
""... | """
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone.handlers import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
"""
... | """
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
"""
def __in... | <commit_before>"""
Cyclone application for Vumi Go contacts API.
"""
from go_api.cyclone import ApiApplication
from go_contacts.backends.riak import RiakContactsBackend
class ContactsApi(ApiApplication):
"""
:param IContactsBackend backend:
A backend that provides a contact collection factory.
""... |
63a79aaea5aa7124d753a2d7b70645bd2e1f4419 | globus_cli/parser/parse_cmd.py | globus_cli/parser/parse_cmd.py | from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
"""
# create the top parser and give it sub... | from __future__ import print_function
import sys
from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
... | Add special handling for NotImplementedError | Add special handling for NotImplementedError
If the function called by run_command() raises a NotImplementedError,
don't print the full stacktrace. Do a mild amount of custom formatting,
then exit with status 1 (failure).
| Python | apache-2.0 | globus/globus-cli,globus/globus-cli | from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
"""
# create the top parser and give it sub... | from __future__ import print_function
import sys
from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
... | <commit_before>from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
"""
# create the top parser ... | from __future__ import print_function
import sys
from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
... | from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
"""
# create the top parser and give it sub... | <commit_before>from globus_cli.parser.shared_parser import GlobusCLISharedParser
from globus_cli.parser.command_tree import build_command_tree
def _gen_parser():
"""
Produces a top-level argument parser built out of all of the various
subparsers for different services.
"""
# create the top parser ... |
c104880b195ade7e202894de424bd8f5c1764251 | scripts/2a-set-aircraft-poses.py | scripts/2a-set-aircraft-poses.py | #!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features using the
# specifi... | #!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features using the
# specifi... | Add support for pix4d meta file format. | Add support for pix4d meta file format.
Former-commit-id: 7330412d726bf8cc4bd9d8659fb067e4921af798 | Python | mit | UASLab/ImageAnalysis | #!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features using the
# specifi... | #!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features using the
# specifi... | <commit_before>#!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features usin... | #!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features using the
# specifi... | #!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features using the
# specifi... | <commit_before>#!/usr/bin/python
import sys
sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/")
import argparse
import commands
import cv2
import fnmatch
import os.path
sys.path.append('../lib')
import Pose
import ProjectMgr
# for all the images in the project image_dir, detect features usin... |
2799b5f2cf9222313ccfe70d0663070a9950788a | sublimelinter/modules/php.py | sublimelinter/modules/php.py | # -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, lines, errorUnde... | # -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, lines, errorUnde... | Change PHP error matching regex | Change PHP error matching regex
On my system (OS X 10.7 w/stock PHP 5.3.8), the PHP lint frequently
misses errors due to over-specificity in the regex. This one is
catching them.
| Python | mit | uschmidt83/SublimeLinter-for-ST2,SublimeLinter/SublimeLinter-for-ST2,benesch/sublime-linter,benesch/sublime-linter,uschmidt83/SublimeLinter-for-ST2,tangledhelix/SublimeLinter-for-ST2,biodamasceno/SublimeLinter-for-ST2,biodamasceno/SublimeLinter-for-ST2,tangledhelix/SublimeLinter-for-ST2,SublimeLinter/SublimeLinter-for-... | # -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, lines, errorUnde... | # -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, lines, errorUnde... | <commit_before># -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, l... | # -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, lines, errorUnde... | # -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, lines, errorUnde... | <commit_before># -*- coding: utf-8 -*-
# php.py - sublimelint package for checking php files
import re
from base_linter import BaseLinter
CONFIG = {
'language': 'php',
'executable': 'php',
'lint_args': ('-l', '-d display_errors=On')
}
class Linter(BaseLinter):
def parse_errors(self, view, errors, l... |
2473c714bb89cbd1d741b5e20b32397ffc6b6bd7 | samp_client/constants.py | samp_client/constants.py | from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
| from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
RCON_CMDLIST = 'cmdlist'
RCON_VARLIST = 'varlist'
RCON_EXIT = 'exit'
RCON_ECHO = 'echo'
RCON_HOSTNAME = 'hos... | Define constatns for rcon commands | Define constatns for rcon commands
| Python | mit | mick88/samp-client | from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
Define constatns for rcon commands | from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
RCON_CMDLIST = 'cmdlist'
RCON_VARLIST = 'varlist'
RCON_EXIT = 'exit'
RCON_ECHO = 'echo'
RCON_HOSTNAME = 'hos... | <commit_before>from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
<commit_msg>Define constatns for rcon commands<commit_after> | from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
RCON_CMDLIST = 'cmdlist'
RCON_VARLIST = 'varlist'
RCON_EXIT = 'exit'
RCON_ECHO = 'echo'
RCON_HOSTNAME = 'hos... | from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
Define constatns for rcon commandsfrom __future__ import unicode_literals, absolute_import
# Opcode definiti... | <commit_before>from __future__ import unicode_literals, absolute_import
# Opcode definitions
OPCODE_INFO = 'i'
OPCODE_RULES = 'r'
OPCODE_CLIENTS = 'c'
OPCODE_CLIENTS_DETAILED = 'd'
OPCODE_RCON = 'x'
OPCODE_PSEUDORANDOM = 'p'
<commit_msg>Define constatns for rcon commands<commit_after>from __future__ import unicode_lit... |
d99e3d13ab6d10df1f90fc4383af736ef6e3234f | webnut/views.py | webnut/views.py | from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from webnut import WebNUT
import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
self.la... | from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from .webnut import WebNUT
from . import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
... | Fix imports for Python 3 | Fix imports for Python 3
| Python | bsd-3-clause | rshipp/webNUT | from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from webnut import WebNUT
import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
self.la... | from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from .webnut import WebNUT
from . import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
... | <commit_before>from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from webnut import WebNUT
import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
... | from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from .webnut import WebNUT
from . import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
... | from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from webnut import WebNUT
import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
self.la... | <commit_before>from pyramid.exceptions import NotFound
from pyramid.renderers import get_renderer
from pyramid.view import view_config
from webnut import WebNUT
import config
class NUTViews(object):
def __init__(self, request):
self.request = request
renderer = get_renderer("templates/layout.pt")
... |
da510fa88cd8444ac1838489659800c0c9708725 | main.py | main.py | import random
import time
import os
import openpyxl
from util import util
from pyquery import PyQuery
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.webdriver.commo... | import time
from util import util
from crawler.scraping import scraping
driver = util.getDriver('phantomjs')
# url = 'http://kns.cnki.net/kns/brief/result.aspx?dbprefix=scdb&action=scdbsearch&db_opt=SCDB'
url = 'http://kns.cnki.net/kns/brief/result.aspx?dbprefix=scdb'
for author in util.get_name_list():
# try:
... | Change the structure of directory | Change the structure of directory
| Python | apache-2.0 | firejq/cnki_crawler | import random
import time
import os
import openpyxl
from util import util
from pyquery import PyQuery
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.webdriver.commo... | import time
from util import util
from crawler.scraping import scraping
driver = util.getDriver('phantomjs')
# url = 'http://kns.cnki.net/kns/brief/result.aspx?dbprefix=scdb&action=scdbsearch&db_opt=SCDB'
url = 'http://kns.cnki.net/kns/brief/result.aspx?dbprefix=scdb'
for author in util.get_name_list():
# try:
... | <commit_before>import random
import time
import os
import openpyxl
from util import util
from pyquery import PyQuery
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.... | import time
from util import util
from crawler.scraping import scraping
driver = util.getDriver('phantomjs')
# url = 'http://kns.cnki.net/kns/brief/result.aspx?dbprefix=scdb&action=scdbsearch&db_opt=SCDB'
url = 'http://kns.cnki.net/kns/brief/result.aspx?dbprefix=scdb'
for author in util.get_name_list():
# try:
... | import random
import time
import os
import openpyxl
from util import util
from pyquery import PyQuery
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.webdriver.commo... | <commit_before>import random
import time
import os
import openpyxl
from util import util
from pyquery import PyQuery
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.... |
51701b35d9ef9401abf0d86fd5726e669326390d | scripts/nipy_4dto3D.py | scripts/nipy_4dto3D.py | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise OSError('Expecti... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import nipy.externals.argparse as argparse
import nipy.io.imageformats as nii
def main():
# create the parser
parser = argparse.ArgumentParser()
# add ... | Use argparse for 4D to 3D | Use argparse for 4D to 3D | Python | bsd-3-clause | nipy/nipy-labs,arokem/nipy,bthirion/nipy,alexis-roche/register,arokem/nipy,alexis-roche/niseg,bthirion/nipy,alexis-roche/nipy,bthirion/nipy,nipy/nireg,alexis-roche/nireg,nipy/nipy-labs,alexis-roche/nipy,alexis-roche/nipy,bthirion/nipy,alexis-roche/register,alexis-roche/nireg,nipy/nireg,alexis-roche/register,alexis-roch... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise OSError('Expecti... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import nipy.externals.argparse as argparse
import nipy.io.imageformats as nii
def main():
# create the parser
parser = argparse.ArgumentParser()
# add ... | <commit_before>#!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise O... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import nipy.externals.argparse as argparse
import nipy.io.imageformats as nii
def main():
# create the parser
parser = argparse.ArgumentParser()
# add ... | #!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise OSError('Expecti... | <commit_before>#!/usr/bin/env python
''' Tiny script to write 4D files in any format that we read (nifti,
analyze, MINC, at the moment, as nifti 3D files '''
import os
import sys
import nipy.io.imageformats as nii
if __name__ == '__main__':
try:
fname = sys.argv[1]
except IndexError:
raise O... |
9feee57aa6f8ebc5c5300d2b611aebdc87367c70 | selectable/__init__.py | selectable/__init__.py | """
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 2,
'micro': 0,
'releaselevel': 'final',
}
def get_version():
"""
Return the formatted version information
... | """
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 3,
'micro': 0,
'releaselevel': 'dev',
}
def get_version():
"""
Return the formatted version information
""... | Change version to reflect current dev status. | Change version to reflect current dev status.
| Python | bsd-2-clause | mlavin/django-selectable,makinacorpus/django-selectable,affan2/django-selectable,affan2/django-selectable,affan2/django-selectable,mlavin/django-selectable,mlavin/django-selectable,makinacorpus/django-selectable | """
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 2,
'micro': 0,
'releaselevel': 'final',
}
def get_version():
"""
Return the formatted version information
... | """
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 3,
'micro': 0,
'releaselevel': 'dev',
}
def get_version():
"""
Return the formatted version information
""... | <commit_before>"""
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 2,
'micro': 0,
'releaselevel': 'final',
}
def get_version():
"""
Return the formatted version i... | """
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 3,
'micro': 0,
'releaselevel': 'dev',
}
def get_version():
"""
Return the formatted version information
""... | """
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 2,
'micro': 0,
'releaselevel': 'final',
}
def get_version():
"""
Return the formatted version information
... | <commit_before>"""
django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
"""
__version_info__ = {
'major': 0,
'minor': 2,
'micro': 0,
'releaselevel': 'final',
}
def get_version():
"""
Return the formatted version i... |
e74acac98e7cb6a5fbdcba43fcca33633b55a5db | byceps/util/system.py | byceps/util/system.py | # -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set via environment... | # -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set via environment... | Exit with status code 1 if retrieval of the configuration filename from the environment fails | Exit with status code 1 if retrieval of the configuration filename from the environment fails
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps | # -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set via environment... | # -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set via environment... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set ... | # -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set via environment... | # -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set via environment... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.util.system
~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import os
import sys
CONFIG_VAR_NAME = 'BYCEPS_CONFIG'
def get_config_filename_from_env():
"""Return the configuration filename set ... |
3220b356297ec5fe61888a906543d0ee993f9f31 | website/tests/test_database.py | website/tests/test_database.py | import database
def test_encode_csv():
attributes = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
'+', 'R', 'H', 204, 'exon1', 123, False
)
result = database.encode_csv(*attributes)
assert result == '+RH0cc:exon1:7b'
def test_decode_csv():
encoded_csv = '+RH0cc:exon1:7... | import database
def test_encode_csv():
test_data = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
(('+', 'R', 'H', 204, 'exon1', 123, False), '+RH0cc:exon1:7b'),
(('-', 'R', 'H', 204, 'exon1', 123, True), '-RH1cc:exon1:7b'),
)
for attributes, correct_result in test_data:
... | Add more tests to database | Add more tests to database
| Python | lgpl-2.1 | reimandlab/Visualistion-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/ActiveDriverDB,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visu... | import database
def test_encode_csv():
attributes = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
'+', 'R', 'H', 204, 'exon1', 123, False
)
result = database.encode_csv(*attributes)
assert result == '+RH0cc:exon1:7b'
def test_decode_csv():
encoded_csv = '+RH0cc:exon1:7... | import database
def test_encode_csv():
test_data = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
(('+', 'R', 'H', 204, 'exon1', 123, False), '+RH0cc:exon1:7b'),
(('-', 'R', 'H', 204, 'exon1', 123, True), '-RH1cc:exon1:7b'),
)
for attributes, correct_result in test_data:
... | <commit_before>import database
def test_encode_csv():
attributes = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
'+', 'R', 'H', 204, 'exon1', 123, False
)
result = database.encode_csv(*attributes)
assert result == '+RH0cc:exon1:7b'
def test_decode_csv():
encoded_csv = ... | import database
def test_encode_csv():
test_data = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
(('+', 'R', 'H', 204, 'exon1', 123, False), '+RH0cc:exon1:7b'),
(('-', 'R', 'H', 204, 'exon1', 123, True), '-RH1cc:exon1:7b'),
)
for attributes, correct_result in test_data:
... | import database
def test_encode_csv():
attributes = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
'+', 'R', 'H', 204, 'exon1', 123, False
)
result = database.encode_csv(*attributes)
assert result == '+RH0cc:exon1:7b'
def test_decode_csv():
encoded_csv = '+RH0cc:exon1:7... | <commit_before>import database
def test_encode_csv():
attributes = (
# strand, ref, alt, cdna_pos, exon, protein_id, is_ptm
'+', 'R', 'H', 204, 'exon1', 123, False
)
result = database.encode_csv(*attributes)
assert result == '+RH0cc:exon1:7b'
def test_decode_csv():
encoded_csv = ... |
6398f7ad03aaa8547eaa860ba7ef5d2051ca2955 | src/newspeak/urls.py | src/newspeak/urls.py | from django.conf.urls import patterns, url
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS feed, until we have a
# page to show here.
(... | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS f... | Use class-based generic view for redirect. | Use class-based generic view for redirect.
Fixes #29; legacy method-based generic views are deprecated in Django. | Python | bsd-3-clause | bitsoffreedom/newspeak | from django.conf.urls import patterns, url
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS feed, until we have a
# page to show here.
(... | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS f... | <commit_before>from django.conf.urls import patterns, url
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS feed, until we have a
# page to s... | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS f... | from django.conf.urls import patterns, url
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS feed, until we have a
# page to show here.
(... | <commit_before>from django.conf.urls import patterns, url
from surlex.dj import surl
from .feeds import NewspeakRSSFeed, NewspeakAtomFeed
urlpatterns = patterns('',
# surl(r'^$', SomeView.as_view(),
# name='newspeak_home'
# ),)
# Static redirect to the RSS feed, until we have a
# page to s... |
bb5748b85829149f8f2f02e139ad2fa7389d38ff | examples/download_observations.py | examples/download_observations.py | from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
logger.setLevel(logging.DEBUG)
logger.a... | from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.formats import VisualFormatWriter
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
... | Write downloaded observations into a Visual Format file. | Write downloaded observations into a Visual Format file.
| Python | mit | zsiciarz/pyaavso | from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
logger.setLevel(logging.DEBUG)
logger.a... | from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.formats import VisualFormatWriter
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
... | <commit_before>from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
logger.setLevel(logging.DEBU... | from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.formats import VisualFormatWriter
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
... | from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
logger.setLevel(logging.DEBUG)
logger.a... | <commit_before>from __future__ import unicode_literals, print_function
import sys
import logging
from pyaavso.utils import download_observations
if __name__ == '__main__':
# configure logging so we can see some informational output
logger = logging.getLogger('pyaavso.utils')
logger.setLevel(logging.DEBU... |
090a11c08839eae78e0ca6ec963b66ac3876ba35 | circuits/web/events.py | circuits/web/events.py | # Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
class Request(WebEvent):
"""Request(WebEvent) -> Reques... | # Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
success = True
failure = True
class Request(WebEv... | Move success/failure properties into WebEvent base class. | Move success/failure properties into WebEvent base class.
| Python | mit | nizox/circuits,eriol/circuits,eriol/circuits,treemo/circuits,eriol/circuits,treemo/circuits,treemo/circuits | # Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
class Request(WebEvent):
"""Request(WebEvent) -> Reques... | # Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
success = True
failure = True
class Request(WebEv... | <commit_before># Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
class Request(WebEvent):
"""Request(WebE... | # Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
success = True
failure = True
class Request(WebEv... | # Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
class Request(WebEvent):
"""Request(WebEvent) -> Reques... | <commit_before># Module: events
# Date: 3rd February 2009
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Events
This module implements the necessary Events needed.
"""
from circuits import Event
class WebEvent(Event):
channels = ("web",)
class Request(WebEvent):
"""Request(WebE... |
3222f720cc46a0e21f2ae5b2a9e8d4695c71a24e | changes/api/author_build_index.py | changes/api/author_build_index.py | from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if author_id == 'me':... | from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if author_id == 'me':... | Add source to author build index query | Add source to author build index query
| Python | apache-2.0 | dropbox/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes | from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if author_id == 'me':... | from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if author_id == 'me':... | <commit_before>from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if aut... | from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if author_id == 'me':... | from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if author_id == 'me':... | <commit_before>from __future__ import absolute_import, division, unicode_literals
from flask import session
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.models import Author, Build
class AuthorBuildIndexAPIView(APIView):
def _get_author(self, author_id):
if aut... |
bf46826e2e81ee071350c69ccc136ccedff330aa | UCP/news_event/api.py | UCP/news_event/api.py | """
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permissions import I... | """
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permissions import I... | Switch from modelviewset to mixins | Switch from modelviewset to mixins
| Python | bsd-3-clause | BuildmLearn/University-Campus-Portal-UCP,BuildmLearn/University-Campus-Portal-UCP,BuildmLearn/University-Campus-Portal-UCP | """
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permissions import I... | """
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permissions import I... | <commit_before>"""
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permi... | """
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permissions import I... | """
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permissions import I... | <commit_before>"""
API file for news and event app
consists of the news list, detail and add api
events list, detail and add api
"""
from django.utils import timezone
from rest_framework import status, mixins
from rest_framework.authentication import TokenAuthentication, BasicAuthentication
from rest_framework.permi... |
43103f59b4409ef15913d0394327d25959721afa | bin/trigger_upload.py | bin/trigger_upload.py | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | Move logic inside the main function | scripts: Move logic inside the main function
Signed-off-by: Sayan Chowdhury <[email protected]>
| Python | agpl-3.0 | fedora-infra/fedimg,fedora-infra/fedimg | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | <commit_before>#!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log ... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | #!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log = logging.getLo... | <commit_before>#!/bin/env python
# -*- coding: utf8 -*-
""" Triggers an upload process with the specified raw.xz URL. """
import argparse
import logging
import logging.config
import multiprocessing.pool
import fedmsg.config
import fedimg.uploader
logging.config.dictConfig(fedmsg.config.load_config()['logging'])
log ... |
7711e9d04d81c4b948599f7454b87274a8f5ad9e | src/py3flowtools/flowd_wrapper.py | src/py3flowtools/flowd_wrapper.py | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | Fix up error handling for flowd | Fix up error handling for flowd
| Python | mit | bbayles/py3flowtools | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | <commit_before># flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major <... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | # flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major < 3:
import ... | <commit_before># flowtools_wrapper.py
# Copyright 2014 Bo Bayles ([email protected])
# See http://github.com/bbayles/py3flowtools for documentation and license
from __future__ import division, print_function, unicode_literals
import io
import os
import sys
from .flow_line import FlowLine
if sys.version_info.major <... |
423243bce63da26ca4c5ea784376488ea8997873 | reg/__init__.py | reg/__init__.py | # flake8: noqa
#from .registry import Registry, CachingKeyLookup, Lookup
from .dispatch import dispatch, dispatch_method, auto_methodify
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationError, KeyExtract... | # flake8: noqa
from .dispatch import (dispatch, dispatch_method,
auto_methodify, clean_dispatch_methods)
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationError, KeyExtractorError
f... | Clean dispatch methods exposed to api. | Clean dispatch methods exposed to api.
| Python | bsd-3-clause | taschini/reg,morepath/reg | # flake8: noqa
#from .registry import Registry, CachingKeyLookup, Lookup
from .dispatch import dispatch, dispatch_method, auto_methodify
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationError, KeyExtract... | # flake8: noqa
from .dispatch import (dispatch, dispatch_method,
auto_methodify, clean_dispatch_methods)
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationError, KeyExtractorError
f... | <commit_before># flake8: noqa
#from .registry import Registry, CachingKeyLookup, Lookup
from .dispatch import dispatch, dispatch_method, auto_methodify
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationEr... | # flake8: noqa
from .dispatch import (dispatch, dispatch_method,
auto_methodify, clean_dispatch_methods)
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationError, KeyExtractorError
f... | # flake8: noqa
#from .registry import Registry, CachingKeyLookup, Lookup
from .dispatch import dispatch, dispatch_method, auto_methodify
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationError, KeyExtract... | <commit_before># flake8: noqa
#from .registry import Registry, CachingKeyLookup, Lookup
from .dispatch import dispatch, dispatch_method, auto_methodify
from .mapply import mapply
from .arginfo import arginfo
from .argextract import KeyExtractor
from .sentinel import Sentinel, NOT_FOUND
from .error import RegistrationEr... |
b706c8130c8f9aa56a78338a078a737fbb8ca28d | run.py | run.py | from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run(debug=True)
| from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run()
| Remove debug mode default setting of true | Remove debug mode default setting of true
| Python | mit | JoshuaOndieki/buckylist,JoshuaOndieki/buckylist | from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run(debug=True)
Remove debug mode default setting of true | from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run()
| <commit_before>from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run(debug=True)
<commit_msg>Remove debug mode default setting of true<commit_after> | from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run()
| from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run(debug=True)
Remove debug mode default setting of truefrom bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run()
| <commit_before>from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run(debug=True)
<commit_msg>Remove debug mode default setting of true<commit_after>from bucky import create_app
app = create_app('development')
if __name__ == "__main__":
app.run()
|
eac0b6cb28e86b43d6459d631f10fd3d7a7b2287 | cli/hdfs.py | cli/hdfs.py | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '/usr/bin/hadoop... | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '/usr/bin/hadoop... | Change default value for line number | Change default value for line number
| Python | apache-2.0 | dongjoon-hyun/tools,dongjoon-hyun/tools,dongjoon-hyun/tools,dongjoon-hyun/tools,dongjoon-hyun/tools | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '/usr/bin/hadoop... | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '/usr/bin/hadoop... | <commit_before>#!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '... | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '/usr/bin/hadoop... | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '/usr/bin/hadoop... | <commit_before>#!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
"""
Intelligence Platform CLI Fabric File
"""
__author__ = 'Dongjoon Hyun ([email protected])'
__license__ = 'Apache License'
__version__ = '0.2'
from fabric.api import *
@task
def ls(inpath='/'):
"""
fab hdfs.ls:/sample
"""
cmd = '... |
94c149f950a24a5034082c9b177037307f9ed809 | hdfs.py | hdfs.py | import sys, os
import shlex, subprocess
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..."
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
print "Done getting %s..."
def hdfs_push_file(local_path, hdfs_path):
print "Putting %s..."
command = "... | import sys, os
import shlex, subprocess
import time
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..." % (hdfs_path)
start = time.time()
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
end = time.time()
print "Done getting %s, took %d seconds"... | Add some timing and fix debug output from HDFS client. | Add some timing and fix debug output from HDFS client.
| Python | mit | ms705/napper | import sys, os
import shlex, subprocess
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..."
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
print "Done getting %s..."
def hdfs_push_file(local_path, hdfs_path):
print "Putting %s..."
command = "... | import sys, os
import shlex, subprocess
import time
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..." % (hdfs_path)
start = time.time()
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
end = time.time()
print "Done getting %s, took %d seconds"... | <commit_before>import sys, os
import shlex, subprocess
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..."
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
print "Done getting %s..."
def hdfs_push_file(local_path, hdfs_path):
print "Putting %s...... | import sys, os
import shlex, subprocess
import time
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..." % (hdfs_path)
start = time.time()
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
end = time.time()
print "Done getting %s, took %d seconds"... | import sys, os
import shlex, subprocess
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..."
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
print "Done getting %s..."
def hdfs_push_file(local_path, hdfs_path):
print "Putting %s..."
command = "... | <commit_before>import sys, os
import shlex, subprocess
def hdfs_fetch_file(hdfs_path, local_path):
print "Getting %s..."
command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
subprocess.call(shlex.split(command))
print "Done getting %s..."
def hdfs_push_file(local_path, hdfs_path):
print "Putting %s...... |
f94e7db48e6a3fe51d5ccc898d2a1e6de1d101c6 | urls.py | urls.py | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PAT... | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
(r'^', include('server_ui.urls')),
... | Test DEBUG to serve static files by django | Test DEBUG to serve static files by django
| Python | apache-2.0 | shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server,shirlei/helios-server | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PAT... | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
(r'^', include('server_ui.urls')),
... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY AP... | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
(r'^', include('server_ui.urls')),
... | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY APACHE STATIC PAT... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^auth/', include('helios_auth.urls')),
(r'^helios/', include('helios.urls')),
# SHOULD BE REPLACED BY AP... |
ee362795318507b757795e0be4c45d68c17cd28f | roll.py | roll.py | #!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
return randrange(1, int(die... | #!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# roll v1.0
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
assert isinsta... | Add assert to prevent invalid input | Add assert to prevent invalid input
| Python | agpl-3.0 | TechnologyClassroom/dice-mechanic-sim,TechnologyClassroom/dice-mechanic-sim | #!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
return randrange(1, int(die... | #!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# roll v1.0
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
assert isinsta... | <commit_before>#!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
return randr... | #!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# roll v1.0
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
assert isinsta... | #!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
return randrange(1, int(die... | <commit_before>#!/usr/bin/env python
"""roll simulates rolling polyhedral dice."""
# roll.py
# Michael McMahon
from random import randrange
# Die roll function
# This function rolls polyhedral dice. Example: To roll a d8, use roll(8).
def roll(diefaces):
"""Simulate rolling polyhedral dice"""
return randr... |
f7b592d44bd6586cea34ff7262a874142802fb84 | Python/setup.py | Python/setup.py | """Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype',
version=... | """Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype',
version=... | Make qipype and QUIT version numbers match | Make qipype and QUIT version numbers match
| Python | mpl-2.0 | spinicist/QUIT,spinicist/QUIT,spinicist/QUIT,spinicist/QUIT | """Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype',
version=... | """Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype',
version=... | <commit_before>"""Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype... | """Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype',
version=... | """Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype',
version=... | <commit_before>"""Setup file to Not Another Neuroimaging Slicer
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.abspath(path.join(here, 'README.md'))) as f:
long_description = f.read()
setup(
name='qipype... |
478f651184a84fae36959e8dfa1fa1c9ebb01f09 | onepercentclub/settings/travis.py | onepercentclub/settings/travis.py | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
SELENIUM_TESTS = False
ROOT_U... | Use FF as test browser in Travis | Use FF as test browser in Travis
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
SELENIUM_TESTS = False
ROOT_U... | <commit_before># TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS =... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'firefox'
SELENIUM_TESTS = False
ROOT_U... | # TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS = False
ROOT_UR... | <commit_before># TODO: not sure why but we need to include the SECRET_KEY here - importing from the test_runner file doesn't work
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
from .test_runner import *
# Use firefox for running tests on Travis
SELENIUM_WEBDRIVER = 'remote'
SELENIUM_TESTS =... |
59c29cbf7f41221b412253ec1f0444496bd934fa | tube.py | tube.py | """Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def success(self, ... | """Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def success(self, ... | Remove dirty lies from doctstring | Remove dirty lies from doctstring
This was a leftover from wherever I originally copied this config from.
| Python | mit | blaix/tdubs | """Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def success(self, ... | """Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def success(self, ... | <commit_before>"""Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def... | """Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def success(self, ... | """Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def success(self, ... | <commit_before>"""Configuration for testtube.
Automatically run tests when files change by running: stir
See: https://github.com/thomasw/testtube
For flake8, don't forget to install:
* flake8-quotes
"""
from testtube.helpers import Flake8, Helper, Nosetests
class ScreenClearer(Helper):
command = 'clear'
def... |
2c6ff2b65ea291816221fe996fb282c2c4a74dd7 | install_steps/create_bosh_cert.py | install_steps/create_bosh_cert.py | def do_step(context):
call("mkdir -p ./bosh", shell=True)
call("mkdir -p ./bosh/manifests", shell=True)
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
call("cp bosh.key ./bosh/bosh", shell=True)
with open ('bosh_cert.pem', 'r') as tmpfile:
ssh_cert = t... | from subprocess import call
from os import makedirs
from shutil import copy
def do_step(context):
makedirs("bosh/manifests")
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
copy("bosh.key", "./bosh/bosh")
with open ('bosh_cert.pem', 'r') as tmpfile:
ssh_ce... | Use python libs to do file operations | Use python libs to do file operations
| Python | apache-2.0 | cf-platform-eng/bosh-azure-template,cf-platform-eng/bosh-azure-template | def do_step(context):
call("mkdir -p ./bosh", shell=True)
call("mkdir -p ./bosh/manifests", shell=True)
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
call("cp bosh.key ./bosh/bosh", shell=True)
with open ('bosh_cert.pem', 'r') as tmpfile:
ssh_cert = t... | from subprocess import call
from os import makedirs
from shutil import copy
def do_step(context):
makedirs("bosh/manifests")
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
copy("bosh.key", "./bosh/bosh")
with open ('bosh_cert.pem', 'r') as tmpfile:
ssh_ce... | <commit_before>def do_step(context):
call("mkdir -p ./bosh", shell=True)
call("mkdir -p ./bosh/manifests", shell=True)
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
call("cp bosh.key ./bosh/bosh", shell=True)
with open ('bosh_cert.pem', 'r') as tmpfile:
... | from subprocess import call
from os import makedirs
from shutil import copy
def do_step(context):
makedirs("bosh/manifests")
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
copy("bosh.key", "./bosh/bosh")
with open ('bosh_cert.pem', 'r') as tmpfile:
ssh_ce... | def do_step(context):
call("mkdir -p ./bosh", shell=True)
call("mkdir -p ./bosh/manifests", shell=True)
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
call("cp bosh.key ./bosh/bosh", shell=True)
with open ('bosh_cert.pem', 'r') as tmpfile:
ssh_cert = t... | <commit_before>def do_step(context):
call("mkdir -p ./bosh", shell=True)
call("mkdir -p ./bosh/manifests", shell=True)
# Generate the private key and certificate
call("sh create_cert.sh", shell=True)
call("cp bosh.key ./bosh/bosh", shell=True)
with open ('bosh_cert.pem', 'r') as tmpfile:
... |
91d4c3a27002f62fbdd949e40dce96d58bdf5394 | billjobs/permissions.py | billjobs/permissions.py | from rest_framework import permissions
class CustomUserAPIPermission(permissions.BasePermission):
"""
Define custom permission for UserAPI and UserDetailAPI
GET : only accessible by admin
POST: public
"""
def has_permission(self, request, view):
if request.method == 'GET':
... | Write permission for user api, make POST public | Write permission for user api, make POST public
| Python | mit | ioO/billjobs | Write permission for user api, make POST public | from rest_framework import permissions
class CustomUserAPIPermission(permissions.BasePermission):
"""
Define custom permission for UserAPI and UserDetailAPI
GET : only accessible by admin
POST: public
"""
def has_permission(self, request, view):
if request.method == 'GET':
... | <commit_before><commit_msg>Write permission for user api, make POST public<commit_after> | from rest_framework import permissions
class CustomUserAPIPermission(permissions.BasePermission):
"""
Define custom permission for UserAPI and UserDetailAPI
GET : only accessible by admin
POST: public
"""
def has_permission(self, request, view):
if request.method == 'GET':
... | Write permission for user api, make POST publicfrom rest_framework import permissions
class CustomUserAPIPermission(permissions.BasePermission):
"""
Define custom permission for UserAPI and UserDetailAPI
GET : only accessible by admin
POST: public
"""
def has_permission(self, request, view):
... | <commit_before><commit_msg>Write permission for user api, make POST public<commit_after>from rest_framework import permissions
class CustomUserAPIPermission(permissions.BasePermission):
"""
Define custom permission for UserAPI and UserDetailAPI
GET : only accessible by admin
POST: public
"""
... | |
21f3d1957258f87e45ddcb39a17ecf2143c203b0 | kindred/pycorenlp.py | kindred/pycorenlp.py | # Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
def __init__(self, server_url):
self.server_url = server_url
def annotate(self, text, properties={}):
assert isinstance(text, six.string_types),"text must be ... | # Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
useSessions = True
sessions = {}
def __init__(self, server_url):
self.server_url = server_url
if StanfordCoreNLP.useSessions:
if not server_url in Stanfor... | Add experimental sessions code for CoreNLP requests | Add experimental sessions code for CoreNLP requests
| Python | mit | jakelever/kindred,jakelever/kindred | # Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
def __init__(self, server_url):
self.server_url = server_url
def annotate(self, text, properties={}):
assert isinstance(text, six.string_types),"text must be ... | # Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
useSessions = True
sessions = {}
def __init__(self, server_url):
self.server_url = server_url
if StanfordCoreNLP.useSessions:
if not server_url in Stanfor... | <commit_before># Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
def __init__(self, server_url):
self.server_url = server_url
def annotate(self, text, properties={}):
assert isinstance(text, six.string_types)... | # Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
useSessions = True
sessions = {}
def __init__(self, server_url):
self.server_url = server_url
if StanfordCoreNLP.useSessions:
if not server_url in Stanfor... | # Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
def __init__(self, server_url):
self.server_url = server_url
def annotate(self, text, properties={}):
assert isinstance(text, six.string_types),"text must be ... | <commit_before># Temporary inclusion of pycorenlp code for easier edits
# https://github.com/smilli/py-corenlp
import json, requests
import six
class StanfordCoreNLP:
def __init__(self, server_url):
self.server_url = server_url
def annotate(self, text, properties={}):
assert isinstance(text, six.string_types)... |
f3d911eb4aef1a25e173874e52bb17e0f3fdd660 | indra/db/belief.py | indra/db/belief.py | class MockStatement(object):
def __init__(self, evidence, mk_hash, supports):
self.evidence = evidence
self.__mk_hash = mk_hash
self.supports = supports
self.belief = None
def matches_key(self):
return self.__mk_hash
class MockEvidence(object):
def __init__(self, s... | class MockStatement(object):
"""A class to imitate real INDRA Statements for calculating belief."""
def __init__(self, evidence, mk_hash, supports):
if isinstance(evidence, list):
self.evidence = evidence
else:
self.evidence = [evidence]
self.__mk_hash = mk_hash
... | Allow evidence to be list of single instance. | Allow evidence to be list of single instance.
| Python | bsd-2-clause | pvtodorov/indra,sorgerlab/indra,pvtodorov/indra,bgyori/indra,johnbachman/indra,johnbachman/belpy,bgyori/indra,pvtodorov/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra | class MockStatement(object):
def __init__(self, evidence, mk_hash, supports):
self.evidence = evidence
self.__mk_hash = mk_hash
self.supports = supports
self.belief = None
def matches_key(self):
return self.__mk_hash
class MockEvidence(object):
def __init__(self, s... | class MockStatement(object):
"""A class to imitate real INDRA Statements for calculating belief."""
def __init__(self, evidence, mk_hash, supports):
if isinstance(evidence, list):
self.evidence = evidence
else:
self.evidence = [evidence]
self.__mk_hash = mk_hash
... | <commit_before>class MockStatement(object):
def __init__(self, evidence, mk_hash, supports):
self.evidence = evidence
self.__mk_hash = mk_hash
self.supports = supports
self.belief = None
def matches_key(self):
return self.__mk_hash
class MockEvidence(object):
def _... | class MockStatement(object):
"""A class to imitate real INDRA Statements for calculating belief."""
def __init__(self, evidence, mk_hash, supports):
if isinstance(evidence, list):
self.evidence = evidence
else:
self.evidence = [evidence]
self.__mk_hash = mk_hash
... | class MockStatement(object):
def __init__(self, evidence, mk_hash, supports):
self.evidence = evidence
self.__mk_hash = mk_hash
self.supports = supports
self.belief = None
def matches_key(self):
return self.__mk_hash
class MockEvidence(object):
def __init__(self, s... | <commit_before>class MockStatement(object):
def __init__(self, evidence, mk_hash, supports):
self.evidence = evidence
self.__mk_hash = mk_hash
self.supports = supports
self.belief = None
def matches_key(self):
return self.__mk_hash
class MockEvidence(object):
def _... |
539f78c8ea4ca1692ae27a2d0bdc01004b5ad471 | examples/plot_humidity.py | examples/plot_humidity.py | import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather
from datetime import date
m = MagicWeather(auxdir='/fact/aux')
df = m.read_date(date(2015, 12, 31))
df.plot(x='timestamp', y='humidity', legend=False)
plt.ylabel('Humidity / %')
plt.show()
| import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather, PfMini
import pandas as pd
from tqdm import tqdm
import datetime
plt.style.use('ggplot')
magic_weather = MagicWeather(auxdir='/fact/aux')
pf_mini = PfMini(auxdir='/fact/aux')
dates = pd.date_range('2015-10-20', datetime.date.today())
outside = pd... | Modify example to make camera vs. outside humidity plot | Modify example to make camera vs. outside humidity plot
| Python | mit | fact-project/aux2mongodb | import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather
from datetime import date
m = MagicWeather(auxdir='/fact/aux')
df = m.read_date(date(2015, 12, 31))
df.plot(x='timestamp', y='humidity', legend=False)
plt.ylabel('Humidity / %')
plt.show()
Modify example to make camera vs. outside humidity plot | import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather, PfMini
import pandas as pd
from tqdm import tqdm
import datetime
plt.style.use('ggplot')
magic_weather = MagicWeather(auxdir='/fact/aux')
pf_mini = PfMini(auxdir='/fact/aux')
dates = pd.date_range('2015-10-20', datetime.date.today())
outside = pd... | <commit_before>import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather
from datetime import date
m = MagicWeather(auxdir='/fact/aux')
df = m.read_date(date(2015, 12, 31))
df.plot(x='timestamp', y='humidity', legend=False)
plt.ylabel('Humidity / %')
plt.show()
<commit_msg>Modify example to make camera v... | import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather, PfMini
import pandas as pd
from tqdm import tqdm
import datetime
plt.style.use('ggplot')
magic_weather = MagicWeather(auxdir='/fact/aux')
pf_mini = PfMini(auxdir='/fact/aux')
dates = pd.date_range('2015-10-20', datetime.date.today())
outside = pd... | import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather
from datetime import date
m = MagicWeather(auxdir='/fact/aux')
df = m.read_date(date(2015, 12, 31))
df.plot(x='timestamp', y='humidity', legend=False)
plt.ylabel('Humidity / %')
plt.show()
Modify example to make camera vs. outside humidity plotimp... | <commit_before>import matplotlib.pyplot as plt
from aux2mongodb import MagicWeather
from datetime import date
m = MagicWeather(auxdir='/fact/aux')
df = m.read_date(date(2015, 12, 31))
df.plot(x='timestamp', y='humidity', legend=False)
plt.ylabel('Humidity / %')
plt.show()
<commit_msg>Modify example to make camera v... |
58e5a7e332015e05498edf0f4012fc6b817b99b9 | longclaw/longclawproducts/tests.py | longclaw/longclawproducts/tests.py | from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts(WagtailPageTes... | from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts(WagtailPageTes... | Add a test for product title | Add a test for product title
| Python | mit | JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw | from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts(WagtailPageTes... | from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts(WagtailPageTes... | <commit_before>from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts... | from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts(WagtailPageTes... | from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts(WagtailPageTes... | <commit_before>from wagtail.tests.utils import WagtailPageTests
from longclaw.utils import maybe_get_product_model
from longclaw.tests.products.models import ProductIndex
from longclaw.tests.utils import ProductVariantFactory
from longclaw.longclawproducts.serializers import ProductVariantSerializer
class TestProducts... |
55582454e9321f6d5cfd458261e6ce7401f4b36a | ocradmin/lib/nodetree/test_nodes.py | ocradmin/lib/nodetree/test_nodes.py | """
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
_parameters = [
dict(name="num", value=0),
]
def _eval(self):
return self._params.g... | """
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
parameters = [
dict(name="num", value=0),
]
def _eval(self):
return self._params.ge... | Fix parameters on test nodes | Fix parameters on test nodes
| Python | apache-2.0 | vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium | """
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
_parameters = [
dict(name="num", value=0),
]
def _eval(self):
return self._params.g... | """
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
parameters = [
dict(name="num", value=0),
]
def _eval(self):
return self._params.ge... | <commit_before>"""
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
_parameters = [
dict(name="num", value=0),
]
def _eval(self):
return... | """
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
parameters = [
dict(name="num", value=0),
]
def _eval(self):
return self._params.ge... | """
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
_parameters = [
dict(name="num", value=0),
]
def _eval(self):
return self._params.g... | <commit_before>"""
Nodetree test nodes.
"""
from __future__ import absolute_import
import types
from . import node
class Number(node.Node):
"""A number constant."""
intypes = []
outtype = types.IntType
_parameters = [
dict(name="num", value=0),
]
def _eval(self):
return... |
e0c9f12463f1e4cc17eefbf8909118604695a23d | oscar/apps/search/search_indexes.py | oscar/apps/search/search_indexes.py | from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(document=True, use_tem... | from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(document=True, use_tem... | Fix issue with latest changes in haystack | Fix issue with latest changes in haystack
A merge into haystack has resulted in an additional argument for
``index_queryset``, I updated the search index for Oscar's product
to fix the issue.
| Python | bsd-3-clause | MatthewWilkes/django-oscar,jmt4/django-oscar,michaelkuty/django-oscar,jlmadurga/django-oscar,rocopartners/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,makielab/django-oscar,Bogh/django-oscar,jinnykoo/christmas,WadeYuChen/django-oscar,faratro/django-oscar,eddiep1101/django-oscar,jinnykoo/christmas,it... | from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(document=True, use_tem... | from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(document=True, use_tem... | <commit_before>from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(documen... | from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(document=True, use_tem... | from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(document=True, use_tem... | <commit_before>from haystack import indexes
from django.db.models import get_model
class ProductIndex(indexes.SearchIndex, indexes.Indexable):
"""
Base class for products solr index definition. Overide by creating your
own copy of oscar.search_indexes.py
"""
text = indexes.EdgeNgramField(documen... |
957c74c5083eaab466fc72e21afc929267191676 | openedx/features/job_board/views.py | openedx/features/job_board/views.py | from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-created']
templ... | from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-created']
templ... | Remove get_context_data override and use the paginator total count instead | Remove get_context_data override and use the paginator total count instead
| Python | agpl-3.0 | philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform | from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-created']
templ... | from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-created']
templ... | <commit_before>from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-crea... | from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-created']
templ... | from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-created']
templ... | <commit_before>from django.views.generic.list import ListView
from edxmako.shortcuts import render_to_response
from .models import Job
class JobListView(ListView):
model = Job
context_object_name = 'job_list'
paginate_by = 10
template_name = 'features/job_board/job_list.html'
ordering = ['-crea... |
7eac938f0a4726beb1eb01d32486dfeb0e57ff3a | h2o-hadoop/tests/python/pyunit_s3_import_export.py | h2o-hadoop/tests/python/pyunit_s3_import_export.py | #! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.cs... | #! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
import uuid
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg... | Fix flaky Hadoop smoke tests - make sure the exported files are unique | Fix flaky Hadoop smoke tests - make sure the exported files are unique
| Python | apache-2.0 | h2oai/h2o-dev,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,michalkurka/h2o-3,michalkurka/h2o-3 | #! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.cs... | #! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
import uuid
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg... | <commit_before>#! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/log... | #! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
import uuid
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg... | #! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.cs... | <commit_before>#! /usr/env/python
import sys, os
sys.path.insert(1, os.path.join("..","..",".."))
from tests import pyunit_utils
from datetime import datetime
import h2o
from pandas.util.testing import assert_frame_equal
def s3_import_export():
local_frame = h2o.import_file(path=pyunit_utils.locate("smalldata/log... |
00feeb0d9515d5f47a9c22244edd817c629a96e6 | conftest.py | conftest.py | import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCONF = 'caspy.urls... | import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCONF = 'caspy.urls... | Set MIDDLEWARE_CLASSES so Django will stop complaining | Set MIDDLEWARE_CLASSES so Django will stop complaining
| Python | bsd-3-clause | altaurog/django-caspy,altaurog/django-caspy,altaurog/django-caspy | import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCONF = 'caspy.urls... | import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCONF = 'caspy.urls... | <commit_before>import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCON... | import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCONF = 'caspy.urls... | import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCONF = 'caspy.urls... | <commit_before>import os
import sys
from django.conf import settings
def pytest_configure():
sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
settings.configure(
INSTALLED_APPS = (
'caspy',
'rest_framework',
'testapp',
),
ROOT_URLCON... |
9d919434ceb24fcd4e2827ce6570dde9296d7ae2 | out2in.py | out2in.py | #!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.txt')
for name in out_files[:-1]:
os.remove(name)
| #!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.csv')
for name in out_files[:-1]:
os.remove(name)
| Fix mistyped input file name | Fix mistyped input file name
| Python | mit | dzhang314/pcreo | #!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.txt')
for name in out_files[:-1]:
os.remove(name)
Fix mistyped input file n... | #!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.csv')
for name in out_files[:-1]:
os.remove(name)
| <commit_before>#!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.txt')
for name in out_files[:-1]:
os.remove(name)
<commit_ms... | #!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.csv')
for name in out_files[:-1]:
os.remove(name)
| #!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.txt')
for name in out_files[:-1]:
os.remove(name)
Fix mistyped input file n... | <commit_before>#!/usr/bin/env python3
import glob
import os
out_files = glob.glob('pcreo_??????????.csv')
out_files.sort()
if len(out_files) == 0:
print("WARNING: No PCreo output files found.")
else:
os.rename(out_files[-1], 'pcreo_input.txt')
for name in out_files[:-1]:
os.remove(name)
<commit_ms... |
d869b5b31eddcbc1303affb1555c2117a365b64a | models/recordsfields_artemplate.py | models/recordsfields_artemplate.py | from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
fields.Bool... | from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
fields.Bool... | Define a model for 'Analyses' in Analysis Request inherit from records_field_artemplate. | Define a model for 'Analyses' in Analysis Request inherit from records_field_artemplate.
| Python | agpl-3.0 | sciCloud/OLiMS,sciCloud/OLiMS,yasir1brahim/OLiMS,sciCloud/OLiMS | from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
fields.Bool... | from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
fields.Bool... | <commit_before>from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
... | from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
fields.Bool... | from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
fields.Bool... | <commit_before>from openerp import fields, models, api
from base_olims_model import BaseOLiMSModel
schema = (fields.Many2one(string='Services',
comodel_name='olims.analysis_service',
domain="[('category', '=', Category)]",
relation='recordfield_service'),
... |
a7534be2fdc147321f180aee38c8d5879bd3f4ad | stestr/tests/base.py | stestr/tests/base.py | # 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, software
# distributed under th... | # 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, software
# distributed under th... | Make unit test attachment fixtures always enabled | Make unit test attachment fixtures always enabled
The code used in the base test class was copied from other projects and
made the stdout, stderr, and logging attachments enabled optionally by
env variables. However there is no reason to do that since if there is
any output it is best to capture it instead of dropping... | Python | apache-2.0 | mtreinish/stestr,mtreinish/stestr,masayukig/stestr,masayukig/stestr | # 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, software
# distributed under th... | # 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, software
# distributed under th... | <commit_before># 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, software
# distr... | # 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, software
# distributed under th... | # 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, software
# distributed under th... | <commit_before># 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, software
# distr... |
1091d541db93f533f1e078118825257bc3789371 | data/streaming_test.py | data/streaming_test.py | #!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
import sys, os, tim... | #!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
import sys, os, tim... | Sort files by modification date when testing streaming to preserve order | Sort files by modification date when testing streaming to preserve order
| Python | apache-2.0 | kcompher/thunder,zhwa/thunder,kcompher/thunder,pearsonlab/thunder,kunallillaney/thunder,poolio/thunder,j-friedrich/thunder,poolio/thunder,j-friedrich/thunder,oliverhuangchao/thunder,thunder-project/thunder,jwittenbach/thunder,broxtronix/thunder,pearsonlab/thunder,oliverhuangchao/thunder,kunallillaney/thunder,broxtronix... | #!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
import sys, os, tim... | #!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
import sys, os, tim... | <commit_before>#!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
impo... | #!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
import sys, os, tim... | #!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
import sys, os, tim... | <commit_before>#!/usr/bin/env python
#
# test a streaming app by dumping files from one directory
# into another, at a specified rate
#
# <streaming_test> srcPath targetPath waitTime
#
# example:
# data/streaming_test.py /groups/ahrens/ahrenslab/Misha/forJeremy_SparkStreamingSample/ /nobackup/freeman/buffer/ 1
#
impo... |
4976931febdbddec362411b62c7574d4a26368d5 | launch_instance.py | launch_instance.py | # License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None):
'''
'''
if not isinstance(security_groups, list):
... | # License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None, initial_check=True):
'''
'''
if not isinstance(security... | Make the initialization wait optional | Make the initialization wait optional
| Python | mit | Astroua/aws_controller,Astroua/aws_controller | # License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None):
'''
'''
if not isinstance(security_groups, list):
... | # License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None, initial_check=True):
'''
'''
if not isinstance(security... | <commit_before># License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None):
'''
'''
if not isinstance(security_grou... | # License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None, initial_check=True):
'''
'''
if not isinstance(security... | # License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None):
'''
'''
if not isinstance(security_groups, list):
... | <commit_before># License under the MIT License - see LICENSE
import boto.ec2
import os
import time
def launch(key_name, region='us-west-2', image_id='ami-5189a661',
instance_type='t2.micro', security_groups='launch-wizard-1',
user_data=None):
'''
'''
if not isinstance(security_grou... |
ccc2a583ca2365609e0da0d4bdc5e00d49cd172b | bob/templatetags/bob.py | bob/templatetags/bob.py |
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.resolve(context)
... |
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.resolve(context)
... | Copy the template name list from the fragment so we don't mutate it | Copy the template name list from the fragment so we don't mutate it
| Python | mit | funkybob/bobcms,funkybob/bobcms |
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.resolve(context)
... |
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.resolve(context)
... | <commit_before>
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.re... |
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.resolve(context)
... |
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.resolve(context)
... | <commit_before>
from django import template
from django.template.loaders import select_template
register = template.Library()
class PlaceholderNode(template.Node):
def __init__(self, name, **kwargs):
self.name = name
self.kwargs = kwargs
def render(self, context):
name = self.name.re... |
cc7604bc06616b3450db4365141738c92e8285b8 | memegen/settings.py | memegen/settings.py | import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
... | import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
... | Disable SQLAlchemy change tracking signals | Disable SQLAlchemy change tracking signals
This is enabled by default, which currently emits a warning.
The default will be False in the future.
| Python | mit | DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen,DanLindeman/memegen | import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
... | import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
... | <commit_before>import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DA... | import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
... | import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
... | <commit_before>import os
class Config:
"""Base configuration."""
ENV = None
PATH = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.dirname(PATH)
DEBUG = False
THREADED = False
GOOGLE_ANALYTICS_TID = os.getenv('GOOGLE_ANALYTICS_TID')
SQLALCHEMY_DATABASE_URI = os.getenv('DA... |
e3a95d00444fb981d7aaf6d3beffca8796a8891f | mycroft/frontends/tts/mimic_tts.py | mycroft/frontends/tts/mimic_tts.py | from subprocess import call
from mycroft.frontends.tts.tts_plugin import TtsPlugin
class MimicTts(TtsPlugin):
def read(self, text):
call(['mimic', '-t', text, '-voice', self.config['voice']])
| from subprocess import call
from os.path import isdir
from mycroft.frontends.tts.tts_plugin import TtsPlugin
from mycroft.util.git_repo import GitRepo
class MimicTts(TtsPlugin):
def __init__(self, rt):
super().__init__(rt)
if not isdir(self.rt.paths.mimic_exe):
self.download_mimic()... | Add download and compile step to mimic | Add download and compile step to mimic
| Python | apache-2.0 | MatthewScholefield/mycroft-simple,MatthewScholefield/mycroft-simple | from subprocess import call
from mycroft.frontends.tts.tts_plugin import TtsPlugin
class MimicTts(TtsPlugin):
def read(self, text):
call(['mimic', '-t', text, '-voice', self.config['voice']])
Add download and compile step to mimic | from subprocess import call
from os.path import isdir
from mycroft.frontends.tts.tts_plugin import TtsPlugin
from mycroft.util.git_repo import GitRepo
class MimicTts(TtsPlugin):
def __init__(self, rt):
super().__init__(rt)
if not isdir(self.rt.paths.mimic_exe):
self.download_mimic()... | <commit_before>from subprocess import call
from mycroft.frontends.tts.tts_plugin import TtsPlugin
class MimicTts(TtsPlugin):
def read(self, text):
call(['mimic', '-t', text, '-voice', self.config['voice']])
<commit_msg>Add download and compile step to mimic<commit_after> | from subprocess import call
from os.path import isdir
from mycroft.frontends.tts.tts_plugin import TtsPlugin
from mycroft.util.git_repo import GitRepo
class MimicTts(TtsPlugin):
def __init__(self, rt):
super().__init__(rt)
if not isdir(self.rt.paths.mimic_exe):
self.download_mimic()... | from subprocess import call
from mycroft.frontends.tts.tts_plugin import TtsPlugin
class MimicTts(TtsPlugin):
def read(self, text):
call(['mimic', '-t', text, '-voice', self.config['voice']])
Add download and compile step to mimicfrom subprocess import call
from os.path import isdir
from mycroft.fronte... | <commit_before>from subprocess import call
from mycroft.frontends.tts.tts_plugin import TtsPlugin
class MimicTts(TtsPlugin):
def read(self, text):
call(['mimic', '-t', text, '-voice', self.config['voice']])
<commit_msg>Add download and compile step to mimic<commit_after>from subprocess import call
from ... |
345794f454642d3a313b8da4c87a874ed9521c09 | preprocessing/collect_unigrams.py | preprocessing/collect_unigrams.py | # -*- coding: utf-8 -*-
"""
Execute via:
python -m preprocessing/collect_unigrams
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from model.unigrams import Unigrams
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
ARTICLES_FILEPATH = "/media/aj/gra... | # -*- coding: utf-8 -*-
"""
File to collect all unigrams and all name-unigrams (label PER) from a corpus file.
The corpus file must have one document/article per line. The words must be labeled in the
form word/LABEL.
Example file content:
Yestarday John/PER Doe/PER said something amazing.
... | Add documentation, refactor to use config | Add documentation, refactor to use config
| Python | mit | aleju/ner-crf | # -*- coding: utf-8 -*-
"""
Execute via:
python -m preprocessing/collect_unigrams
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from model.unigrams import Unigrams
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
ARTICLES_FILEPATH = "/media/aj/gra... | # -*- coding: utf-8 -*-
"""
File to collect all unigrams and all name-unigrams (label PER) from a corpus file.
The corpus file must have one document/article per line. The words must be labeled in the
form word/LABEL.
Example file content:
Yestarday John/PER Doe/PER said something amazing.
... | <commit_before># -*- coding: utf-8 -*-
"""
Execute via:
python -m preprocessing/collect_unigrams
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from model.unigrams import Unigrams
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
ARTICLES_FILEPATH =... | # -*- coding: utf-8 -*-
"""
File to collect all unigrams and all name-unigrams (label PER) from a corpus file.
The corpus file must have one document/article per line. The words must be labeled in the
form word/LABEL.
Example file content:
Yestarday John/PER Doe/PER said something amazing.
... | # -*- coding: utf-8 -*-
"""
Execute via:
python -m preprocessing/collect_unigrams
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from model.unigrams import Unigrams
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
ARTICLES_FILEPATH = "/media/aj/gra... | <commit_before># -*- coding: utf-8 -*-
"""
Execute via:
python -m preprocessing/collect_unigrams
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from model.unigrams import Unigrams
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
ARTICLES_FILEPATH =... |
400828c8606e614dcc11b1e7c7d1fb7336ab5082 | corehq/apps/es/sms.py | corehq/apps/es/sms.py | from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_user,
... | from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_user,
... | Add user facet for SMS | Add user facet for SMS
| Python | bsd-3-clause | puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_user,
... | from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_user,
... | <commit_before>from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_use... | from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_user,
... | from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_user,
... | <commit_before>from .es_query import HQESQuery
from . import filters
class SMSES(HQESQuery):
index = 'sms'
@property
def builtin_filters(self):
return [
incoming_messages,
outgoing_messages,
to_commcare_user,
to_commcare_case,
to_web_use... |
f5a7d49c18fe51c0600bf54b8cbf46a7cb8a0bca | mixmind/database.py | mixmind/database.py | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | Use "owner" in place of "manager" for bar roles | Use "owner" in place of "manager" for bar roles
| Python | apache-2.0 | twschum/mix-mind,twschum/mix-mind,twschum/mix-mind,twschum/mix-mind | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | <commit_before>from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first befor... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | <commit_before>from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first befor... |
2a5cc95cc08f90659a6d18db3a9e60c02f7ec4b7 | lib/servo_process.py | lib/servo_process.py | from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
signal.signal(signal.SIGINT, signal.SIG_IGN)
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
raise Ex... | from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
raise Exception('Servo driver was not found. Is servoblaster ... | Move signal ignore to run | Move signal ignore to run
| Python | mit | mlensment/rebot,mlensment/rebot | from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
signal.signal(signal.SIGINT, signal.SIG_IGN)
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
raise Ex... | from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
raise Exception('Servo driver was not found. Is servoblaster ... | <commit_before>from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
signal.signal(signal.SIGINT, signal.SIG_IGN)
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
... | from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
raise Exception('Servo driver was not found. Is servoblaster ... | from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
signal.signal(signal.SIGINT, signal.SIG_IGN)
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
raise Ex... | <commit_before>from multiprocessing import Process, Value
import os
import config
import servo
import signal
class ServoProcess(Process):
def __init__(self):
signal.signal(signal.SIGINT, signal.SIG_IGN)
print '----> Checking servo driver...'
if not os.path.exists('/dev/servoblaster'):
... |
fbc0a83bc9a72c57ba56cecd9fa06e7e86ea7589 | nbgrader/auth/base.py | nbgrader/auth/base.py | """Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
super(BaseAuth, self).__init__(**kwargs)
self._ip = ip
sel... | """Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
self._ip = ip
self._port = port
self._base_url = ''
... | Set instances variables in auth before init | Set instances variables in auth before init
| Python | bsd-3-clause | ellisonbg/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,ellisonbg/nbgrader,ellisonbg/nbgrader,ellisonbg/nbgrader,jupyter/nbgrader | """Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
super(BaseAuth, self).__init__(**kwargs)
self._ip = ip
sel... | """Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
self._ip = ip
self._port = port
self._base_url = ''
... | <commit_before>"""Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
super(BaseAuth, self).__init__(**kwargs)
self._ip =... | """Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
self._ip = ip
self._port = port
self._base_url = ''
... | """Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
super(BaseAuth, self).__init__(**kwargs)
self._ip = ip
sel... | <commit_before>"""Base formgrade authenticator."""
from traitlets.config.configurable import LoggingConfigurable
class BaseAuth(LoggingConfigurable):
"""Base formgrade authenticator."""
def __init__(self, ip, port, base_directory, **kwargs):
super(BaseAuth, self).__init__(**kwargs)
self._ip =... |
4c813a82d0035c9f49e0b07f54150676c5dd8faf | run_tests.py | run_tests.py | #!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to include."""
def ... | #!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to include."""
def ... | Make sure the tests exit with status 1 when there are errors or failures | Make sure the tests exit with status 1 when there are errors or failures | Python | apache-2.0 | google/gae-secure-scaffold-python,google/gae-secure-scaffold-python3,google/gae-secure-scaffold-python,google/gae-secure-scaffold-python | #!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to include."""
def ... | #!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to include."""
def ... | <commit_before>#!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to in... | #!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to include."""
def ... | #!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to include."""
def ... | <commit_before>#!/usr/bin/python
import optparse
import sys
import unittest2
USAGE = """%prog SDK_PATH TEST_PATH <THIRD_PARTY>
Run unit tests for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules
THIRD_PARTY Optional path to third party python modules to in... |
66df7e17fa3eb2d8da2e56e39236b019f98a2a08 | geokey_wegovnow/__init__.py | geokey_wegovnow/__init__.py | """Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 0)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=__version__
... | """Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 1)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=__version__
... | Increment version number ahead of release | Increment version number ahead of release | Python | mit | ExCiteS/geokey-wegovnow,ExCiteS/geokey-wegovnow | """Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 0)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=__version__
... | """Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 1)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=__version__
... | <commit_before>"""Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 0)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=_... | """Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 1)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=__version__
... | """Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 0)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=__version__
... | <commit_before>"""Main initialization for the WeGovNow extension."""
VERSION = (3, 2, 0)
__version__ = '.'.join(map(str, VERSION))
try:
from geokey.extensions.base import register
register(
'geokey_wegovnow',
'WeGovNow',
display_admin=False,
superuser=False,
version=_... |
43a8043054dc5f942a04efe7273b3b1743db89ca | test.py | test.py | import time
import urllib
import RPi.GPIO as GPIO
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
GPIO.setmode(GPIO.BCM)
# Disable "Ports already in use" warning
GPIO.setwarnings(False)
# ... | import time
import urllib
import RPi.GPIO as gpio
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
gpio.setmode(gpio.BCM)
# Disable "Ports already in use" warning
gpio.setwarnings(False)
# ... | Revert GPIO setup to be optimized for GPIO3 (with internal pull up resistor) | Revert GPIO setup to be optimized for GPIO3 (with internal pull up resistor)
| Python | mit | adampiskorski/lpr_poc | import time
import urllib
import RPi.GPIO as GPIO
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
GPIO.setmode(GPIO.BCM)
# Disable "Ports already in use" warning
GPIO.setwarnings(False)
# ... | import time
import urllib
import RPi.GPIO as gpio
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
gpio.setmode(gpio.BCM)
# Disable "Ports already in use" warning
gpio.setwarnings(False)
# ... | <commit_before>import time
import urllib
import RPi.GPIO as GPIO
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
GPIO.setmode(GPIO.BCM)
# Disable "Ports already in use" warning
GPIO.setwar... | import time
import urllib
import RPi.GPIO as gpio
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
gpio.setmode(gpio.BCM)
# Disable "Ports already in use" warning
gpio.setwarnings(False)
# ... | import time
import urllib
import RPi.GPIO as GPIO
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
GPIO.setmode(GPIO.BCM)
# Disable "Ports already in use" warning
GPIO.setwarnings(False)
# ... | <commit_before>import time
import urllib
import RPi.GPIO as GPIO
# GPIO input pin to use
LPR_PIN = 3
# URL to get image from
SOURCE = 'http://192.168.0.13:8080/photoaf.jpg'
# Path to save image locally
FILE = 'img.jpg'
# Use GPIO pin numbers
GPIO.setmode(GPIO.BCM)
# Disable "Ports already in use" warning
GPIO.setwar... |
8e5ad2138d0685e4322156b3f545be46a3f0c99f | util.py | util.py | #!/usr/bin/env python
import glob
import os.path
import random
def pick_random(directory, k=None):
"""Pick randomly some files from a directory."""
all_files = glob.glob(os.path.join(directory, '*'))
random.shuffle(all_files)
return all_files if k is None else all_files[:k]
| #!/usr/bin/env python
import glob
import os.path
import random
import re
def pick(directory, k=None, randomized=True):
"""Pick some thread files from a thread directory."""
all_files = glob.glob(os.path.join(directory, '*'))
if randomized:
random.shuffle(all_files)
else:
pattern = '([... | Modify to pick either randomly or sequentially | Modify to pick either randomly or sequentially
| Python | mit | kemskems/otdet | #!/usr/bin/env python
import glob
import os.path
import random
def pick_random(directory, k=None):
"""Pick randomly some files from a directory."""
all_files = glob.glob(os.path.join(directory, '*'))
random.shuffle(all_files)
return all_files if k is None else all_files[:k]
Modify to pick either rand... | #!/usr/bin/env python
import glob
import os.path
import random
import re
def pick(directory, k=None, randomized=True):
"""Pick some thread files from a thread directory."""
all_files = glob.glob(os.path.join(directory, '*'))
if randomized:
random.shuffle(all_files)
else:
pattern = '([... | <commit_before>#!/usr/bin/env python
import glob
import os.path
import random
def pick_random(directory, k=None):
"""Pick randomly some files from a directory."""
all_files = glob.glob(os.path.join(directory, '*'))
random.shuffle(all_files)
return all_files if k is None else all_files[:k]
<commit_msg... | #!/usr/bin/env python
import glob
import os.path
import random
import re
def pick(directory, k=None, randomized=True):
"""Pick some thread files from a thread directory."""
all_files = glob.glob(os.path.join(directory, '*'))
if randomized:
random.shuffle(all_files)
else:
pattern = '([... | #!/usr/bin/env python
import glob
import os.path
import random
def pick_random(directory, k=None):
"""Pick randomly some files from a directory."""
all_files = glob.glob(os.path.join(directory, '*'))
random.shuffle(all_files)
return all_files if k is None else all_files[:k]
Modify to pick either rand... | <commit_before>#!/usr/bin/env python
import glob
import os.path
import random
def pick_random(directory, k=None):
"""Pick randomly some files from a directory."""
all_files = glob.glob(os.path.join(directory, '*'))
random.shuffle(all_files)
return all_files if k is None else all_files[:k]
<commit_msg... |
1502fe9bfe428207706c2b8b684b36af884b74db | modules/development/superuser.py | modules/development/superuser.py | from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command(usage='<path1> <path2>')
@confirm.instance_owner()
async def coreswap(self, ctx):
"""Command to swap your core module.
... | from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command()
@confirm.instance_owner()
async def coreswap(self, ctx, *, path1, path2):
"""Command to swap your core module.
... | Add kwargs to this to make Jenkins shut up about it | Add kwargs to this to make Jenkins shut up about it | Python | mit | HexadecimalPython/Xeili,awau/Amethyst | from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command(usage='<path1> <path2>')
@confirm.instance_owner()
async def coreswap(self, ctx):
"""Command to swap your core module.
... | from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command()
@confirm.instance_owner()
async def coreswap(self, ctx, *, path1, path2):
"""Command to swap your core module.
... | <commit_before>from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command(usage='<path1> <path2>')
@confirm.instance_owner()
async def coreswap(self, ctx):
"""Command to swap your c... | from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command()
@confirm.instance_owner()
async def coreswap(self, ctx, *, path1, path2):
"""Command to swap your core module.
... | from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command(usage='<path1> <path2>')
@confirm.instance_owner()
async def coreswap(self, ctx):
"""Command to swap your core module.
... | <commit_before>from utils.command_system import command
from utils import confirm
import discord
class SuperUser:
def __init__(self, amethyst):
self.amethyst = amethyst
@command(usage='<path1> <path2>')
@confirm.instance_owner()
async def coreswap(self, ctx):
"""Command to swap your c... |
0da7e65a5def18ae6f2562b7e30d710b4a71de1a | repl.py | repl.py | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, par... | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, par... | Reduce print statement console clustering | Reduce print statement console clustering
| Python | mit | lnsp/tea,lnsp/tea | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, par... | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, par... | <commit_before>#!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by ... | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, par... | #!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by tokenizing, par... | <commit_before>#!/usr/bin/python3
"""Command line runtime for Tea."""
import runtime.lib
from runtime import lexer, parser, env
TEA_VERSION = "0.0.5-dev"
TEA_TITLE = "Tea @" + TEA_VERSION
CLI_SYMBOL = "#> "
CLI_SPACE = " " * 3
CLI_RESULT = "<- "
def interpret(expression, context):
"""Interpret an expression by ... |
90db6286cdfb493de5dc944783aa65b4fbce38b8 | ghettoq/backends/pyredis.py | ghettoq/backends/pyredis.py | from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
class RedisBackend(BaseBackend):
def establish_connection(self):
return Redis(host=self.host, port=self.port, db=self.database,
password=self.password)
def put(self, queue, message):
self.clie... | from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
DEFAULT_PORT = 6379
class RedisBackend(BaseBackend):
def establish_connection(self):
self.port = self.port or DEFAULT_PORT
return Redis(host=self.host, port=self.port, db=self.database,
password=s... | Use rpop/rpush instead of deprecated pop/push (conforming to redis 1.x) | Use rpop/rpush instead of deprecated pop/push (conforming to redis 1.x)
| Python | bsd-3-clause | ask/ghettoq | from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
class RedisBackend(BaseBackend):
def establish_connection(self):
return Redis(host=self.host, port=self.port, db=self.database,
password=self.password)
def put(self, queue, message):
self.clie... | from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
DEFAULT_PORT = 6379
class RedisBackend(BaseBackend):
def establish_connection(self):
self.port = self.port or DEFAULT_PORT
return Redis(host=self.host, port=self.port, db=self.database,
password=s... | <commit_before>from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
class RedisBackend(BaseBackend):
def establish_connection(self):
return Redis(host=self.host, port=self.port, db=self.database,
password=self.password)
def put(self, queue, message):
... | from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
DEFAULT_PORT = 6379
class RedisBackend(BaseBackend):
def establish_connection(self):
self.port = self.port or DEFAULT_PORT
return Redis(host=self.host, port=self.port, db=self.database,
password=s... | from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
class RedisBackend(BaseBackend):
def establish_connection(self):
return Redis(host=self.host, port=self.port, db=self.database,
password=self.password)
def put(self, queue, message):
self.clie... | <commit_before>from redis import Redis as Redis
from ghettoq.backends.base import BaseBackend
class RedisBackend(BaseBackend):
def establish_connection(self):
return Redis(host=self.host, port=self.port, db=self.database,
password=self.password)
def put(self, queue, message):
... |
02668b8dfda3c00f4ae74846d7c14c5dde64e17c | asciitree/__init__.py | asciitree/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def ascii_tree(node,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return _draw_tree(get_root(node), '', get_node_childre... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def left_aligned(tree,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return '\n'.join(_left_aligned(get_root(tree),... | Remove now obsolete ascii_tree function. | Remove now obsolete ascii_tree function.
| Python | mit | mbr/asciitree | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def ascii_tree(node,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return _draw_tree(get_root(node), '', get_node_childre... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def left_aligned(tree,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return '\n'.join(_left_aligned(get_root(tree),... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def ascii_tree(node,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return _draw_tree(get_root(node), '', g... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def left_aligned(tree,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return '\n'.join(_left_aligned(get_root(tree),... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def ascii_tree(node,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return _draw_tree(get_root(node), '', get_node_childre... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from legacy import draw_tree, _draw_tree
def ascii_tree(node,
get_node_children=lambda t: t[1].items(),
get_node_text=lambda t: t[0],
get_root=lambda d: d.items()[0]):
return _draw_tree(get_root(node), '', g... |
77579ff7d7a63539d350c40d49eedeb21e61bd61 | acute/schema.py | acute/schema.py | """
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.PastMedicalHistory,
models.Diagnosis,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking,
models.Pa... | """
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.Diagnosis,
models.PastMedicalHistory,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking,
models.Di... | Make Diagnosis come before PMH | Make Diagnosis come before PMH
closes #5
| Python | agpl-3.0 | openhealthcare/acute,openhealthcare/acute,openhealthcare/acute | """
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.PastMedicalHistory,
models.Diagnosis,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking,
models.Pa... | """
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.Diagnosis,
models.PastMedicalHistory,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking,
models.Di... | <commit_before>"""
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.PastMedicalHistory,
models.Diagnosis,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking... | """
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.Diagnosis,
models.PastMedicalHistory,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking,
models.Di... | """
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.PastMedicalHistory,
models.Diagnosis,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking,
models.Pa... | <commit_before>"""
Define acute schemas.
"""
from acute import models
list_columns = [
models.Demographics,
models.Location,
models.PastMedicalHistory,
models.Diagnosis,
models.Plan,
models.Rescuscitation
]
list_columns_take = [
models.Demographics,
models.Location,
models.Clerking... |
f7788bf9cb2d8d762689a24b63aaeaec3f076d72 | app/__init__.py | app/__init__.py | from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsear... | from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsear... | Validate TLS certificate for connections to Elastsearch | Validate TLS certificate for connections to Elastsearch
By default Python elasticsearch client 1.x sets verify_certs to
False, which means it doesn't verify TLS certificates when connecting
to Elasticsearch over HTTPS and urllib3 prints an InsecureRequestWarning
on each request.
Setting `verify_certs=True` explicitly... | Python | mit | alphagov/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api | from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsear... | from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsear... | <commit_before>from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = F... | from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsear... | from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsear... | <commit_before>from flask import Flask
from config import config as configs
from flask.ext.bootstrap import Bootstrap
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
bootstrap = Bootstrap()
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = F... |
f196171b15c137352a628cf9690b3bf9f8590ca7 | author/forms.py | author/forms.py | from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug']
| from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug', 'bio']
| Exclude the proxy bio field. | Exclude the proxy bio field.
| Python | bsd-3-clause | PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari | from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug']
Exclude the proxy bio field. | from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug', 'bio']
| <commit_before>from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug']
<commit_msg>Exclude the proxy ... | from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug', 'bio']
| from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug']
Exclude the proxy bio field.from django impor... | <commit_before>from django import forms
from wagtail.wagtailimages.widgets import AdminImageChooser
from .models import Author
class AuthorAdminForm(forms.ModelForm):
class Meta:
model = Author
# TODO: Ability to add author image
exclude = ['image', 'slug']
<commit_msg>Exclude the proxy ... |
399b7b03e29364beeb7abe3926deb42b99f34047 | prawcore/requestor.py | prawcore/requestor.py | """Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-agent for your ap... | """Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-agent for your ap... | Add missing 'h' in https in Requestor doc. | Add missing 'h' in https in Requestor doc.
| Python | bsd-2-clause | praw-dev/prawcore | """Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-agent for your ap... | """Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-agent for your ap... | <commit_before>"""Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-ag... | """Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-agent for your ap... | """Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-agent for your ap... | <commit_before>"""Provides the HTTP request handling interface."""
import requests
from . import const
class Requestor(object):
"""Requestor provides an interface to HTTP requests."""
def __init__(self, user_agent):
"""Create an instance of the Requestor class.
:param user_agent: The user-ag... |
2ad2d488b4d7b0997355c068646a6a38b2668dae | meetuppizza/tests.py | meetuppizza/tests.py | from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
| from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
def test_page_contains_pizza(self):
response = self.client.get('/')
self.assertContains(response, "Pizza")
| Add test that checks if landing page contains the word Pizza. | Add test that checks if landing page contains the word Pizza.
| Python | mit | nicole-a-tesla/meetup.pizza,nicole-a-tesla/meetup.pizza | from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
Add test that checks if landing page contains the word Pizza. | from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
def test_page_contains_pizza(self):
response = self.client.get('/')
self.assertContains(response, "Pizza")
| <commit_before>from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
<commit_msg>Add test that checks if landing page contains the word Pizza.<commit_after> | from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
def test_page_contains_pizza(self):
response = self.client.get('/')
self.assertContains(response, "Pizza")
| from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
Add test that checks if landing page contains the word Pizza.from django.test import TestCase
class Test(TestCase):
def test_landing_page... | <commit_before>from django.test import TestCase
class Test(TestCase):
def test_landing_page_is_there(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
<commit_msg>Add test that checks if landing page contains the word Pizza.<commit_after>from django.test import TestCase
clas... |
94cd92d7afc39e832fb1d0d570ae007a9e4dab21 | setup.py | setup.py | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI for ILAMB',
... | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI for ILAMB',
... | Install run_ilamb.sh to Python distro bin directory | Install run_ilamb.sh to Python distro bin directory
| Python | mit | permamodel/ILAMB,permamodel/ILAMB,permamodel/ILAMB | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI for ILAMB',
... | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI for ILAMB',
... | <commit_before>#! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI fo... | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI for ILAMB',
... | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI for ILAMB',
... | <commit_before>#! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='[email protected]',
description='Python BMI fo... |
4607a2f5575a42c8e12da7dbc9a1e8ae27398fef | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_packages(),
... | from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_packages(),
... | Install luigi-wrapper and submit-experiment-from-gsheet scripts | Install luigi-wrapper and submit-experiment-from-gsheet scripts
| Python | unlicense | ppavlidis/rnaseq-pipeline,ppavlidis/rnaseq-pipeline,ppavlidis/rnaseq-pipeline | from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_packages(),
... | from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_packages(),
... | <commit_before>from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_pa... | from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_packages(),
... | from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_packages(),
... | <commit_before>from setuptools import setup, find_packages
setup(name='rnaseq_pipeline',
version='2.0.0',
description='RNA-Seq pipeline for the Pavlidis Lab',
long_description='file: README.md',
author='Guillaume Poirier-Morency',
author_email='[email protected]',
packages=find_pa... |
f32c62c63a3339ef7351c54009eb515973747dd1 | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
description="An extensio... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
description="An extensio... | Allow higher versions of Oscar | Allow higher versions of Oscar
| Python | bsd-3-clause | django-oscar/django-oscar-stores,django-oscar/django-oscar-stores,django-oscar/django-oscar-stores | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
description="An extensio... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
description="An extensio... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
descripti... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
description="An extensio... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
description="An extensio... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup, find_packages
setup(
name='django-oscar-stores',
version="0.5-dev",
url='https://github.com/tangentlabs/django-oscar-stores',
author="Sebastian Vetter",
author_email="[email protected]",
descripti... |
ec3f3187aef144dc4402646eaef64f9f41c7df0a | setup.py | setup.py | import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
long... | import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
long... | Set cov-core dependency to 1.11 | Set cov-core dependency to 1.11
| Python | mit | pytest-dev/pytest-cov,moreati/pytest-cov,ionelmc/pytest-cover,wushaobo/pytest-cov,schlamar/pytest-cov,opoplawski/pytest-cov | import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
long... | import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
long... | <commit_before>import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
... | import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
long... | import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
long... | <commit_before>import setuptools
setuptools.setup(name='pytest-cov',
version='1.6',
description='py.test plugin for coverage reporting with '
'support for both centralised and distributed testing, '
'including subprocesses and multiprocessing',
... |
5c1adfbb6cbd18253d7c846be5639c4e60087125 | setup.py | setup.py | import sys
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
from circle_asset.version import VERSION, SHORT_DESCRIPTION
setup(name='circle-asset',... | import sys
import re
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
description = re.sub(r'\[!\[.+\].+\]\(.+\)', '', description)
descript... | Clean up the description for PyPI | Clean up the description for PyPI
| Python | mit | prophile/circle-asset | import sys
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
from circle_asset.version import VERSION, SHORT_DESCRIPTION
setup(name='circle-asset',... | import sys
import re
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
description = re.sub(r'\[!\[.+\].+\]\(.+\)', '', description)
descript... | <commit_before>import sys
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
from circle_asset.version import VERSION, SHORT_DESCRIPTION
setup(name=... | import sys
import re
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
description = re.sub(r'\[!\[.+\].+\]\(.+\)', '', description)
descript... | import sys
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
from circle_asset.version import VERSION, SHORT_DESCRIPTION
setup(name='circle-asset',... | <commit_before>import sys
if sys.version < '3.4':
print('Sorry, this is not a compatible version of Python. Use 3.4 or later.')
exit(1)
from setuptools import setup, find_packages
with open('README.md') as f:
description = f.read()
from circle_asset.version import VERSION, SHORT_DESCRIPTION
setup(name=... |
190a5eb43138850f7d8bb3cd959f02c4cd8cea25 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/TkTech/Jawa",
... | #!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/TkTech/Jawa",
... | Add missing ghp-import requirement as an extra dev dependency. | Add missing ghp-import requirement as an extra dev dependency.
| Python | mit | TkTech/Jawa,TkTech/Jawa | #!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/TkTech/Jawa",
... | #!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/TkTech/Jawa",
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/... | #!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/TkTech/Jawa",
... | #!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/TkTech/Jawa",
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup, find_packages
setup(
name="jawa",
packages=find_packages(),
version="1.0",
description="Doing fun stuff with JVM ClassFiles.",
author="Tyler Kennedy",
author_email="[email protected]",
url="http://github.com/... |
aa4c539c36d56e6f7bb87d312191e3788f363b52 | setup.py | setup.py | from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy==1.15.4', # FIXME: temporary because of bug in num... | from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy>=1.15.0',
'pyqt5>=5.10.1'
]
)
| Remove exact numpy version requirement | Remove exact numpy version requirement
| Python | apache-2.0 | maximecb/gym-minigrid | from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy==1.15.4', # FIXME: temporary because of bug in num... | from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy>=1.15.0',
'pyqt5>=5.10.1'
]
)
| <commit_before>from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy==1.15.4', # FIXME: temporary becaus... | from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy>=1.15.0',
'pyqt5>=5.10.1'
]
)
| from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy==1.15.4', # FIXME: temporary because of bug in num... | <commit_before>from setuptools import setup
setup(
name='gym_minigrid',
version='0.0.1',
keywords='memory, environment, agent, rl, openaigym, openai-gym, gym',
packages=['gym_minigrid', 'gym_minigrid.envs'],
install_requires=[
'gym>=0.9.6',
'numpy==1.15.4', # FIXME: temporary becaus... |
e654cea816be8c4a79da66efbc50a5698a51ba5b | plantcv/plantcv/print_results.py | plantcv/plantcv/print_results.py | # Print Numerical Data
import json
import os
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
if os.path.isfile(filename):
with open(filename, 'r') as f:
hierarchical... | # Print Numerical Data
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
print("""Deprecation warning: plantcv.print_results will be removed in a future version.
Please use pl... | Add deprecation warning and use new method | Add deprecation warning and use new method
| Python | mit | stiphyMT/plantcv,danforthcenter/plantcv,danforthcenter/plantcv,stiphyMT/plantcv,stiphyMT/plantcv,danforthcenter/plantcv | # Print Numerical Data
import json
import os
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
if os.path.isfile(filename):
with open(filename, 'r') as f:
hierarchical... | # Print Numerical Data
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
print("""Deprecation warning: plantcv.print_results will be removed in a future version.
Please use pl... | <commit_before># Print Numerical Data
import json
import os
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
if os.path.isfile(filename):
with open(filename, 'r') as f:
... | # Print Numerical Data
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
print("""Deprecation warning: plantcv.print_results will be removed in a future version.
Please use pl... | # Print Numerical Data
import json
import os
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
if os.path.isfile(filename):
with open(filename, 'r') as f:
hierarchical... | <commit_before># Print Numerical Data
import json
import os
from plantcv.plantcv import outputs
def print_results(filename):
"""Print result table
Inputs:
filename = filename
:param filename: str
:return:
"""
if os.path.isfile(filename):
with open(filename, 'r') as f:
... |
90f5ae3d3089f622694169d3327d932a68d3019d | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
from fuzzywuzzy import __version__
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirn... | Use __version__ from fuzzywuzzy package | Use __version__ from fuzzywuzzy package | Python | mit | zhahaoyu/fuzzywuzzy,pombredanne/fuzzywuzzy,beni55/fuzzywuzzy,medecau/fuzzywuzzy,zhahaoyu/fuzzywuzzy,blakejennings/fuzzywuzzy,beni55/fuzzywuzzy,salilnavgire/fuzzywuzzy,jayhetee/fuzzywuzzy,shalecraig/fuzzywuzzy,jayhetee/fuzzywuzzy,aeeilllmrx/fuzzywuzzy,shalecraig/fuzzywuzzy,aeeilllmrx/fuzzywuzzy,pombredanne/fuzzywuzzy,bl... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
from fuzzywuzzy import __version__
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirn... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
from fuzzywuzzy import __version__
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirn... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
setup(
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 SeatGeek
# This file is part of fuzzywuzzy.
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname... |
ee1c890df7c2c86192b68bd442e41226f70a3850 | setup.py | setup.py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
match = version_re... | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
match = version_re... | Remove the obsolte comment, library is licensed under BSD. | Remove the obsolte comment, library is licensed under BSD.
| Python | bsd-3-clause | Liuftvafas/python-face-client,Kami/python-face-client | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
match = version_re... | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
match = version_re... | <commit_before># -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
mat... | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
match = version_re... | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
match = version_re... | <commit_before># -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import re
from distutils.core import setup
version_re = re.compile(
r'__version__ = (\(.*?\))')
cwd = os.path.dirname(os.path.abspath(__file__))
fp = open(os.path.join(cwd, 'face_client', '__init__.py'))
version = None
for line in fp:
mat... |
421c28b295b59583eaad1d58de84a6350b883e2c | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of the database",
... | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of the database",
... | Add pytz as a dependency | Add pytz as a dependency
| Python | bsd-3-clause | thenewguy/django-modelcluster,torchbox/django-modelcluster,wagtail/django-modelcluster,theju/django-modelcluster | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of the database",
... | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of the database",
... | <commit_before>#!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of t... | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of the database",
... | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of the database",
... | <commit_before>#!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
setup(
name='django-modelcluster',
version='0.5',
description="Django extension to allow working with 'clusters' of models as a single unit, independently of t... |
673c88a6ca2eb9917f8e006fa334171ec2f202d2 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library that provides ... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library that provides ... | Add compatibility with Tornado 4.3 | Add compatibility with Tornado 4.3
| Python | mit | globocom/tornado-es,scorphus/tornado-es,scorphus/tornado-es,globocom/tornado-es | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library that provides ... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library that provides ... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library that provides ... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library that provides ... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
VERSION = '2.4.1'
setup(
name='tornadoes',
version=VERSION,
description="A tornado-powered python library that provides asynchronous access to elasticsearch.",
long_description="""\
A tornado-powered python library... |
480095562716bff8efaf3d01fa5b993f84965b63 | setup.py | setup.py | # coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
| # coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['mypy', 'pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
| Add mypy to the development dependencies. | Add mypy to the development dependencies.
The code type-checks clean and this will allow keeping it so.
| Python | lgpl-2.1 | rosjat/python-scsi | # coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
Add mypy to the development dependencies.
The code type-checks cle... | # coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['mypy', 'pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
| <commit_before># coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
<commit_msg>Add mypy to the development dependencies... | # coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['mypy', 'pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
| # coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
Add mypy to the development dependencies.
The code type-checks cle... | <commit_before># coding: utf-8
from setuptools import find_packages, setup
setup(
packages=find_packages(),
python_requires='~=3.7',
extras_require={
'dev': ['pytest'],
'iscsi': ['cython-iscsi'],
'sgio': ['cython-sgio'],
},
)
<commit_msg>Add mypy to the development dependencies... |
935657aa643de17c04ea15ddb8af9aee27a05516 | setup.py | setup.py | """Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
NOW = datetime.now().strftime("%m/%d/%Y%H%M%S")
VERSION = f"1.0.0-dev{NOW}"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"htt... | """Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
VERSION = "1.0.0"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"https://github.com/{GITHUB_PATH}"
DOWNLOAD_URL = f"{GITHUB_UR... | Set the final version number | Set the final version number
| Python | mit | rfverbruggen/rachiopy | """Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
NOW = datetime.now().strftime("%m/%d/%Y%H%M%S")
VERSION = f"1.0.0-dev{NOW}"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"htt... | """Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
VERSION = "1.0.0"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"https://github.com/{GITHUB_PATH}"
DOWNLOAD_URL = f"{GITHUB_UR... | <commit_before>"""Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
NOW = datetime.now().strftime("%m/%d/%Y%H%M%S")
VERSION = f"1.0.0-dev{NOW}"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GIT... | """Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
VERSION = "1.0.0"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"https://github.com/{GITHUB_PATH}"
DOWNLOAD_URL = f"{GITHUB_UR... | """Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
NOW = datetime.now().strftime("%m/%d/%Y%H%M%S")
VERSION = f"1.0.0-dev{NOW}"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GITHUB_URL = f"htt... | <commit_before>"""Rachiopy setup script."""
from setuptools import find_packages, setup
from datetime import datetime
NOW = datetime.now().strftime("%m/%d/%Y%H%M%S")
VERSION = f"1.0.0-dev{NOW}"
GITHUB_USERNAME = "rfverbruggen"
GITHUB_REPOSITORY = "rachiopy"
GITHUB_PATH = f"{GITHUB_USERNAME}/{GITHUB_REPOSITORY}"
GIT... |
e9b0a37ff5233dba3962aebfb1d28d78d4aa49ab | setup.py | setup.py | from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars', 'calexicon.d... | from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars', 'calexicon.i... | Revert "We shouldnt need to export calexicon.internal." | Revert "We shouldnt need to export calexicon.internal."
This reverts commit 4b63ae5469b5b1785ce4a6dbbcef4c4ff6505b0b.
We do need to export this package to call it internally.
| Python | apache-2.0 | jwg4/qual,jwg4/calexicon | from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars', 'calexicon.d... | from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars', 'calexicon.i... | <commit_before>from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars... | from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars', 'calexicon.i... | from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars', 'calexicon.d... | <commit_before>from setuptools import setup
setup(
name='calexicon',
version='0.1',
description='Calendar stuff',
url='http://github.com/jwg4/calexicon',
author='Jack Grahl',
author_email='[email protected]',
license='Apache License 2.0',
packages=['calexicon', 'calexicon.calendars... |
cb0a784f031383d23c1fffc318a6145d9d848a47 | setup.py | setup.py | from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
include_package_data=T... | from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
package_data={
'a... | Include JSON config files when installing | Include JSON config files when installing
| Python | mit | gillesB/azulejo,neingeist/azulejo,neingeist/azulejo,gillesB/azulejo | from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
include_package_data=T... | from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
package_data={
'a... | <commit_before>from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
include... | from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
package_data={
'a... | from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
include_package_data=T... | <commit_before>from setuptools import setup
#see http://pypi.python.org/pypi/stdeb for package building instructions
#or else here: https://github.com/astraw/stdeb
setup(name='azulejo',
version='0.1',
author='Pedro',
author_email='[email protected]',
packages=['azulejo'],
include... |
6311df0e55fe234c39cecf6112091e65c1baf52b | tnrs.py | tnrs.py | import sys
import caching
import urllib
import urllib2
import re
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identified,
return... | import sys
import caching
import urllib
import urllib2
import re
import json
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identified,... | Use json library instead of eval. | Use json library instead of eval.
| Python | mit | bendmorris/tax_resolve | import sys
import caching
import urllib
import urllib2
import re
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identified,
return... | import sys
import caching
import urllib
import urllib2
import re
import json
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identified,... | <commit_before>import sys
import caching
import urllib
import urllib2
import re
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identifi... | import sys
import caching
import urllib
import urllib2
import re
import json
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identified,... | import sys
import caching
import urllib
import urllib2
import re
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identified,
return... | <commit_before>import sys
import caching
import urllib
import urllib2
import re
from pyquery import PyQuery as p
try: cache = caching.get_cache('tnrs')
except: cache = {}
def tnrs_lookup(name, TIMEOUT=10, CACHE=True):
'''
Look up "name" on the TNRS web service. If a most likely standard name can be identifi... |
4a4eca6fb920d7ba50e97a5bcb0ae8161715ff7a | citenet/neighborrank.py | citenet/neighborrank.py | import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest indegree (most often cited).
nodes = util.top_n_from_dict(graph.in_degree(), n=n)
... | import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest outdegree (most often cited).
nodes = util.top_n_from_dict(graph.out_degree(), n=n)
... | Switch in/out degree for neighbor rank | Switch in/out degree for neighbor rank
Edges point in the direction of time, or influence. That means we're
concerned with outdegree (amount of nodes influenced by the current
node), not indegree (amount of nodes that influence the current node).
| Python | mit | Pringley/citenet | import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest indegree (most often cited).
nodes = util.top_n_from_dict(graph.in_degree(), n=n)
... | import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest outdegree (most often cited).
nodes = util.top_n_from_dict(graph.out_degree(), n=n)
... | <commit_before>import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest indegree (most often cited).
nodes = util.top_n_from_dict(graph.in_de... | import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest outdegree (most often cited).
nodes = util.top_n_from_dict(graph.out_degree(), n=n)
... | import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest indegree (most often cited).
nodes = util.top_n_from_dict(graph.in_degree(), n=n)
... | <commit_before>import networkx as nx
import util
def neighborrank(graph, n=100, neighborhood_depth=2):
"""Compute the NeighborRank of the top n nodes in graph, using the
specified neighborhood_depth."""
# Get top n nodes with highest indegree (most often cited).
nodes = util.top_n_from_dict(graph.in_de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.