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
4d3d00559dbb3a5aed2b58053f0d7471ef538a1c
src/python/condor/examples/squares.py
src/python/condor/examples/squares.py
import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def finished(task, result): print task.args, result condor.do(jobs, 4, finished) if __name__ == "__main__": condor.enable_default_logging() # XXX main()
import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def done(task, result): print task.args, result condor.do(jobs, 4, done) if __name__ == "__main__": main()
Remove logging setup from example.
Remove logging setup from example.
Python
mit
borg-project/utcondor,borg-project/utcondor
import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def finished(task, result): print task.args, result condor.do(jobs, 4, finished) if __name__ == "__main__": condor.enable_default_logging() # XXX main() Remove logging setup from example...
import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def done(task, result): print task.args, result condor.do(jobs, 4, done) if __name__ == "__main__": main()
<commit_before>import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def finished(task, result): print task.args, result condor.do(jobs, 4, finished) if __name__ == "__main__": condor.enable_default_logging() # XXX main() <commit_msg>Remove...
import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def done(task, result): print task.args, result condor.do(jobs, 4, done) if __name__ == "__main__": main()
import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def finished(task, result): print task.args, result condor.do(jobs, 4, finished) if __name__ == "__main__": condor.enable_default_logging() # XXX main() Remove logging setup from example...
<commit_before>import condor def square(x): return x**2 def main(): jobs = [(square, [x]) for x in range(16)] def finished(task, result): print task.args, result condor.do(jobs, 4, finished) if __name__ == "__main__": condor.enable_default_logging() # XXX main() <commit_msg>Remove...
be17c81115549f0f7ec69b0cf023165d88fea6d4
sql/tests/__init__.py
sql/tests/__init__.py
#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) def test_suite(): suite = additional_tests() loader = unittest.Tes...
#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) readme = os.path.normpath(os.path.join(here, '..', '..', 'README')) def te...
Add README to test suite
Add README to test suite
Python
bsd-3-clause
vmuriart/python-sql
#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) def test_suite(): suite = additional_tests() loader = unittest.Tes...
#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) readme = os.path.normpath(os.path.join(here, '..', '..', 'README')) def te...
<commit_before>#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) def test_suite(): suite = additional_tests() loader...
#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) readme = os.path.normpath(os.path.join(here, '..', '..', 'README')) def te...
#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) def test_suite(): suite = additional_tests() loader = unittest.Tes...
<commit_before>#This file is part of python-sql. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys import os import unittest import doctest import sql here = os.path.dirname(__file__) def test_suite(): suite = additional_tests() loader...
ee726835fd0431f211b7c3f298568e56065a2951
provider/constants.py
provider/constants.py
from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "token")) READ =...
from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "token")) READ =...
Change 'read-write' scope to 'read+write'.
Change 'read-write' scope to 'read+write'.
Python
mit
archen/django-oauth2-provider,sprintly/django-oauth2-provider,ifanrx/django-oauth2-provider,ifanrx/django-oauth2-provider,aschem/django-oauth2-provider,opbeat/django-oauth2-provider,epyx-src/django-oauth2-provider,ministryofjustice/django-oauth2-provider,glassfordm/django-oauth2-provider,bleib1dj/django-oauth2-provider...
from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "token")) READ =...
from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "token")) READ =...
<commit_before>from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "t...
from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "token")) READ =...
from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "token")) READ =...
<commit_before>from datetime import timedelta from django.conf import settings CONFIDENTIAL = 0 PUBLIC = 1 CLIENT_TYPES = ( (CONFIDENTIAL, "Confidential (Web applications)"), (PUBLIC, "Public (Native and JS applications)") ) RESPONSE_TYPE_CHOICES = getattr(settings, 'OAUTH_RESPONSE_TYPE_CHOICES', ("code", "t...
185e8db639f7f74702f9d741f7c01eeebce73d50
comics/aggregator/feedparser.py
comics/aggregator/feedparser.py
from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): return [Entry(e)...
from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): return [Entry(e)...
Replace inner function with lambda in FeedParser.has_tag()
Replace inner function with lambda in FeedParser.has_tag()
Python
agpl-3.0
datagutten/comics,klette/comics,jodal/comics,datagutten/comics,datagutten/comics,jodal/comics,klette/comics,klette/comics,jodal/comics,datagutten/comics,jodal/comics
from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): return [Entry(e)...
from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): return [Entry(e)...
<commit_before>from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): r...
from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): return [Entry(e)...
from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): return [Entry(e)...
<commit_before>from __future__ import absolute_import import datetime as dt import feedparser from types import StringTypes from comics.aggregator.lxmlparser import LxmlParser class FeedParser(object): def __init__(self, url): self.raw_feed = feedparser.parse(url) def for_date(self, date): r...
bdec8d649863d09e04f763038dde0230c715abfe
bot/action/core/command/usagemessage.py
bot/action/core/command/usagemessage.py
from bot.action.util.textformat import FormattedText class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedText().bold("Usage").newline() if type(args) is list: text.concat(FormattedText().newline().join((cls....
from bot.action.util.textformat import FormattedText, FormattedTextFactory class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedTextFactory.get_new_markdown().bold("Usage").newline() if type(args) is list: te...
Fix CommandUsageMessage to allow backward compatibility with already existing raw Markdown formatted text
Fix CommandUsageMessage to allow backward compatibility with already existing raw Markdown formatted text
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
from bot.action.util.textformat import FormattedText class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedText().bold("Usage").newline() if type(args) is list: text.concat(FormattedText().newline().join((cls....
from bot.action.util.textformat import FormattedText, FormattedTextFactory class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedTextFactory.get_new_markdown().bold("Usage").newline() if type(args) is list: te...
<commit_before>from bot.action.util.textformat import FormattedText class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedText().bold("Usage").newline() if type(args) is list: text.concat(FormattedText().newli...
from bot.action.util.textformat import FormattedText, FormattedTextFactory class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedTextFactory.get_new_markdown().bold("Usage").newline() if type(args) is list: te...
from bot.action.util.textformat import FormattedText class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedText().bold("Usage").newline() if type(args) is list: text.concat(FormattedText().newline().join((cls....
<commit_before>from bot.action.util.textformat import FormattedText class CommandUsageMessage: @classmethod def get_formatted_usage_text(cls, command, args=None, description=""): text = FormattedText().bold("Usage").newline() if type(args) is list: text.concat(FormattedText().newli...
bfe4d4e5c9952f8064789ebf48d0ed28bb27c152
vpython/gs_version.py
vpython/gs_version.py
from __future__ import print_function import os import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' glowscript_name = 'glow.2.1.min.js' this_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os....
from __future__ import print_function import os from glob import glob import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' this_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os.path.join(this_di...
Determine glowscript version from file name
Determine glowscript version from file name
Python
mit
BruceSherwood/vpython-jupyter,BruceSherwood/vpython-jupyter,mwcraig/vpython-jupyter,mwcraig/vpython-jupyter,mwcraig/vpython-jupyter,mwcraig/vpython-jupyter,BruceSherwood/vpython-jupyter,BruceSherwood/vpython-jupyter
from __future__ import print_function import os import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' glowscript_name = 'glow.2.1.min.js' this_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os....
from __future__ import print_function import os from glob import glob import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' this_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os.path.join(this_di...
<commit_before>from __future__ import print_function import os import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' glowscript_name = 'glow.2.1.min.js' this_dir = os.path.dirname(os.path.abspath(__file__)) ...
from __future__ import print_function import os from glob import glob import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' this_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os.path.join(this_di...
from __future__ import print_function import os import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' glowscript_name = 'glow.2.1.min.js' this_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os....
<commit_before>from __future__ import print_function import os import re def glowscript_version(): """ Extract the Glowscript version from the javascript in the data directory. """ data_name = 'data' glowscript_name = 'glow.2.1.min.js' this_dir = os.path.dirname(os.path.abspath(__file__)) ...
66c07964112aab37d56cf61e0a12c9ab3c9bd54e
wcontrol/src/forms.py
wcontrol/src/forms.py
from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators=[DataRequired(...
from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators=[DataRequired()])...
Modify to fit with PEP8 standard
Modify to fit with PEP8 standard
Python
mit
pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control
from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators=[DataRequired(...
from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators=[DataRequired()])...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators...
from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators=[DataRequired()])...
from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators=[DataRequired(...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField, IntegerField, DecimalField from wtforms.validators import DataRequired from app.models import User class EditForm(FlaskForm): nickname = StringField('nickname', validators=[DataRequired()]) name = StringField('name', validators...
216a9176ecf395a7461c6f8ec926d48fa1634bad
manager/__init__.py
manager/__init__.py
import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirname(__file__), 's...
import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirname(__file__), 's...
Change theme to sandstone (bootswatch)
Change theme to sandstone (bootswatch)
Python
mit
hreeder/ignition,hreeder/ignition,hreeder/ignition
import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirname(__file__), 's...
import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirname(__file__), 's...
<commit_before>import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirnam...
import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirname(__file__), 's...
import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirname(__file__), 's...
<commit_before>import os from flask import Flask from flask.ext.assets import Bundle, Environment app = Flask(__name__) # Load the app config app.config.from_object("config.Config") assets = Environment(app) assets.load_path = [ os.path.join(os.path.dirname(__file__), 'static'), os.path.join(os.path.dirnam...
244fc4729f67595393f51bc2020968b6666c0b6d
quickdial/gateaddr.py
quickdial/gateaddr.py
from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols excluding origi...
from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols excluding origi...
Fix out of bounds symbol generation
Fix out of bounds symbol generation
Python
mit
Nekroze/quickdial,Nekroze/quickdial
from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols excluding origi...
from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols excluding origi...
<commit_before>from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols ...
from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols excluding origi...
from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols excluding origi...
<commit_before>from random import randint from types import GeneratorType from nekrobox.docdecs import params from six.moves import range @params(origin=(int, "Final origin symbol, if None then random"), count=(int, "Number of addresses to generate"), length=(int, "Length of a gate address in symbols ...
8eaaab332616469bec567ad159b315cc0d1e35fc
vumi/persist/tests/test_fields.py
vumi/persist/tests/test_fields.py
# -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import Field, ValidationError, Integer, Unicode class TestInteger(TestCase): def test_unbounded(self): i = Integer() i.validate(5) i.validate(-3) sel...
# -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import ( ValidationError, Field, FieldDescriptor, Integer, Unicode, ForeignKey, ForeignKeyDescriptor) class TestBaseField(TestCase): def test_validate(self): f = Fie...
Add tests for the Field class.
Add tests for the Field class.
Python
bsd-3-clause
TouK/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix
# -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import Field, ValidationError, Integer, Unicode class TestInteger(TestCase): def test_unbounded(self): i = Integer() i.validate(5) i.validate(-3) sel...
# -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import ( ValidationError, Field, FieldDescriptor, Integer, Unicode, ForeignKey, ForeignKeyDescriptor) class TestBaseField(TestCase): def test_validate(self): f = Fie...
<commit_before># -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import Field, ValidationError, Integer, Unicode class TestInteger(TestCase): def test_unbounded(self): i = Integer() i.validate(5) i.validate(...
# -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import ( ValidationError, Field, FieldDescriptor, Integer, Unicode, ForeignKey, ForeignKeyDescriptor) class TestBaseField(TestCase): def test_validate(self): f = Fie...
# -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import Field, ValidationError, Integer, Unicode class TestInteger(TestCase): def test_unbounded(self): i = Integer() i.validate(5) i.validate(-3) sel...
<commit_before># -*- coding: utf-8 -*- """Tests for vumi.persist.fields.""" from twisted.trial.unittest import TestCase from vumi.persist.fields import Field, ValidationError, Integer, Unicode class TestInteger(TestCase): def test_unbounded(self): i = Integer() i.validate(5) i.validate(...
2d27e06d0f70921093b1a4629128ec456a47423d
euler/solutions/solution_19.py
euler/solutions/solution_19.py
"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, t...
"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, t...
Add solution for problem 19
Add solution for problem 19 Counting Sundays
Python
mit
rlucioni/project-euler
"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, t...
"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, t...
<commit_before>"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And o...
"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, t...
"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, t...
<commit_before>"""Counting Sundays You are given the following information, but you may prefer to do some research for yourself. - 1 Jan 1900 was a Monday. - Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And o...
43a92adea08017fa13bf191a628e0bfc7661bd3b
third_party/__init__.py
third_party/__init__.py
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__))
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.insert(1, os.path.dirname(__file__))
Insert third_party into the second slot of sys.path rather than the last slot
Insert third_party into the second slot of sys.path rather than the last slot
Python
apache-2.0
mirek2580/namebench
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) Insert third_party into the second slot of sys.path rather than the last slot
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.insert(1, os.path.dirname(__file__))
<commit_before>import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) <commit_msg>Insert third_party into the second slot of sys.path rather than the last slot<commit_after>
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.insert(1, os.path.dirname(__file__))
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) Insert third_party into the second slot of sys.path rather than the last slotimport os.path import sys # This bit of evil should inject third_party into the path for re...
<commit_before>import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) <commit_msg>Insert third_party into the second slot of sys.path rather than the last slot<commit_after>import os.path import sys # This bit of evil shoul...
8b30f787d3dabb9072ee0517cf0e5e92daa1038f
l10n_ch_dta_base_transaction_id/wizard/create_dta.py
l10n_ch_dta_base_transaction_id/wizard/create_dta.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
Fix TypeError: _set_bank_data() takes at least 7 arguments (7 given)
Fix TypeError: _set_bank_data() takes at least 7 arguments (7 given)
Python
agpl-3.0
open-net-sarl/l10n-switzerland,open-net-sarl/l10n-switzerland,BT-ojossen/l10n-switzerland,BT-ojossen/l10n-switzerland
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
18261acd87a2e9c6735d9081eff50e2a09277605
src/pyshark/config.py
src/pyshark/config.py
from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if Path.exists(fp_config_path): config_path = fp_config...
from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if fp_config_path.exists(): config_path = fp_config_pat...
Use `x_path.exists()` instead of `Path.exists(x)`.
Use `x_path.exists()` instead of `Path.exists(x)`.
Python
mit
KimiNewt/pyshark
from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if Path.exists(fp_config_path): config_path = fp_config...
from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if fp_config_path.exists(): config_path = fp_config_pat...
<commit_before>from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if Path.exists(fp_config_path): config_p...
from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if fp_config_path.exists(): config_path = fp_config_pat...
from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if Path.exists(fp_config_path): config_path = fp_config...
<commit_before>from pathlib import Path from configparser import ConfigParser import pyshark fp_config_path = Path.cwd() / 'config.ini' # get config from the current directory pyshark_config_path = Path(pyshark.__file__).parent / 'config.ini' def get_config(): if Path.exists(fp_config_path): config_p...
003f646722233c49f4fa7c5d8bb313ae956a2c2a
content/test/gpu/gpu_tests/memory_expectations.py
content/test/gpu/gpu_tests/memory_expectations.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leopard, snowleopar...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leopard, snowleopar...
Add a failure expectation to win memory.css3d test.
Add a failure expectation to win memory.css3d test. In tile manager we seem to reach the memory limit early (with the pending tree). However, when we activate our memory gets released and we start filling it up again with the now active tree tiles. The windows bot seems to catch the system at the moment when we're no...
Python
bsd-3-clause
dushu1203/chromium.src,jaruba/chromium.src,M4sse/chromium.src,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,axinging...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leopard, snowleopar...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leopard, snowleopar...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leop...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leopard, snowleopar...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leopard, snowleopar...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import test_expectations # Valid expectation conditions are: # # Operating systems: # win, xp, vista, win7, mac, leop...
cf8f3dc4d2cde04a1f822627db522c1b021c3359
dataset/__init__.py
dataset/__init__.py
# shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table', 'freeze', 'con...
import os # shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table', 'fre...
Allow to use `url` defined as env variable.
Allow to use `url` defined as env variable.
Python
mit
pudo/dataset,askebos/dataset,twds/dataset,vguzmanp/dataset,stefanw/dataset,saimn/dataset,reubano/dataset
# shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table', 'freeze', 'con...
import os # shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table', 'fre...
<commit_before># shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table',...
import os # shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table', 'fre...
# shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table', 'freeze', 'con...
<commit_before># shut up useless SA warning: import warnings warnings.filterwarnings( 'ignore', 'Unicode type received non-unicode bind param value.') from dataset.persistence.database import Database from dataset.persistence.table import Table from dataset.freeze.app import freeze __all__ = ['Database', 'Table',...
d5765d0d961aa32f783f6c2a61c86a6adf282b62
dipy/core/histeq.py
dipy/core/histeq.py
import numpy as np def histeq(im, num_bins=256): """ Performs an histogram equalization on ``img``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- im : ndarray Image on which to perform histogram equalizat...
import numpy as np def histeq(arr, num_bins=256): """ Performs an histogram equalization on ``arr``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- arr : ndarray Image on which to perform histogram equalizatio...
Fix comment format and input var name.
Fix comment format and input var name.
Python
bsd-3-clause
JohnGriffiths/dipy,demianw/dipy,oesteban/dipy,jyeatman/dipy,nilgoyyou/dipy,sinkpoint/dipy,matthieudumont/dipy,FrancoisRheaultUS/dipy,rfdougherty/dipy,mdesco/dipy,beni55/dipy,StongeEtienne/dipy,rfdougherty/dipy,samuelstjean/dipy,nilgoyyou/dipy,beni55/dipy,StongeEtienne/dipy,villalonreina/dipy,demianw/dipy,matthieudumont...
import numpy as np def histeq(im, num_bins=256): """ Performs an histogram equalization on ``img``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- im : ndarray Image on which to perform histogram equalizat...
import numpy as np def histeq(arr, num_bins=256): """ Performs an histogram equalization on ``arr``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- arr : ndarray Image on which to perform histogram equalizatio...
<commit_before>import numpy as np def histeq(im, num_bins=256): """ Performs an histogram equalization on ``img``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- im : ndarray Image on which to perform hist...
import numpy as np def histeq(arr, num_bins=256): """ Performs an histogram equalization on ``arr``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- arr : ndarray Image on which to perform histogram equalizatio...
import numpy as np def histeq(im, num_bins=256): """ Performs an histogram equalization on ``img``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- im : ndarray Image on which to perform histogram equalizat...
<commit_before>import numpy as np def histeq(im, num_bins=256): """ Performs an histogram equalization on ``img``. This was taken from: http://www.janeriksolem.net/2009/06/histogram-equalization-with-python-and.html Parameters ---------- im : ndarray Image on which to perform hist...
8a4165f2d7a252e6f3de3fd82b215e46d532a237
lms/djangoapps/grades/migrations/0005_multiple_course_flags.py
lms/djangoapps/grades/migrations/0005_multiple_course_flags.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] operations = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] operations = [ ...
Allow grades app to be zero-migrated
Allow grades app to be zero-migrated
Python
agpl-3.0
ahmedaljazzar/edx-platform,gymnasium/edx-platform,gsehub/edx-platform,jzoldak/edx-platform,pabloborrego93/edx-platform,fintech-circle/edx-platform,ESOedX/edx-platform,stvstnfrd/edx-platform,philanthropy-u/edx-platform,kmoocdev2/edx-platform,appsembler/edx-platform,amir-qayyum-khan/edx-platform,pepeportela/edx-platform,...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] operations = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] operations = [ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] operations = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] operations = [ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from openedx.core.djangoapps.xmodule_django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ ('grades', '0004_visibleblocks_course_id'), ] ...
d7b7f157fd5758c1de22810d871642768f4eac68
trunk/metpy/__init__.py
trunk/metpy/__init__.py
import bl import readers import vis import tools import constants from calc import * import version __version__ = version.get_version()
import bl import readers import vis import tools import constants #What do we want to pull into the top-level namespace from calc import * from readers.mesonet import * import version __version__ = version.get_version()
Add mesonet readers to top level namespace.
Add mesonet readers to top level namespace. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@150 150532fb-1d5b-0410-a8ab-efec50f980d4
Python
bsd-3-clause
dopplershift/MetPy,deeplycloudy/MetPy,dopplershift/MetPy,Unidata/MetPy,Unidata/MetPy,ahaberlie/MetPy,ahaberlie/MetPy,jrleeman/MetPy,jrleeman/MetPy,ShawnMurd/MetPy,ahill818/MetPy
import bl import readers import vis import tools import constants from calc import * import version __version__ = version.get_version() Add mesonet readers to top level namespace. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@150 150532fb-1d5b-0410-a8ab-efec50f980d4
import bl import readers import vis import tools import constants #What do we want to pull into the top-level namespace from calc import * from readers.mesonet import * import version __version__ = version.get_version()
<commit_before>import bl import readers import vis import tools import constants from calc import * import version __version__ = version.get_version() <commit_msg>Add mesonet readers to top level namespace. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@150 150532fb-1d5b-0410-a8ab-efec50f980d4<commit_after>
import bl import readers import vis import tools import constants #What do we want to pull into the top-level namespace from calc import * from readers.mesonet import * import version __version__ = version.get_version()
import bl import readers import vis import tools import constants from calc import * import version __version__ = version.get_version() Add mesonet readers to top level namespace. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@150 150532fb-1d5b-0410-a8ab-efec50f980d4import bl import readers import vis import to...
<commit_before>import bl import readers import vis import tools import constants from calc import * import version __version__ = version.get_version() <commit_msg>Add mesonet readers to top level namespace. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@150 150532fb-1d5b-0410-a8ab-efec50f980d4<commit_after>impo...
20c121d218de2663186f2e5898aa643194902829
thumbor/detectors/queued_detector/__init__.py
thumbor/detectors/queued_detector/__init__.py
from remotecv import pyres_tasks from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique(pyres_tasks.DetectTask...
from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique_from_string('remotecv.pyres_tasks.DetectTask', 'Detect'...
Remove dependency from remotecv worker on queued detector
Remove dependency from remotecv worker on queued detector
Python
mit
Jimdo/thumbor,abaldwin1/thumbor,okor/thumbor,voxmedia/thumbor,wking/thumbor,gi11es/thumbor,figarocms/thumbor,jdunaravich/thumbor,thumbor/thumbor,grevutiu-gabriel/thumbor,suwaji/thumbor,marcelometal/thumbor,2947721120/thumbor,food52/thumbor,thumbor/thumbor,kkopachev/thumbor,dhardy92/thumbor,davduran/thumbor,scorphus/thu...
from remotecv import pyres_tasks from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique(pyres_tasks.DetectTask...
from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique_from_string('remotecv.pyres_tasks.DetectTask', 'Detect'...
<commit_before>from remotecv import pyres_tasks from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique(pyres_t...
from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique_from_string('remotecv.pyres_tasks.DetectTask', 'Detect'...
from remotecv import pyres_tasks from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique(pyres_tasks.DetectTask...
<commit_before>from remotecv import pyres_tasks from remotecv.unique_queue import UniqueQueue from thumbor.detectors import BaseDetector class QueuedDetector(BaseDetector): queue = UniqueQueue() def detect(self, callback): engine = self.context.modules.engine self.queue.enqueue_unique(pyres_t...
f02ce3a2e94bc40cde87a39ba5b133599d729f9c
mpltools/widgets/__init__.py
mpltools/widgets/__init__.py
import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): branch = "<https://github.com/tonysyu/matplotlib/tree/base-widget>" msg = "mpltools.widgets requires a branch of Matplotlib: %s" % branch raise ImportError(msg) from .rectangle_selector import RectangleSelector from .slider imp...
import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): version = "(github master; after March 16, 2012)" msg = "mpltools.widgets requires recent version of Matplotlib %s" % version raise ImportError(msg) from .rectangle_selector import RectangleSelector from .slider import Slider ...
Update MPL version requirement for `widgets`.
Update MPL version requirement for `widgets`.
Python
bsd-3-clause
tonysyu/mpltools,matteoicardi/mpltools
import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): branch = "<https://github.com/tonysyu/matplotlib/tree/base-widget>" msg = "mpltools.widgets requires a branch of Matplotlib: %s" % branch raise ImportError(msg) from .rectangle_selector import RectangleSelector from .slider imp...
import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): version = "(github master; after March 16, 2012)" msg = "mpltools.widgets requires recent version of Matplotlib %s" % version raise ImportError(msg) from .rectangle_selector import RectangleSelector from .slider import Slider ...
<commit_before>import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): branch = "<https://github.com/tonysyu/matplotlib/tree/base-widget>" msg = "mpltools.widgets requires a branch of Matplotlib: %s" % branch raise ImportError(msg) from .rectangle_selector import RectangleSelector f...
import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): version = "(github master; after March 16, 2012)" msg = "mpltools.widgets requires recent version of Matplotlib %s" % version raise ImportError(msg) from .rectangle_selector import RectangleSelector from .slider import Slider ...
import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): branch = "<https://github.com/tonysyu/matplotlib/tree/base-widget>" msg = "mpltools.widgets requires a branch of Matplotlib: %s" % branch raise ImportError(msg) from .rectangle_selector import RectangleSelector from .slider imp...
<commit_before>import matplotlib.widgets as mwidgets if not hasattr(mwidgets, 'AxesWidget'): branch = "<https://github.com/tonysyu/matplotlib/tree/base-widget>" msg = "mpltools.widgets requires a branch of Matplotlib: %s" % branch raise ImportError(msg) from .rectangle_selector import RectangleSelector f...
7ddb5b9ab579c58fc1fc8be7760f7f0963d02c3a
CodeFights/chessBoardCellColor.py
CodeFights/chessBoardCellColor.py
#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): pass def main(): tests = [ ["A1", "C3", True], ["A1", "H3", False], ["A1", "A2", False], ["A1", "B2", True], ["B3", "H8", False], ["C3", "B5", False], ...
#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): ''' Determine if the two given cells on chess board are same color A, C, E, G odd cells are same color as B, D, F, H even cells ''' def get_color(cell): return ("DARK" if (cell[0] in...
Solve chess board cell color problem
Solve chess board cell color problem
Python
mit
HKuz/Test_Code
#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): pass def main(): tests = [ ["A1", "C3", True], ["A1", "H3", False], ["A1", "A2", False], ["A1", "B2", True], ["B3", "H8", False], ["C3", "B5", False], ...
#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): ''' Determine if the two given cells on chess board are same color A, C, E, G odd cells are same color as B, D, F, H even cells ''' def get_color(cell): return ("DARK" if (cell[0] in...
<commit_before>#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): pass def main(): tests = [ ["A1", "C3", True], ["A1", "H3", False], ["A1", "A2", False], ["A1", "B2", True], ["B3", "H8", False], ["C3", ...
#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): ''' Determine if the two given cells on chess board are same color A, C, E, G odd cells are same color as B, D, F, H even cells ''' def get_color(cell): return ("DARK" if (cell[0] in...
#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): pass def main(): tests = [ ["A1", "C3", True], ["A1", "H3", False], ["A1", "A2", False], ["A1", "B2", True], ["B3", "H8", False], ["C3", "B5", False], ...
<commit_before>#!/usr/local/bin/python # Code Fights Chess Board Cell Color Problem def chessBoardCellColor(cell1, cell2): pass def main(): tests = [ ["A1", "C3", True], ["A1", "H3", False], ["A1", "A2", False], ["A1", "B2", True], ["B3", "H8", False], ["C3", ...
f4c5bb0a77108f340533736c52f01c861146a6b6
byceps/util/money.py
byceps/util/money.py
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
Remove usage of `monetary` keyword argument again as it is not available on Python 3.6
Remove usage of `monetary` keyword argument again as it is not available on Python 3.6
Python
bsd-3-clause
m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
<commit_before>""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
<commit_before>""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual ...
58236d8bc6a23477d83c244fc117f493aa2651a6
thinglang/parser/tokens/arithmetic.py
thinglang/parser/tokens/arithmetic.py
from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": lambda rhs, lhs: ...
from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": lambda rhs, lhs: ...
Add replace method to Arithmetic operation
Add replace method to Arithmetic operation
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": lambda rhs, lhs: ...
from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": lambda rhs, lhs: ...
<commit_before>from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": la...
from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": lambda rhs, lhs: ...
from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": lambda rhs, lhs: ...
<commit_before>from thinglang.common import ObtainableValue from thinglang.parser.tokens import BaseToken class ArithmeticOperation(BaseToken, ObtainableValue): OPERATIONS = { "+": lambda rhs, lhs: rhs + lhs, "*": lambda rhs, lhs: rhs * lhs, "-": lambda rhs, lhs: rhs - lhs, "/": la...
bfafb5c3fd2de6f2a87439553b3a55465f07d24c
django_medusa/renderers/__init__.py
django_medusa/renderers/__init__.py
from django.conf import settings import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSiteRenderer', 'GAESta...
from django.conf import settings from django.utils import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSite...
Remove importlib dependency, add django's own importlib
Remove importlib dependency, add django's own importlib
Python
mit
alsoicode/django-medusa,mtigas/django-medusa,hyperair/django-medusa,botify-labs/django-medusa
from django.conf import settings import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSiteRenderer', 'GAESta...
from django.conf import settings from django.utils import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSite...
<commit_before>from django.conf import settings import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSiteRen...
from django.conf import settings from django.utils import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSite...
from django.conf import settings import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSiteRenderer', 'GAESta...
<commit_before>from django.conf import settings import importlib from .base import BaseStaticSiteRenderer from .disk import DiskStaticSiteRenderer from .appengine import GAEStaticSiteRenderer from .s3 import S3StaticSiteRenderer __all__ = ('BaseStaticSiteRenderer', 'DiskStaticSiteRenderer', 'S3StaticSiteRen...
c734fbbcb8680f704cfcc5b8ee605c4d0557526d
Brownian/view/utils/plugins.py
Brownian/view/utils/plugins.py
import subprocess import string class Plugin: def __init__(self, command, allowedChars): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = string.maketrans(allowedChars, " "*len(allowedChars)) self.comm...
import subprocess import string import shlex class Plugin: def __init__(self, command, allowedChars, insertInitialNewline=False): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = str(string.maketrans(allowedCh...
Use the Team Cymru whois server by default, make it easier to use complex commands, and optionally insert a new line before the output.
Use the Team Cymru whois server by default, make it easier to use complex commands, and optionally insert a new line before the output.
Python
bsd-2-clause
jpressnell/Brownian,grigorescu/Brownian,ruslux/Brownian,grigorescu/Brownian,grigorescu/Brownian,jpressnell/Brownian,jpressnell/Brownian,ruslux/Brownian,ruslux/Brownian
import subprocess import string class Plugin: def __init__(self, command, allowedChars): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = string.maketrans(allowedChars, " "*len(allowedChars)) self.comm...
import subprocess import string import shlex class Plugin: def __init__(self, command, allowedChars, insertInitialNewline=False): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = str(string.maketrans(allowedCh...
<commit_before>import subprocess import string class Plugin: def __init__(self, command, allowedChars): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = string.maketrans(allowedChars, " "*len(allowedChars)) ...
import subprocess import string import shlex class Plugin: def __init__(self, command, allowedChars, insertInitialNewline=False): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = str(string.maketrans(allowedCh...
import subprocess import string class Plugin: def __init__(self, command, allowedChars): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = string.maketrans(allowedChars, " "*len(allowedChars)) self.comm...
<commit_before>import subprocess import string class Plugin: def __init__(self, command, allowedChars): # We replace the characters we do allow with empty strings, to get a string of all the characters we don't allow. self.notAllowedCharMap = string.maketrans(allowedChars, " "*len(allowedChars)) ...
57444bdd253e428174c7a5475ef205063ac95ef3
lms/djangoapps/heartbeat/views.py
lms/djangoapps/heartbeat/views.py
import json from datetime import datetime from django.http import HttpResponse def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat() } return HttpResponse(json.dumps(output, indent=4))
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
Make heartbeat url wait for courses to be loaded
Make heartbeat url wait for courses to be loaded
Python
agpl-3.0
benpatterson/edx-platform,bigdatauniversity/edx-platform,Softmotions/edx-platform,shashank971/edx-platform,shabab12/edx-platform,ampax/edx-platform,mcgachey/edx-platform,yokose-ks/edx-platform,Livit/Livit.Learn.EdX,DefyVentures/edx-platform,pdehaye/theming-edx-platform,jruiperezv/ANALYSE,carsongee/edx-platform,jjmirand...
import json from datetime import datetime from django.http import HttpResponse def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat() } return HttpResponse(json.dumps(output, indent=4)) Make h...
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
<commit_before>import json from datetime import datetime from django.http import HttpResponse def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat() } return HttpResponse(json.dumps(output, in...
import json from datetime import datetime from django.http import HttpResponse from xmodule.modulestore.django import modulestore def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat(), 'cours...
import json from datetime import datetime from django.http import HttpResponse def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat() } return HttpResponse(json.dumps(output, indent=4)) Make h...
<commit_before>import json from datetime import datetime from django.http import HttpResponse def heartbeat(request): """ Simple view that a loadbalancer can check to verify that the app is up """ output = { 'date': datetime.now().isoformat() } return HttpResponse(json.dumps(output, in...
59b920d3c5d699c180be4dafec86f50a0c636028
work/print-traceback.py
work/print-traceback.py
#!/usr/bin/python3 from pprint import pprint import json import sys if __name__ == '__main__': if len(sys.argv) >= 2: path = sys.argv[1].split('.') else: path = ['error', 'stack'] obj = json.load(sys.stdin) try: for part in path: obj = obj[part] except KeyErro...
#!/usr/bin/python3 from pprint import pprint import json import sys def get(obj, path): try: for part in path: obj = obj[part] return obj except KeyError: return None if __name__ == '__main__': if len(sys.argv) >= 2: paths = [sys.argv[1].split('.')] else: ...
Improve stacktrace print for traceback.
Improve stacktrace print for traceback.
Python
mit
ammongit/scripts,ammongit/scripts,ammongit/scripts,ammongit/scripts
#!/usr/bin/python3 from pprint import pprint import json import sys if __name__ == '__main__': if len(sys.argv) >= 2: path = sys.argv[1].split('.') else: path = ['error', 'stack'] obj = json.load(sys.stdin) try: for part in path: obj = obj[part] except KeyErro...
#!/usr/bin/python3 from pprint import pprint import json import sys def get(obj, path): try: for part in path: obj = obj[part] return obj except KeyError: return None if __name__ == '__main__': if len(sys.argv) >= 2: paths = [sys.argv[1].split('.')] else: ...
<commit_before>#!/usr/bin/python3 from pprint import pprint import json import sys if __name__ == '__main__': if len(sys.argv) >= 2: path = sys.argv[1].split('.') else: path = ['error', 'stack'] obj = json.load(sys.stdin) try: for part in path: obj = obj[part] ...
#!/usr/bin/python3 from pprint import pprint import json import sys def get(obj, path): try: for part in path: obj = obj[part] return obj except KeyError: return None if __name__ == '__main__': if len(sys.argv) >= 2: paths = [sys.argv[1].split('.')] else: ...
#!/usr/bin/python3 from pprint import pprint import json import sys if __name__ == '__main__': if len(sys.argv) >= 2: path = sys.argv[1].split('.') else: path = ['error', 'stack'] obj = json.load(sys.stdin) try: for part in path: obj = obj[part] except KeyErro...
<commit_before>#!/usr/bin/python3 from pprint import pprint import json import sys if __name__ == '__main__': if len(sys.argv) >= 2: path = sys.argv[1].split('.') else: path = ['error', 'stack'] obj = json.load(sys.stdin) try: for part in path: obj = obj[part] ...
4922d53f95b3f7c055afe1d0af0088b505cbc0d2
addons/bestja_configuration_ucw/__openerp__.py
addons/bestja_configuration_ucw/__openerp__.py
# -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
# -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
Enable Odoo blog for UCW
Enable Odoo blog for UCW
Python
agpl-3.0
EE/bestja,EE/bestja,KamilWo/bestja,KamilWo/bestja,KrzysiekJ/bestja,ludwiktrammer/bestja,EE/bestja,ludwiktrammer/bestja,KamilWo/bestja,KrzysiekJ/bestja,ludwiktrammer/bestja,KrzysiekJ/bestja
# -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
# -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
<commit_before># -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'categ...
# -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
# -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
<commit_before># -*- coding: utf-8 -*- { 'name': "Bestja: UCW", 'summary': "Installation configuration for UCW", 'description': "Installation configuration for Uniwersyteckie Centrum Wolontariatu", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'categ...
1075f88c1a46c6fbacc74adc6a5b9b26c997be37
blanc_basic_events/templatetags/events_tags.py
blanc_basic_events/templatetags/events_tags.py
from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(final_date__gte=datetime.date.today(), ...
from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(end_date__gte=datetime.date.today(), ...
Fix for get_upcoming_events tag using the wrong filter
Fix for get_upcoming_events tag using the wrong filter
Python
bsd-3-clause
blancltd/blanc-basic-events
from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(final_date__gte=datetime.date.today(), ...
from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(end_date__gte=datetime.date.today(), ...
<commit_before>from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(final_date__gte=datetime.date.today(), ...
from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(end_date__gte=datetime.date.today(), ...
from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(final_date__gte=datetime.date.today(), ...
<commit_before>from django import template from .. import get_special_events_model import datetime register = template.Library() @register.assignment_tag def get_upcoming_events(limit=None): event_list = get_special_events_model().objects.filter(final_date__gte=datetime.date.today(), ...
343524ddeac29e59d7c214a62a721c2065583503
setuptools_extversion/__init__.py
setuptools_extversion/__init__.py
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PROVIDER_KEY: e...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PRO...
Add support for providing command string
Add support for providing command string User can provide a command string in a 'command' key -- e.g.: setup( ... setup_requires='setuptools_extversion', extversion={ 'command': 'git describe --tags --dirty', } ... )
Python
mit
msabramo/python_setuptools_extversion
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PROVIDER_KEY: e...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PRO...
<commit_before>""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PROVIDER...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ import subprocess VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PRO...
""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PROVIDER_KEY: e...
<commit_before>""" setuptools_extversion Allows getting distribution version from external sources (e.g.: shell command, Python function) """ VERSION_PROVIDER_KEY = 'extversion' def version_calc(dist, attr, value): """ Handler for parameter to setup(extversion=value) """ if attr == VERSION_PROVIDER...
e61e633e122953774ee4246ad61b23d9b7d264f3
semillas_backend/users/serializers.py
semillas_backend/users/serializers.py
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instanc...
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance...
Add location, email, username and last_login to user serializer
Add location, email, username and last_login to user serializer
Python
mit
Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instanc...
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance...
<commit_before>from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializ...
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance...
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instanc...
<commit_before>from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializ...
5d652eacf793dc3aa1873279708f88e16e1c0dfd
eloqua/endpoints_v2.py
eloqua/endpoints_v2.py
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
Add operation to activate campaign.
Add operation to activate campaign.
Python
mit
alexcchan/eloqua
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
<commit_before>""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_camp...
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_campaigns': { ...
<commit_before>""" API MAPPING FOR Eloqua API V2 """ mapping_table = { 'content_type': 'application/json', 'path_prefix': '/API/REST/2.0', # Campaigns 'get_campaign': { 'method': 'GET', 'path': '/assets/campaign/{{campaign_id}}', 'valid_params': ['depth'] }, 'list_camp...
65d233f0137413fa72d7f991e3b308739f8ecf78
setup_unix.py
setup_unix.py
#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations'] if platform =...
#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations'] if platform =...
Remove un-needed dynamic dependency to zlib
Remove un-needed dynamic dependency to zlib Discovered in issue #25
Python
agpl-3.0
nabla-c0d3/nassl,nabla-c0d3/nassl,nabla-c0d3/nassl
#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations'] if platform =...
#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations'] if platform =...
<commit_before>#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations']...
#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations'] if platform =...
#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations'] if platform =...
<commit_before>#!/usr/bin/python2.7 from distutils.core import setup, Extension from sys import platform from setup_config import NASSL_SETUP, NASSL_EXT_SETUP from buildAll_config import OPENSSL_DIR, ZLIB_DIR from buildAll_unix import OPENSSL_INSTALL_DIR extra_compile_args = ['-Wall', '-Wno-deprecated-declarations']...
3ad750a875fb436f163c6ecb893430f6db2bed94
odeintw/__init__.py
odeintw/__init__.py
# Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.1" test = _Tester().test
# Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.2.dev1" test = _Tester().test
Update master branch version to 0.1.2.dev1
REL: Update master branch version to 0.1.2.dev1
Python
bsd-3-clause
WarrenWeckesser/odeintw
# Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.1" test = _Tester().test REL: Update master branch version to 0.1.2.dev1
# Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.2.dev1" test = _Tester().test
<commit_before># Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.1" test = _Tester().test <commit_msg>REL: Update master branch version to 0.1.2.dev1<commit_after...
# Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.2.dev1" test = _Tester().test
# Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.1" test = _Tester().test REL: Update master branch version to 0.1.2.dev1# Copyright (c) 2014, Warren Weckesser #...
<commit_before># Copyright (c) 2014, Warren Weckesser # All rights reserved. # See the LICENSE file for license information. from numpy.testing import Tester as _Tester from ._odeintw import odeintw __version__ = "0.1.1" test = _Tester().test <commit_msg>REL: Update master branch version to 0.1.2.dev1<commit_after...
de8b0680401c04ff768355c86bd1beb643501491
indra/tools/plot_formatting.py
indra/tools/plot_formatting.py
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [ r...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [ '...
Remove strings with r'\use...' getting interp as Unicode!
Remove strings with r'\use...' getting interp as Unicode!
Python
bsd-2-clause
sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,johnbachman/indra,pvtodorov/indra,jmuhlich/indra,pvtodorov/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,jmuhlich/indra,sorgerlab/indra,bgyori/indra,j...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [ r...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [ '...
<commit_before>from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = ...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [ '...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [ r...
<commit_before>from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import matplotlib fontsize=7 def set_fig_params(): matplotlib.rcParams['font.sans-serif'] = 'Arial' matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = ...
1e218ba94c774372929d890780ab12efbfaae181
core/management/commands/heroku.py
core/management/commands/heroku.py
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Creates a superuser for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] call_command(...
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Runs migrations for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] call_command('mig...
Remove Heroku createsuperuser command. Migrate now creates a default user.
Remove Heroku createsuperuser command. Migrate now creates a default user.
Python
bsd-2-clause
cdubz/timestrap,muhleder/timestrap,muhleder/timestrap,muhleder/timestrap,overshard/timestrap,cdubz/timestrap,overshard/timestrap,overshard/timestrap,cdubz/timestrap
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Creates a superuser for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] call_command(...
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Runs migrations for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] call_command('mig...
<commit_before>from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Creates a superuser for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] ...
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Runs migrations for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] call_command('mig...
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Creates a superuser for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] call_command(...
<commit_before>from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.core.management import call_command class Command(BaseCommand): help = 'Creates a superuser for Heroku' def handle(self, *args, **kwargs): verbosity = kwargs['verbosity'] ...
fba09b10f7df5a75d7886ba304dff9e7c79f2197
appengine/components/test_support/test_env.py
appengine/components/test_support/test_env.py
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) _INITIALIZED = ...
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) _INITIALIZED = ...
Switch luci-py tests to use gcloud SDK.
Switch luci-py tests to use gcloud SDK. R=maruel@chromium.org, iannucci@chromium.org BUG=835919 Change-Id: Iaf7f361343dfebfc7fd603b8b996ad9fa5412f52 Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-py/+/1684451 Reviewed-by: Andrii Shyshkalov <a30c74fa30536fe7ea81ed6dec202e35e149e1fd@chromium.or...
Python
apache-2.0
luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) _INITIALIZED = ...
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) _INITIALIZED = ...
<commit_before># Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) ...
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) _INITIALIZED = ...
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) _INITIALIZED = ...
<commit_before># Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import os import sys # /appengine/ ROOT_DIR = os.path.dirname( os.path.dirname(os.path.realpath(os.path.abspath(__file__)))) ...
2d55cf766baeb6c9f3ad0c1925b049464680cf7e
saleor/integrations/utils.py
saleor/integrations/utils.py
import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'w') as output_file: if feed.compression: output = gzip.GzipFile(fileobj=output_file) else: output = output_file writer = ...
from __future__ import unicode_literals import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'wb') as output_file: if feed.compression: try: output = gzip.open(output_file, 'wt') ...
Fix compressed feeds in python3
Fix compressed feeds in python3
Python
bsd-3-clause
KenMutemi/saleor,tfroehlich82/saleor,itbabu/saleor,itbabu/saleor,car3oon/saleor,UITools/saleor,tfroehlich82/saleor,UITools/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,jreigel/saleor,KenMutemi/saleor,itbabu/saleor,car3oon/saleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,HyperManTT/ECommerceSale...
import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'w') as output_file: if feed.compression: output = gzip.GzipFile(fileobj=output_file) else: output = output_file writer = ...
from __future__ import unicode_literals import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'wb') as output_file: if feed.compression: try: output = gzip.open(output_file, 'wt') ...
<commit_before>import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'w') as output_file: if feed.compression: output = gzip.GzipFile(fileobj=output_file) else: output = output_file ...
from __future__ import unicode_literals import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'wb') as output_file: if feed.compression: try: output = gzip.open(output_file, 'wt') ...
import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'w') as output_file: if feed.compression: output = gzip.GzipFile(fileobj=output_file) else: output = output_file writer = ...
<commit_before>import gzip import csv from django.core.files.storage import default_storage def update_feed(feed): with default_storage.open(feed.file_path, 'w') as output_file: if feed.compression: output = gzip.GzipFile(fileobj=output_file) else: output = output_file ...
2d2fb47e321faa032c98e92d34e6215b6026f1f0
keras/applications/__init__.py
keras/applications/__init__.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications if not hasattr(keras_applications, 'get_submodules_from_kwargs'): keras_applications.set_k...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications def keras_modules_injection(base_fun): def wrapper(*args, **kwargs): kwargs['bac...
Remove deprecated applications adapter code
Remove deprecated applications adapter code
Python
apache-2.0
keras-team/keras,keras-team/keras
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications if not hasattr(keras_applications, 'get_submodules_from_kwargs'): keras_applications.set_k...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications def keras_modules_injection(base_fun): def wrapper(*args, **kwargs): kwargs['bac...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications if not hasattr(keras_applications, 'get_submodules_from_kwargs'): keras_app...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications def keras_modules_injection(base_fun): def wrapper(*args, **kwargs): kwargs['bac...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications if not hasattr(keras_applications, 'get_submodules_from_kwargs'): keras_applications.set_k...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import print_function from .. import backend from .. import layers from .. import models from .. import utils import keras_applications if not hasattr(keras_applications, 'get_submodules_from_kwargs'): keras_app...
eb8177cdc1c9b8bb38844786bc66f362eef7c7ee
{{cookiecutter.app_name}}/src/{{cookiecutter.app_name}}/__init__.py
{{cookiecutter.app_name}}/src/{{cookiecutter.app_name}}/__init__.py
from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_name}}.models i...
from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_name}}.models i...
Move flask-restful api defs before init_app, since it doesn't work otherwise with new version of flask-restful
Move flask-restful api defs before init_app, since it doesn't work otherwise with new version of flask-restful
Python
mit
makmanalp/flask-chassis
from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_name}}.models i...
from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_name}}.models i...
<commit_before>from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_...
from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_name}}.models i...
from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_name}}.models i...
<commit_before>from flask import Flask from raven.contrib.flask import Sentry from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.profiler import ProfilerMiddleware from {{cookiecutter.app_name}}.views import CatAPI from {{cookiecutter.app_name}}.views import api, cache from {{cookiecutter.app_...
3899893177f6d149d638ad5ae32c2135f0bfdcf2
startServers.py
startServers.py
import sys import time import subprocess def main(baseCommand, startingPort, count): procs = [] for i in range(1,count + 1): command = baseCommand + ' ' + str(startingPort + i) if sys.platform.startswith('win'): process = subprocess.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) else: linux...
import sys import time import subprocess import psutil def startServer(command): if sys.platform.startswith('win'): return psutil.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) else: linuxCommand = 'xterm -hold -e "%s"' % command return psutil.Popen(linuxCommand, shell=True) def main(baseCommand...
Revert "Revert "keep servers running for fun and profit""
Revert "Revert "keep servers running for fun and profit"" This reverts commit cc7253020251bc96d7d7f22a991b094a60bbc104.
Python
mit
IngenuityEngine/coren_proxy,IngenuityEngine/coren_proxy
import sys import time import subprocess def main(baseCommand, startingPort, count): procs = [] for i in range(1,count + 1): command = baseCommand + ' ' + str(startingPort + i) if sys.platform.startswith('win'): process = subprocess.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) else: linux...
import sys import time import subprocess import psutil def startServer(command): if sys.platform.startswith('win'): return psutil.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) else: linuxCommand = 'xterm -hold -e "%s"' % command return psutil.Popen(linuxCommand, shell=True) def main(baseCommand...
<commit_before> import sys import time import subprocess def main(baseCommand, startingPort, count): procs = [] for i in range(1,count + 1): command = baseCommand + ' ' + str(startingPort + i) if sys.platform.startswith('win'): process = subprocess.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) ...
import sys import time import subprocess import psutil def startServer(command): if sys.platform.startswith('win'): return psutil.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) else: linuxCommand = 'xterm -hold -e "%s"' % command return psutil.Popen(linuxCommand, shell=True) def main(baseCommand...
import sys import time import subprocess def main(baseCommand, startingPort, count): procs = [] for i in range(1,count + 1): command = baseCommand + ' ' + str(startingPort + i) if sys.platform.startswith('win'): process = subprocess.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) else: linux...
<commit_before> import sys import time import subprocess def main(baseCommand, startingPort, count): procs = [] for i in range(1,count + 1): command = baseCommand + ' ' + str(startingPort + i) if sys.platform.startswith('win'): process = subprocess.Popen(command, creationflags=subprocess.CREATE_NEW_CONSOLE) ...
d52b47eaad73f818974b7feec83fa3b15ddb5aac
form_utils_bootstrap3/tests/__init__.py
form_utils_bootstrap3/tests/__init__.py
import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ "default...
import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ "default...
Fix tests for Django trunk
Fix tests for Django trunk
Python
mit
federicobond/django-form-utils-bootstrap3
import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ "default...
import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ "default...
<commit_before>import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ ...
import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ "default...
import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ "default...
<commit_before>import os import django from django.conf import settings if not settings.configured: settings_dict = dict( INSTALLED_APPS=[ 'django.contrib.contenttypes', 'django.contrib.auth', 'bootstrap3', 'form_utils', ], DATABASES={ ...
c0cc820b933913a3d5967d377f557a26ff21dcf7
tests/test_utils.py
tests/test_utils.py
from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import extension_to_format, format_to_extension, FileWrapper from nose.tools import eq_, raises def test_extension_to_format(): eq_(extension_to_format('.jpeg'), 'JPEG') eq_(extension_to_format(...
from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import (extension_to_format, format_to_extension, FileWrapper, save_image) from nose.tools import eq_, raises from tempfile import NamedTemporaryFile from .utils import create_im...
Test that filename string can be used with save_image
Test that filename string can be used with save_image
Python
bsd-3-clause
kezabelle/pilkit,fladi/pilkit
from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import extension_to_format, format_to_extension, FileWrapper from nose.tools import eq_, raises def test_extension_to_format(): eq_(extension_to_format('.jpeg'), 'JPEG') eq_(extension_to_format(...
from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import (extension_to_format, format_to_extension, FileWrapper, save_image) from nose.tools import eq_, raises from tempfile import NamedTemporaryFile from .utils import create_im...
<commit_before>from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import extension_to_format, format_to_extension, FileWrapper from nose.tools import eq_, raises def test_extension_to_format(): eq_(extension_to_format('.jpeg'), 'JPEG') eq_(exten...
from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import (extension_to_format, format_to_extension, FileWrapper, save_image) from nose.tools import eq_, raises from tempfile import NamedTemporaryFile from .utils import create_im...
from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import extension_to_format, format_to_extension, FileWrapper from nose.tools import eq_, raises def test_extension_to_format(): eq_(extension_to_format('.jpeg'), 'JPEG') eq_(extension_to_format(...
<commit_before>from io import UnsupportedOperation from pilkit.exceptions import UnknownFormat, UnknownExtension from pilkit.utils import extension_to_format, format_to_extension, FileWrapper from nose.tools import eq_, raises def test_extension_to_format(): eq_(extension_to_format('.jpeg'), 'JPEG') eq_(exten...
3579bf97ae6b4232e063babcedf3c0ba2a813d41
mapclientplugins/heartsurfacesegmenterstep/__init__.py
mapclientplugins/heartsurfacesegmenterstep/__init__.py
''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/master.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegmenterstep import s...
''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/v0.1.0.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegmenterstep import s...
Set location of source code to version tag.
Set location of source code to version tag.
Python
apache-2.0
mapclient-plugins/heartsurfacesegmenter
''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/master.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegmenterstep import s...
''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/v0.1.0.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegmenterstep import s...
<commit_before> ''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/master.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegment...
''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/v0.1.0.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegmenterstep import s...
''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/master.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegmenterstep import s...
<commit_before> ''' MAP Client Plugin ''' __version__ = '0.1.0' __author__ = 'Hugh Sorby' __stepname__ = 'Heart Surface' __location__ = 'https://github.com/mapclient-plugins/heartsurfacesegmenter/archive/master.zip' # import class that derives itself from the step mountpoint. from mapclientplugins.heartsurfacesegment...
99d0f754b39bdddf58e44e669d24157227a43107
heliotron/__init__.py
heliotron/__init__.py
#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light import heliotron.presets __all__ = ['Bridge', 'Light', 'presets']
#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light from heliotron import presets __all__ = ['Bridge', 'Light', 'presets']
Change module import to squash a code smell
Change module import to squash a code smell
Python
mit
briancline/heliotron
#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light import heliotron.presets __all__ = ['Bridge', 'Light', 'presets'] Change module import to squash a code smell
#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light from heliotron import presets __all__ = ['Bridge', 'Light', 'presets']
<commit_before>#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light import heliotron.presets __all__ = ['Bridge', 'Light', 'presets'] <commit_msg>Change module import to squash a code smell<commit_after>
#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light from heliotron import presets __all__ = ['Bridge', 'Light', 'presets']
#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light import heliotron.presets __all__ = ['Bridge', 'Light', 'presets'] Change module import to squash a code smell#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light from heliotron imp...
<commit_before>#from requests import get from heliotron.bridge import Bridge from heliotron.light import Light import heliotron.presets __all__ = ['Bridge', 'Light', 'presets'] <commit_msg>Change module import to squash a code smell<commit_after>#from requests import get from heliotron.bridge import Bridge from heliot...
20506c1463c1be9639bceae1168ba97178280796
mrburns/main/tests.py
mrburns/main/tests.py
from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text='The Dude abide...
from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text='The Dude abide...
Fix twitter url helper test.
Fix twitter url helper test.
Python
mpl-2.0
almossawi/mrburns,almossawi/mrburns,mozilla/mrburns,mozilla/mrburns,mozilla/mrburns,almossawi/mrburns,almossawi/mrburns
from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text='The Dude abide...
from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text='The Dude abide...
<commit_before>from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text=...
from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text='The Dude abide...
from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text='The Dude abide...
<commit_before>from django.test import TestCase from nose.tools import ok_ from mrburns.main import views class TestViewHelpers(TestCase): def test_twitter_share_url_fn(self): """Should return a proper and endoded twitter share url.""" url = views.get_tw_share_url(url='http://example.com', text=...
8f31a87ace324c519eac8d883cf0327d08f48df0
lib/ansiblelint/rules/VariableHasSpacesRule.py
lib/ansiblelint/rules/VariableHasSpacesRule.py
# Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Variables should h...
# Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Variables should h...
Fix nested JSON obj false positive
var-space-rule: Fix nested JSON obj false positive When using compact form nested JSON object within a Jinja2 context as shown in the following example: set_fact:"{{ {'test': {'subtest': variable}} }}" 'variable}}' will raise a false positive [206] error. This commit adds an intermediate step within 206 (VariableH...
Python
mit
willthames/ansible-lint
# Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Variables should h...
# Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Variables should h...
<commit_before># Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Var...
# Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Variables should h...
# Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Variables should h...
<commit_before># Copyright (c) 2016, Will Thames and contributors # Copyright (c) 2018, Ansible Project from ansiblelint import AnsibleLintRule import re class VariableHasSpacesRule(AnsibleLintRule): id = '206' shortdesc = 'Variables should have spaces before and after: {{ var_name }}' description = 'Var...
8fc4713375c4eadd83ec376c3e839d921c39b5dc
src/encoded/predicates.py
src/encoded/predicates.py
from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, config): se...
from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, config): if...
Allow specification of multiple subpath_segments
Allow specification of multiple subpath_segments
Python
mit
4dn-dcic/fourfront,ClinGen/clincoded,kidaa/encoded,T2DREAM/t2dream-portal,philiptzou/clincoded,hms-dbmi/fourfront,philiptzou/clincoded,4dn-dcic/fourfront,4dn-dcic/fourfront,ENCODE-DCC/encoded,ENCODE-DCC/encoded,ClinGen/clincoded,T2DREAM/t2dream-portal,kidaa/encoded,ENCODE-DCC/snovault,ENCODE-DCC/snovault,ClinGen/clinco...
from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, config): se...
from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, config): if...
<commit_before>from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, conf...
from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, config): if...
from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, config): se...
<commit_before>from pyramid.security import has_permission def includeme(config): config.add_view_predicate('subpath_segments', SubpathSegmentsPredicate) config.add_view_predicate('additional_permission', AdditionalPermissionPredicate) class SubpathSegmentsPredicate(object): def __init__(self, val, conf...
f014538a79facc32bdc726f0d7fe5d9a10d24189
project/settings.py
project/settings.py
# -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '' STAT_TOKEN = ...
# -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '' STAT_TOKEN = ...
Update description for game types
Update description for game types
Python
mit
huangenyan/Lattish,MahjongRepository/tenhou-python-bot,huangenyan/Lattish,MahjongRepository/tenhou-python-bot
# -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '' STAT_TOKEN = ...
# -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '' STAT_TOKEN = ...
<commit_before># -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '...
# -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '' STAT_TOKEN = ...
# -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '' STAT_TOKEN = ...
<commit_before># -*- coding: utf-8 -*- TENHOU_HOST = '133.242.10.78' TENHOU_PORT = 10080 USER_ID = 'NoName' LOBBY = '0' WAITING_GAME_TIMEOUT_MINUTES = 10 # in tournament mode bot is not trying to search the game # it just sitting in the lobby and waiting for the game start IS_TOURNAMENT = False STAT_SERVER_URL = '...
f5234462c3bdacf91aad84df78bf750bf2035493
alfred_db/migrations/versions/4fdf1059c4ba_add_organizations_us.py
alfred_db/migrations/versions/4fdf1059c4ba_add_organizations_us.py
"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): op.create_tab...
"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): op.create_tab...
Fix memebership table creation migration
Fix memebership table creation migration
Python
isc
alfredhq/alfred-db
"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): op.create_tab...
"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): op.create_tab...
<commit_before>"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): ...
"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): op.create_tab...
"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): op.create_tab...
<commit_before>"""Add organizations-users association table Revision ID: 4fdf1059c4ba Revises: 393a48ab5fc7 Create Date: 2012-09-02 12:37:11.785052 """ # revision identifiers, used by Alembic. revision = '4fdf1059c4ba' down_revision = '393a48ab5fc7' from alembic import op import sqlalchemy as sa def upgrade(): ...
d208407fb71ccb2d09eae7af41e486caae65a45e
openquake/__init__.py
openquake/__init__.py
__import__('pkg_resources').declare_namespace(__name__)
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Make the openquake namespace compatible with old setuptools
Make the openquake namespace compatible with old setuptools
Python
agpl-3.0
gem/oq-engine,gem/oq-engine,rcgee/oq-hazardlib,gem/oq-hazardlib,gem/oq-hazardlib,gem/oq-engine,gem/oq-engine,rcgee/oq-hazardlib,gem/oq-hazardlib,gem/oq-engine
__import__('pkg_resources').declare_namespace(__name__) Make the openquake namespace compatible with old setuptools
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
<commit_before>__import__('pkg_resources').declare_namespace(__name__) <commit_msg>Make the openquake namespace compatible with old setuptools<commit_after>
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
__import__('pkg_resources').declare_namespace(__name__) Make the openquake namespace compatible with old setuptools# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of ...
<commit_before>__import__('pkg_resources').declare_namespace(__name__) <commit_msg>Make the openquake namespace compatible with old setuptools<commit_after># -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute ...
5ad869909e95fa8e5e0b6a489d361c42006023a5
openstack/__init__.py
openstack/__init__.py
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
Use project name to retrieve version info
Use project name to retrieve version info Change-Id: Iaef93bde5183263f900166b8ec90eefb7bfdc99b
Python
apache-2.0
openstack/python-openstacksdk,dudymas/python-openstacksdk,dudymas/python-openstacksdk,mtougeron/python-openstacksdk,mtougeron/python-openstacksdk,openstack/python-openstacksdk,briancurtin/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,briancurtin/python-openstacksdk,stackforge/python-ope...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
<commit_before># -*- coding: utf-8 -*- # 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...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
<commit_before># -*- coding: utf-8 -*- # 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...
a6581409971a8670a5195924feb27fb890d297c5
plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
plugins/PerObjectSettingsTool/PerObjectSettingsTool.py
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): super()._...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): super()._...
Remove more remnants of print sequence message
Remove more remnants of print sequence message I found this other place that was helping to display the message that warns that print sequcence is set per-object. Since the latter is no longer possible, this message shouldn't be displayed any more. Contributes to issue CURA-458.
Python
agpl-3.0
hmflash/Cura,Curahelper/Cura,senttech/Cura,Curahelper/Cura,hmflash/Cura,ynotstartups/Wanhao,totalretribution/Cura,fieldOfView/Cura,senttech/Cura,totalretribution/Cura,ynotstartups/Wanhao,fieldOfView/Cura
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): super()._...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): super()._...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): ...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): super()._...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): super()._...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from . import PerObjectSettingsModel class PerObjectSettingsTool(Tool): def __init__(self): ...
e0164d906c791d0b00077ae5353a07a07f4cd30d
labs/04_conv_nets/solutions/strides_padding.py
labs/04_conv_nets/solutions/strides_padding.py
def my_init(shape, dtype=None): array = np.zeros(shape=(5,5,3,3)) array[2,2] = np.eye(3) return array inp = Input((None, None, 3), dtype="float32") x = Conv2D(kernel_size=(5,5), filters=3, strides=2, padding="same", kernel_initializer=my_init)(inp) conv_strides_same = Model(inputs=inp, output...
def my_init(shape=(5, 5, 3, 3), dtype=None): array = np.zeros(shape=shape) array[2, 2] = np.eye(3) return array conv_strides_same = Sequential([ Conv2D(filters=3, kernel_size=5, strides=2, padding="same", kernel_initializer=my_init, input_shape=(None, None, 3)) ]) conv_strides_va...
Update solution to be consistent
Update solution to be consistent
Python
mit
m2dsupsdlclass/lectures-labs,m2dsupsdlclass/lectures-labs
def my_init(shape, dtype=None): array = np.zeros(shape=(5,5,3,3)) array[2,2] = np.eye(3) return array inp = Input((None, None, 3), dtype="float32") x = Conv2D(kernel_size=(5,5), filters=3, strides=2, padding="same", kernel_initializer=my_init)(inp) conv_strides_same = Model(inputs=inp, output...
def my_init(shape=(5, 5, 3, 3), dtype=None): array = np.zeros(shape=shape) array[2, 2] = np.eye(3) return array conv_strides_same = Sequential([ Conv2D(filters=3, kernel_size=5, strides=2, padding="same", kernel_initializer=my_init, input_shape=(None, None, 3)) ]) conv_strides_va...
<commit_before> def my_init(shape, dtype=None): array = np.zeros(shape=(5,5,3,3)) array[2,2] = np.eye(3) return array inp = Input((None, None, 3), dtype="float32") x = Conv2D(kernel_size=(5,5), filters=3, strides=2, padding="same", kernel_initializer=my_init)(inp) conv_strides_same = Model(inp...
def my_init(shape=(5, 5, 3, 3), dtype=None): array = np.zeros(shape=shape) array[2, 2] = np.eye(3) return array conv_strides_same = Sequential([ Conv2D(filters=3, kernel_size=5, strides=2, padding="same", kernel_initializer=my_init, input_shape=(None, None, 3)) ]) conv_strides_va...
def my_init(shape, dtype=None): array = np.zeros(shape=(5,5,3,3)) array[2,2] = np.eye(3) return array inp = Input((None, None, 3), dtype="float32") x = Conv2D(kernel_size=(5,5), filters=3, strides=2, padding="same", kernel_initializer=my_init)(inp) conv_strides_same = Model(inputs=inp, output...
<commit_before> def my_init(shape, dtype=None): array = np.zeros(shape=(5,5,3,3)) array[2,2] = np.eye(3) return array inp = Input((None, None, 3), dtype="float32") x = Conv2D(kernel_size=(5,5), filters=3, strides=2, padding="same", kernel_initializer=my_init)(inp) conv_strides_same = Model(inp...
72b9ff43daaf88f43ec4397cfed8fb860d4ad850
rest-api/test/client_test/base.py
rest-api/test/client_test/base.py
import copy import json import os import unittest from client.client import Client # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase): def setUp(s...
import copy import json import os import unittest from client.client import Client from tools.main_util import configure_logging # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class Ba...
Configure logging in client tests, so client logs show up.
Configure logging in client tests, so client logs show up.
Python
bsd-3-clause
all-of-us/raw-data-repository,all-of-us/raw-data-repository,all-of-us/raw-data-repository
import copy import json import os import unittest from client.client import Client # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase): def setUp(s...
import copy import json import os import unittest from client.client import Client from tools.main_util import configure_logging # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class Ba...
<commit_before>import copy import json import os import unittest from client.client import Client # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase)...
import copy import json import os import unittest from client.client import Client from tools.main_util import configure_logging # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class Ba...
import copy import json import os import unittest from client.client import Client # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase): def setUp(s...
<commit_before>import copy import json import os import unittest from client.client import Client # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase)...
b5d3425ae0a4a42e85748e494c3ddfaa7511f7b7
ocradmin/lib/nodetree/cache.py
ocradmin/lib/nodetree/cache.py
""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. """ ...
""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. """ ...
Test for existence of node before clearing it
Test for existence of node before clearing it
Python
apache-2.0
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. """ ...
""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. """ ...
<commit_before>""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. ...
""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. """ ...
""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. """ ...
<commit_before>""" Classes for customising node caching. """ class BasicCacher(object): """ Basic in-memory caching. """ def __init__(self, logger=None): self._cache = {} self.logger = logger def set_cache(self, node, data): """ Store some data on the object. ...
1934229ace3bd35b98e3eaa9b8ec75a1000dea78
djkombu/transport.py
djkombu/transport.py
from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(virtual.Channel)...
from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(virtual.Channel)...
Work with new and *older* kombu versions
Work with new and *older* kombu versions
Python
bsd-3-clause
ask/django-kombu
from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(virtual.Channel)...
from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(virtual.Channel)...
<commit_before>from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(v...
from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(virtual.Channel)...
from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(virtual.Channel)...
<commit_before>from Queue import Empty from anyjson import serialize, deserialize from kombu.transport import virtual from django.conf import settings from django.core import exceptions as errors from djkombu.models import Queue POLLING_INTERVAL = getattr(settings, "DJKOMBU_POLLING_INTERVAL", 5.0) class Channel(v...
54dbc3638ba376f29aa619e897c9b87238559ac3
billjobs/tests/tests_export_account_email.py
billjobs/tests/tests_export_account_email.py
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): ...
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class MockRequest(object): pass class EmailExportTestCase(TestCase): """ Tests for email account expor...
Refactor test, test export email return text/csv content type
Refactor test, test export email return text/csv content type
Python
mit
ioO/billjobs
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): ...
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class MockRequest(object): pass class EmailExportTestCase(TestCase): """ Tests for email account expor...
<commit_before>from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_...
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class MockRequest(object): pass class EmailExportTestCase(TestCase): """ Tests for email account expor...
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_avaible(self): ...
<commit_before>from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class EmailExportTestCase(TestCase): """ Tests for email account export """ def test_method_is_...
2c449a27be2e9e9ec57cc6f8e31825064195290d
modules/weather_module/weather_module.py
modules/weather_module/weather_module.py
import juliet_module from pygame import Rect from time import time from os import getcwd class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") self.mod_id = _...
import juliet_module from pygame import Rect from time import time import forecastio class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None __forecast = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") ...
Add test forecast.io API call
Add test forecast.io API call
Python
bsd-2-clause
halfbro/juliet
import juliet_module from pygame import Rect from time import time from os import getcwd class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") self.mod_id = _...
import juliet_module from pygame import Rect from time import time import forecastio class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None __forecast = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") ...
<commit_before>import juliet_module from pygame import Rect from time import time from os import getcwd class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") ...
import juliet_module from pygame import Rect from time import time import forecastio class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None __forecast = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") ...
import juliet_module from pygame import Rect from time import time from os import getcwd class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") self.mod_id = _...
<commit_before>import juliet_module from pygame import Rect from time import time from os import getcwd class weather_module(juliet_module.module): mod_name = "weather_module" __last_update = time() __api = None def __init__(self, _id, _keyfile): print("Initializing Weather Module") ...
4c18d98b456d8a9f231a7009079f9b00f732c92e
comics/crawler/crawlers/ctrlaltdelsillies.py
comics/crawler/crawlers/ctrlaltdelsillies.py
from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' schedule = 'Mo,Tu,...
from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' schedule = 'Mo,Tu,...
Update Ctrl+Alt+Del Sillies crawler with new URL
Update Ctrl+Alt+Del Sillies crawler with new URL
Python
agpl-3.0
klette/comics,datagutten/comics,klette/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics,jodal/comics,klette/comics,datagutten/comics
from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' schedule = 'Mo,Tu,...
from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' schedule = 'Mo,Tu,...
<commit_before>from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' sch...
from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' schedule = 'Mo,Tu,...
from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' schedule = 'Mo,Tu,...
<commit_before>from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Ctrl+Alt+Del Sillies' language = 'en' url = 'http://www.ctrlaltdel-online.com/' start_date = '2008-06-27' history_capable_date = '2008-06-27' sch...
8ce6a6144fee1c9ec6a5f1a083eabbb653d8514b
virtool/postgres.py
virtool/postgres.py
import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param postgres_connection_strin...
import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine import virtool.models logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param pos...
Create tables on application start
Create tables on application start
Python
mit
virtool/virtool,virtool/virtool,igboyes/virtool,igboyes/virtool
import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param postgres_connection_strin...
import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine import virtool.models logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param pos...
<commit_before>import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param postgres_c...
import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine import virtool.models logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param pos...
import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param postgres_connection_strin...
<commit_before>import logging import sys from sqlalchemy import text from sqlalchemy.ext.asyncio import AsyncConnection, create_async_engine logger = logging.getLogger(__name__) async def connect(postgres_connection_string: str) -> AsyncConnection: """ Create a connection of Postgres. :param postgres_c...
e381d5c780e0d688766a415323d5586ead60532c
mangacork/__init__.py
mangacork/__init__.py
import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) app.config.from_object(os.getenv('APP_SETTINGS')) bcrypt = Bcrypt(app) db = SQLAlchemy(app) ...
import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) # TODO: It doesn't look like getenv is returning anything on prod # Find an alternative or fi...
Add important todo for fixing prod
Add important todo for fixing prod
Python
mit
ma3lstrom/manga-cork,ma3lstrom/manga-cork,ma3lstrom/manga-cork
import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) app.config.from_object(os.getenv('APP_SETTINGS')) bcrypt = Bcrypt(app) db = SQLAlchemy(app) ...
import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) # TODO: It doesn't look like getenv is returning anything on prod # Find an alternative or fi...
<commit_before>import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) app.config.from_object(os.getenv('APP_SETTINGS')) bcrypt = Bcrypt(app) db = SQ...
import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) # TODO: It doesn't look like getenv is returning anything on prod # Find an alternative or fi...
import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) app.config.from_object(os.getenv('APP_SETTINGS')) bcrypt = Bcrypt(app) db = SQLAlchemy(app) ...
<commit_before>import os import logging from flask import Flask from flask.ext.bcrypt import Bcrypt import flask.ext.login as flask_login from flask.ext.sqlalchemy import SQLAlchemy log = logging.getLogger(__name__) app = Flask(__name__) app.config.from_object(os.getenv('APP_SETTINGS')) bcrypt = Bcrypt(app) db = SQ...
5bde0ffa9374a1b4363faedc389ed3b49009aabd
candidates/tests/test_api_help_view.py
candidates/tests/test_api_help_view.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) def test_api_he...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) def test_api_he...
Fix test for updated text
Fix test for updated text
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) def test_api_he...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) def test_api_he...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) def test_api_he...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) def test_api_he...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django_webtest import WebTest from . import factories class TestApiHelpView(WebTest): def setUp(self): factories.ElectionFactory.create( slug='2015', name='2015 General Election', ) ...
4bf959b75c195c86418ff65c9147c3345712a188
funsize/utils/fetch.py
funsize/utils/fetch.py
""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checksum. The...
""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checksum. The...
Remove useless TODO from codebase.
Remove useless TODO from codebase.
Python
mpl-2.0
petemoore/build-funsize,petemoore/build-funsize
""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checksum. The...
""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checksum. The...
<commit_before>""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checks...
""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checksum. The...
""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checksum. The...
<commit_before>""" funsize.fetch ~~~~~~~~~~~~~~~~~~ This module contains fetch functions """ import logging import requests from .csum import verify from .oddity import DownloadError def downloadmar(url, checksum, cipher='sha512', output_file=None): """ Downloads the file specified by url, verifies the checks...
49990a967471f615936025c17ac1411e2976f159
neuroimaging/utils/tests/test_odict.py
neuroimaging/utils/tests/test_odict.py
"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) def test_cop...
"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) def test_cop...
Fix nose call so tests run in __main__.
BUG: Fix nose call so tests run in __main__.
Python
bsd-3-clause
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) def test_cop...
"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) def test_cop...
<commit_before>"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) ...
"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) def test_cop...
"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) def test_cop...
<commit_before>"""Test file for the ordered dictionary module, odict.py.""" from neuroimaging.externals.scipy.testing import * from neuroimaging.utils.odict import odict class TestOdict(TestCase): def setUp(self): print 'setUp' self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0))) ...
dac71e1741eed7c5412661e852ee435ee7f30c21
lingcod/layers/urls.py
lingcod/layers/urls.py
from django.conf.urls.defaults import * urlpatterns = patterns('lingcod.layers.views', url(r'^public/', 'get_public_layers', name='public-data-layers'), url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml', 'get_kml_file', name='kml-file'), url(r'^privatekml/(?P<se...
from django.conf.urls.defaults import * import time urlpatterns = patterns('lingcod.layers.views', url(r'^public/$', 'get_public_layers', name='public-data-layers'), # Useful for debugging, avoids GE caching interference url(r'^public/cachebuster/%s' % str(time.time()), 'get_pu...
Add another url pattern for debugging public layers
Add another url pattern for debugging public layers --HG-- branch : bookmarks
Python
bsd-3-clause
underbluewaters/marinemap,underbluewaters/marinemap,underbluewaters/marinemap
from django.conf.urls.defaults import * urlpatterns = patterns('lingcod.layers.views', url(r'^public/', 'get_public_layers', name='public-data-layers'), url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml', 'get_kml_file', name='kml-file'), url(r'^privatekml/(?P<se...
from django.conf.urls.defaults import * import time urlpatterns = patterns('lingcod.layers.views', url(r'^public/$', 'get_public_layers', name='public-data-layers'), # Useful for debugging, avoids GE caching interference url(r'^public/cachebuster/%s' % str(time.time()), 'get_pu...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('lingcod.layers.views', url(r'^public/', 'get_public_layers', name='public-data-layers'), url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml', 'get_kml_file', name='kml-file'), url(r'^pr...
from django.conf.urls.defaults import * import time urlpatterns = patterns('lingcod.layers.views', url(r'^public/$', 'get_public_layers', name='public-data-layers'), # Useful for debugging, avoids GE caching interference url(r'^public/cachebuster/%s' % str(time.time()), 'get_pu...
from django.conf.urls.defaults import * urlpatterns = patterns('lingcod.layers.views', url(r'^public/', 'get_public_layers', name='public-data-layers'), url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml', 'get_kml_file', name='kml-file'), url(r'^privatekml/(?P<se...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('lingcod.layers.views', url(r'^public/', 'get_public_layers', name='public-data-layers'), url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml', 'get_kml_file', name='kml-file'), url(r'^pr...
1dd06e1be96beb0088e58e06e9e775063e14b6ec
moksha/hub/reactor.py
moksha/hub/reactor.py
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
Fix a bug on platform detection on Mac OSX
Fix a bug on platform detection on Mac OSX
Python
apache-2.0
pombredanne/moksha,lmacken/moksha,ralphbean/moksha,pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha,ralphbean/moksha,pombredanne/moksha,lmacken/moksha,lmacken/moksha,mokshaproject/moksha,pombredanne/moksha,ralphbean/moksha,mokshaproject/moksha
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
<commit_before># This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in t...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
<commit_before># This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in t...
5c70751806c69bded77821b87d728821e37152c8
web/server.py
web/server.py
from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from decorators import Monitor app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIGHTS_INSTRUMENTATION_KEY'], app.wsgi_app) @app.route('/') @Monitor.api() def index...
import os from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from google.cloud import language from decorators import Monitor from blob_storage import BlobStorage app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIG...
Fix bugs in sentiment analysis code so entity sentiment is returned
Fix bugs in sentiment analysis code so entity sentiment is returned
Python
mit
harigov/newsalyzer,harigov/newsalyzer,harigov/newsalyzer
from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from decorators import Monitor app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIGHTS_INSTRUMENTATION_KEY'], app.wsgi_app) @app.route('/') @Monitor.api() def index...
import os from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from google.cloud import language from decorators import Monitor from blob_storage import BlobStorage app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIG...
<commit_before>from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from decorators import Monitor app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIGHTS_INSTRUMENTATION_KEY'], app.wsgi_app) @app.route('/') @Monitor....
import os from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from google.cloud import language from decorators import Monitor from blob_storage import BlobStorage app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIG...
from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from decorators import Monitor app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIGHTS_INSTRUMENTATION_KEY'], app.wsgi_app) @app.route('/') @Monitor.api() def index...
<commit_before>from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, jsonify, make_response import json from decorators import Monitor app = Flask(__name__) #app.wsgi_app = WSGIApplication(app.config['APPINSIGHTS_INSTRUMENTATION_KEY'], app.wsgi_app) @app.route('/') @Monitor....
707fb2cabcfa9886c968e81964b59995c0b0f2b6
python/convert_line_endings.py
python/convert_line_endings.py
#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as outfile: ...
#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as outfile: ...
Convert line endings for .h, .c and .cpp files as well as .cs
[trunk] Convert line endings for .h, .c and .cpp files as well as .cs
Python
bsd-3-clause
markfinal/BuildAMation,markfinal/BuildAMation,markfinal/BuildAMation,markfinal/BuildAMation,markfinal/BuildAMation
#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as outfile: ...
#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as outfile: ...
<commit_before>#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as...
#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as outfile: ...
#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as outfile: ...
<commit_before>#!/usr/bin/python import os import sys def convert_line_endings(file): if '\r\n' in open(file, 'rb').read(): print '%s contains DOS line endings. Converting' % file with open(file, 'rb') as infile: text = infile.read() text = text.replace('\r\n', '\n') with open(file, 'wb') as...
ef0a6968dedad74ddd40bd4ae81595be6092f24f
wrapper/__init__.py
wrapper/__init__.py
__version__ = '2.2.0' from libsbol import * import unit_tests
from __future__ import absolute_import __version__ = '2.2.0' from sbol.libsbol import * import sbol.unit_tests
Fix import issue with Python 3.6/Support future Python by forcing absolute import
Fix import issue with Python 3.6/Support future Python by forcing absolute import
Python
apache-2.0
SynBioDex/libSBOL,SynBioDex/libSBOL,SynBioDex/libSBOL,SynBioDex/libSBOL
__version__ = '2.2.0' from libsbol import * import unit_testsFix import issue with Python 3.6/Support future Python by forcing absolute import
from __future__ import absolute_import __version__ = '2.2.0' from sbol.libsbol import * import sbol.unit_tests
<commit_before>__version__ = '2.2.0' from libsbol import * import unit_tests<commit_msg>Fix import issue with Python 3.6/Support future Python by forcing absolute import<commit_after>
from __future__ import absolute_import __version__ = '2.2.0' from sbol.libsbol import * import sbol.unit_tests
__version__ = '2.2.0' from libsbol import * import unit_testsFix import issue with Python 3.6/Support future Python by forcing absolute importfrom __future__ import absolute_import __version__ = '2.2.0' from sbol.libsbol import * import sbol.unit_tests
<commit_before>__version__ = '2.2.0' from libsbol import * import unit_tests<commit_msg>Fix import issue with Python 3.6/Support future Python by forcing absolute import<commit_after>from __future__ import absolute_import __version__ = '2.2.0' from sbol.libsbol import * import sbol.unit_tests
1403882c74850804e2c87cb359e21715610c64ef
pywinauto/controls/__init__.py
pywinauto/controls/__init__.py
# GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either v...
# GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either v...
Fix uia_controls registration only when UIA is supported
Fix uia_controls registration only when UIA is supported
Python
bsd-3-clause
MagazinnikIvan/pywinauto,vasily-v-ryabov/pywinauto,moden-py/pywinauto,cetygamer/pywinauto,airelil/pywinauto,drinkertea/pywinauto,pywinauto/pywinauto,moden-py/pywinauto
# GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either v...
# GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either v...
<commit_before># GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Found...
# GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either v...
# GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either v...
<commit_before># GUI Application automation and testing library # Copyright (C) 2015 Intel Corporation # Copyright (C) 2009 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Found...
c2d1621e089b10418785e173145fb16b0759df1a
lib/jasy/core/Info.py
lib/jasy/core/Info.py
# # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)) def cldrData(what): return os.path.join(root(), "data", "c...
# # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.relpath(os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir))) return os.path.normpath(os.path.join(os.path.dirnam...
Reduce path to shortest possible from current dir.
Reduce path to shortest possible from current dir.
Python
mit
zynga/jasy,sebastian-software/jasy,zynga/jasy,sebastian-software/jasy
# # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)) def cldrData(what): return os.path.join(root(), "data", "c...
# # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.relpath(os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir))) return os.path.normpath(os.path.join(os.path.dirnam...
<commit_before># # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)) def cldrData(what): return os.path.join(roo...
# # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.relpath(os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir))) return os.path.normpath(os.path.join(os.path.dirnam...
# # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)) def cldrData(what): return os.path.join(root(), "data", "c...
<commit_before># # Jasy - JavaScript Tooling Refined # Copyright 2010 Sebastian Werner # import os, sys def root(): """ Returns the root path of Jasy """ return os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)) def cldrData(what): return os.path.join(roo...
8d85db01b7582aa93c3b9871cb199277fae87d53
remote-scripts/BVT-VERIFY-HOSTNAME.py
remote-scripts/BVT-VERIFY-HOSTNAME.py
#!/usr/bin/python from azuremodules import * import argparse import sys import time #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specified then stop exp...
#!/usr/bin/python from azuremodules import * import argparse import sys import time import re #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specified the...
Add fqdn verification to BVT
Add fqdn verification to BVT
Python
apache-2.0
FreeBSDonHyper-V/azure-freebsd-automation,v-sirebb/azure-linux-automation,konkasoftci/azure-linux-automation,Nidylei/azure-linux-automation,Nidylei/azure-linux-automation,hglkrijger/azure-linux-automation,v-sirebb/azure-linux-automation,v-sirebb/azure-linux-automation,iamshital/azure-linux-automation,konkasoftci/azure-...
#!/usr/bin/python from azuremodules import * import argparse import sys import time #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specified then stop exp...
#!/usr/bin/python from azuremodules import * import argparse import sys import time import re #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specified the...
<commit_before>#!/usr/bin/python from azuremodules import * import argparse import sys import time #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specifie...
#!/usr/bin/python from azuremodules import * import argparse import sys import time import re #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specified the...
#!/usr/bin/python from azuremodules import * import argparse import sys import time #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specified then stop exp...
<commit_before>#!/usr/bin/python from azuremodules import * import argparse import sys import time #for error checking parser = argparse.ArgumentParser() parser.add_argument('-e', '--expected', help='specify expected hostname', required=True) args = parser.parse_args() #if no value specifie...
707cb1aca7c37ece417e070f5d22146c1f36ab10
modules/botModule.py
modules/botModule.py
from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False listen_for_reac...
from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False listen_for_reac...
Fix bug in admin_module checking
Fix bug in admin_module checking
Python
mit
suclearnub/scubot
from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False listen_for_reac...
from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False listen_for_reac...
<commit_before>from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False ...
from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False listen_for_reac...
from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False listen_for_reac...
<commit_before>from tinydb import TinyDB, Query class BotModule: name = '' # name of your module description = '' # description of its function help_text = '' # help text for explaining how to do things trigger_string = '' # string to listen for as trigger has_background_loop = False ...
862f877cdcdef7aa4a853b2cce8eed2d7ba95fdc
providers/org/cogprints/apps.py
providers/org/cogprints/apps.py
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/oai2'
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/oai2' emitt...
Update cogprints to emit preprints
Update cogprints to emit preprints
Python
apache-2.0
aaxelb/SHARE,CenterForOpenScience/SHARE,CenterForOpenScience/SHARE,zamattiac/SHARE,laurenbarker/SHARE,laurenbarker/SHARE,aaxelb/SHARE,zamattiac/SHARE,aaxelb/SHARE,zamattiac/SHARE,laurenbarker/SHARE,CenterForOpenScience/SHARE
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/oai2' Update co...
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/oai2' emitt...
<commit_before>from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/...
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/oai2' emitt...
from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/oai2' Update co...
<commit_before>from share.provider import OAIProviderAppConfig class AppConfig(OAIProviderAppConfig): name = 'providers.org.cogprints' version = '0.0.1' title = 'cogprints' long_title = 'Cognitive Sciences ePrint Archive' home_page = 'http://www.cogprints.org/' url = 'http://cogprints.org/cgi/...
55fd840b06c5481ff5e3171dba1ef98d973f0747
nlppln/wfgenerator.py
nlppln/wfgenerator.py
from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self): WFGenerator.__init__(self, steps_dir=CWL_PATH) def save(self, fname, inline=True, relative=False, validate=True, encoding='utf-8'): """Sav...
from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self, working_dir=None, copy_steps=True): WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir, copy_steps=copy_steps) ...
Add working_dir and copy_steps options
Add working_dir and copy_steps options
Python
apache-2.0
WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln
from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self): WFGenerator.__init__(self, steps_dir=CWL_PATH) def save(self, fname, inline=True, relative=False, validate=True, encoding='utf-8'): """Sav...
from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self, working_dir=None, copy_steps=True): WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir, copy_steps=copy_steps) ...
<commit_before>from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self): WFGenerator.__init__(self, steps_dir=CWL_PATH) def save(self, fname, inline=True, relative=False, validate=True, encoding='utf-8'):...
from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self, working_dir=None, copy_steps=True): WFGenerator.__init__(self, steps_dir=CWL_PATH, working_dir=working_dir, copy_steps=copy_steps) ...
from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self): WFGenerator.__init__(self, steps_dir=CWL_PATH) def save(self, fname, inline=True, relative=False, validate=True, encoding='utf-8'): """Sav...
<commit_before>from scriptcwl import WorkflowGenerator as WFGenerator from .utils import CWL_PATH class WorkflowGenerator(WFGenerator): def __init__(self): WFGenerator.__init__(self, steps_dir=CWL_PATH) def save(self, fname, inline=True, relative=False, validate=True, encoding='utf-8'):...
f114e5ecf62a5a08c22e1db23e891abe066b61f8
oneflow/core/forms.py
oneflow/core/forms.py
# -*- coding: utf-8 -*- import logging #from django import forms #from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserCreationForm(Use...
# -*- coding: utf-8 -*- import logging from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserCreationForm(forms.ModelForm): """ Like the django UserCreationForm, ...
Make the FullUserCreationForm work on a fresh database which doesn't have Django's auth_user table.
Make the FullUserCreationForm work on a fresh database which doesn't have Django's auth_user table.
Python
agpl-3.0
1flow/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow
# -*- coding: utf-8 -*- import logging #from django import forms #from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserCreationForm(Use...
# -*- coding: utf-8 -*- import logging from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserCreationForm(forms.ModelForm): """ Like the django UserCreationForm, ...
<commit_before># -*- coding: utf-8 -*- import logging #from django import forms #from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserC...
# -*- coding: utf-8 -*- import logging from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserCreationForm(forms.ModelForm): """ Like the django UserCreationForm, ...
# -*- coding: utf-8 -*- import logging #from django import forms #from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserCreationForm(Use...
<commit_before># -*- coding: utf-8 -*- import logging #from django import forms #from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import get_user_model LOGGER = logging.getLogger(__name__) User = get_user_model() class FullUserC...
c684dbb999ac622d5bba266d39e2dd7e69265393
yunity/api/utils.py
yunity/api/utils.py
from django.http import JsonResponse class ApiBase(object): STATUS_ERROR = 0 STATUS_SUCCESS = 1 STATUS_WARNING = 2 def json_response(self, data=None, status=STATUS_SUCCESS, message=None): status_code = 400 if status == ApiBase.STATUS_ERROR else 200 return JsonResponse({ ...
from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(cls, error, stat...
Refactor json_response to more BDD methods
Refactor json_response to more BDD methods
Python
agpl-3.0
yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend
from django.http import JsonResponse class ApiBase(object): STATUS_ERROR = 0 STATUS_SUCCESS = 1 STATUS_WARNING = 2 def json_response(self, data=None, status=STATUS_SUCCESS, message=None): status_code = 400 if status == ApiBase.STATUS_ERROR else 200 return JsonResponse({ ...
from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(cls, error, stat...
<commit_before>from django.http import JsonResponse class ApiBase(object): STATUS_ERROR = 0 STATUS_SUCCESS = 1 STATUS_WARNING = 2 def json_response(self, data=None, status=STATUS_SUCCESS, message=None): status_code = 400 if status == ApiBase.STATUS_ERROR else 200 return JsonRespons...
from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(cls, error, stat...
from django.http import JsonResponse class ApiBase(object): STATUS_ERROR = 0 STATUS_SUCCESS = 1 STATUS_WARNING = 2 def json_response(self, data=None, status=STATUS_SUCCESS, message=None): status_code = 400 if status == ApiBase.STATUS_ERROR else 200 return JsonResponse({ ...
<commit_before>from django.http import JsonResponse class ApiBase(object): STATUS_ERROR = 0 STATUS_SUCCESS = 1 STATUS_WARNING = 2 def json_response(self, data=None, status=STATUS_SUCCESS, message=None): status_code = 400 if status == ApiBase.STATUS_ERROR else 200 return JsonRespons...
6977b25faacc4714363fe0cddf7ae436e74595ac
fmn/rules/koschei.py
fmn/rules/koschei.py
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message when package's ...
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message when package's ...
Work with broken Koschei rules
Work with broken Koschei rules Messages sent in the morning of 2015-09-25 were missing the groups field. Deal with that not existing. Example messages: - 2015-eebf137e-cc22-48c2-87f0-7d736950f76b - 2015-2a5361ec-9c36-438a-8233-709e9f006003 Signed-off-by: Patrick Uiterwijk <bd6d5394796bee9cca2245486eb583fd64b70226@re...
Python
lgpl-2.1
jeremycline/fmn,fedora-infra/fmn.rules,jeremycline/fmn,jeremycline/fmn
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message when package's ...
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message when package's ...
<commit_before>from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message ...
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message when package's ...
from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message when package's ...
<commit_before>from fmn.lib.hinting import hint, prefixed as _ @hint(topics=[_('koschei.package.state.change')]) def koschei_package_state_change(config, message): """ Continuous integration state changes for a package (koschei) `Koschei <https://apps.fedoraproject.org/koschei/>`_ publishes this message ...
dbb223d64d1058e34c35867dcca2665766d0edbf
synapse/tests/test_config.py
synapse/tests/test_config.py
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
Update test to ensure that default configuration values are available via getConfOpt
Update test to ensure that default configuration values are available via getConfOpt
Python
apache-2.0
vertexproject/synapse,vertexproject/synapse,vertexproject/synapse,vivisect/synapse
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
<commit_before>from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ) ...
<commit_before>from synapse.tests.common import * import synapse.lib.config as s_config class ConfTest(SynTest): def test_conf_base(self): defs = ( ('fooval',{'type':'int','doc':'what is foo val?','defval':99}), ('enabled',{'type':'bool','doc':'is thing enabled?','defval':0}), ...
876cfd11bf57101ca7774e0f003855ab7603bfba
dh/thirdparty/__init__.py
dh/thirdparty/__init__.py
""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github.com/tartley/co...
""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github.com/tartley/co...
Remove package transitions in documentation
Remove package transitions in documentation
Python
mit
dhaase-de/dh-python-dh,dhaase-de/dh-python-dh
""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github.com/tartley/co...
""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github.com/tartley/co...
<commit_before>""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github...
""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github.com/tartley/co...
""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github.com/tartley/co...
<commit_before>""" Third-party modules which are essential and must always available. For maximum compatibility, these modules should be pure Python without non-standard dependencies. List of current modules: * atomicwrites-1.1.5 (https://github.com/untitaker/python-atomicwrites) * colorama-0.3.9 (https://github...
62b177e0a0fd7adbabe72d04befff566f05e9a74
scudcloud/notifier.py
scudcloud/notifier.py
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.icon = icon ...
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError, ValueError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.i...
Allow ValueError as a notify exception
Allow ValueError as a notify exception
Python
mit
raelgc/scudcloud,raelgc/scudcloud,raelgc/scudcloud
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.icon = icon ...
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError, ValueError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.i...
<commit_before>from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): sel...
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError, ValueError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.i...
from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): self.icon = icon ...
<commit_before>from dbus.exceptions import DBusException try: import gi gi.require_version('Notify', '0.7') from gi.repository import Notify except (ImportError, AttributeError): from scudcloud import notify2 Notify = None class Notifier(object): def __init__(self, app_name, icon): sel...
c8429ec00772455c981ebb799f0c87de55bda64e
django_fixmystreet/backoffice/forms.py
django_fixmystreet/backoffice/forms.py
from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session class ManagersChoiceField (forms.field...
from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session from django.contrib.auth.decorators imp...
Fix user not defined error for not logged in users
Fix user not defined error for not logged in users
Python
agpl-3.0
IMIO/django-fixmystreet,IMIO/django-fixmystreet,IMIO/django-fixmystreet,IMIO/django-fixmystreet
from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session class ManagersChoiceField (forms.field...
from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session from django.contrib.auth.decorators imp...
<commit_before>from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session class ManagersChoiceFie...
from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session from django.contrib.auth.decorators imp...
from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session class ManagersChoiceField (forms.field...
<commit_before>from django import forms from django_fixmystreet.fixmystreet.models import FMSUser, getLoggedInUserId from django.contrib.auth.models import User from django.conf import settings from django.utils.translation import ugettext_lazy from django.contrib.sessions.models import Session class ManagersChoiceFie...
87b6f69fe53e0425dd5321fcecb613f31887c746
recipyCommon/libraryversions.py
recipyCommon/libraryversions.py
import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] if modulename i...
import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] if modulename i...
Add explicit (rather than broad/general) exceptions in get_version
Add explicit (rather than broad/general) exceptions in get_version
Python
apache-2.0
recipy/recipy,recipy/recipy
import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] if modulename i...
import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] if modulename i...
<commit_before>import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] ...
import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] if modulename i...
import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] if modulename i...
<commit_before>import sys import warnings def get_version(modulename): "Return a string containing the module name and the library version." version = '?' # Get the root module name (in case we have something like `recipy.open` # or `matplotlib.pyplot`) modulename = modulename.split('.')[0] ...
cdf046191942e490bc0392994373218aef4076e2
slash_bot/config.py
slash_bot/config.py
# coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = ":" PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", } MODULES = { ...
# coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = "," PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", } MODULES = { ...
Fix silly prefix change on this branch so that it won't affect master again
Fix silly prefix change on this branch so that it won't affect master again
Python
mit
naoey/slash-bot,naoey/slash-bot
# coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = ":" PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", } MODULES = { ...
# coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = "," PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", } MODULES = { ...
<commit_before># coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = ":" PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", }...
# coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = "," PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", } MODULES = { ...
# coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = ":" PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", } MODULES = { ...
<commit_before># coding: utf-8 """ Created on 2016-08-23 @author: naoey """ VERSION = "0.0.3" BOT_PREFIX = ":" PATHS = { "logs_dir": "./../logs/", "database": "./../slash_bot.db", "discord_creds": "./../private/discord.json", "rito_creds": "./../private/rito.json", "assets": "./../assets/", }...
f9f9f385e4f425da0537680ba6afd2ce81bfb774
rembed/test/integration_test.py
rembed/test/integration_test.py
from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): consumer = REmbedConsumer() embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))
from rembed import consumer from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))
Fix import in integration test
Fix import in integration test
Python
mit
tino/pyembed,pyembed/pyembed,pyembed/pyembed
from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): consumer = REmbedConsumer() embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))Fix import in integration test
from rembed import consumer from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))
<commit_before>from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): consumer = REmbedConsumer() embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))<commit_msg>Fix impo...
from rembed import consumer from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))
from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): consumer = REmbedConsumer() embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))Fix import in integration testfrom ...
<commit_before>from hamcrest import * import pytest @pytest.mark.xfail def test_should_get_correct_embedding(): consumer = REmbedConsumer() embedding = consumer.embed('https://twitter.com/BarackObama/status/266031293945503744') assert_that(embedding, contains_string('Four more years.'))<commit_msg>Fix impo...
7278be28410c111280d4ccb566842419979843d3
mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py
mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random t...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Cre...
Use an actually random transcript; update stats immediately
Use an actually random transcript; update stats immediately
Python
mit
WGBH/FixIt,WGBH/FixIt,WGBH/FixIt
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random t...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Cre...
<commit_before>import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) class Command(BaseCommand): help = 'Creates random votes for 5 phrase...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) from ...tasks import update_transcript_stats class Command(BaseCommand): help = 'Cre...
import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) class Command(BaseCommand): help = 'Creates random votes for 5 phrases in a random t...
<commit_before>import random from django.core.management.base import BaseCommand from django.contrib.auth.models import User from mla_game.apps.accounts.models import Profile from ...models import ( Transcript, TranscriptPhraseDownvote ) class Command(BaseCommand): help = 'Creates random votes for 5 phrase...
80b05e0cd3d73529d37843d398857289d5717e44
wagtail/tests/migrations/0005_auto_20141113_0642.py
wagtail/tests/migrations/0005_auto_20141113_0642.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( model_name='formfield', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0002_initial_data'), ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( ...
Add dependency on wagtailcore migration 0002 (necessary to cleanly merge the other migration 0005 being added in 0.9)
Add dependency on wagtailcore migration 0002 (necessary to cleanly merge the other migration 0005 being added in 0.9)
Python
bsd-3-clause
rsalmaso/wagtail,mikedingjan/wagtail,Toshakins/wagtail,dresiu/wagtail,nilnvoid/wagtail,iansprice/wagtail,kurtw/wagtail,takeflight/wagtail,thenewguy/wagtail,dresiu/wagtail,nutztherookie/wagtail,thenewguy/wagtail,mikedingjan/wagtail,mixxorz/wagtail,takeflight/wagtail,torchbox/wagtail,JoshBarr/wagtail,nealtodd/wagtail,jor...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( model_name='formfield', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0002_initial_data'), ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( model_name='formfield...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0002_initial_data'), ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( model_name='formfield', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tests', '0004_auto_20141008_0420'), ] operations = [ migrations.AlterField( model_name='formfield...
79928051b481f9e19b45c8eebcf8ae2ff229b342
opps/boxes/models.py
opps/boxes/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox """ from django.db.models import get_model model = g...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
Fix OPPS_APPS, get object_name in dropdawn
Fix OPPS_APPS, get object_name in dropdawn
Python
mit
YACOWS/opps,YACOWS/opps,jeanmask/opps,opps/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox """ from django.db.models import get_model model = g...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox """ from django.db.models import get_...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox """ from django.db.models import get_model model = g...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox """ from django.db.models import get_...
d2be94715baa7e5b8e9af11dbeb48635e3eafea7
fluent_contents/plugins/text/models.py
fluent_contents/plugins/text/models.py
from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import clean_html, sani...
from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import clean_html, sani...
Fix cache clearing with TextItem plugins
Fix cache clearing with TextItem plugins
Python
apache-2.0
jpotterm/django-fluent-contents,pombredanne/django-fluent-contents,pombredanne/django-fluent-contents,django-fluent/django-fluent-contents,django-fluent/django-fluent-contents,pombredanne/django-fluent-contents,ixc/django-fluent-contents,ixc/django-fluent-contents,edoburu/django-fluent-contents,ixc/django-fluent-conten...
from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import clean_html, sani...
from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import clean_html, sani...
<commit_before>from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import c...
from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import clean_html, sani...
from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import clean_html, sani...
<commit_before>from django.db import models from django.utils.html import strip_tags from django.utils.text import truncate_words from django.utils.translation import ugettext_lazy as _ from fluent_contents.models import ContentItem from fluent_contents.plugins.text import appsettings from django_wysiwyg.utils import c...
8f36430e6fc17485b422ed5e620de4b156101623
polyaxon_client/stores/stores/local_store.py
polyaxon_client/stores/stores/local_store.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import Store class LocalStore(Store): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ # pylint:disa...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import BaseStore class LocalStore(BaseStore): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ # pyl...
Update local store base class
Update local store base class
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import Store class LocalStore(Store): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ # pylint:disa...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import BaseStore class LocalStore(BaseStore): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ # pyl...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import Store class LocalStore(Store): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import BaseStore class LocalStore(BaseStore): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ # pyl...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import Store class LocalStore(Store): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ # pylint:disa...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_client.stores.stores.base_store import Store class LocalStore(Store): """ Local filesystem store. This store is noop store since all data is accessible through the filesystem. """ ...
72895ee2d0064cbf3a44545fd2645680b8669989
foliant/gdrive.py
foliant/gdrive.py
import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.CreateFile({ ...
import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.CreateFile({ ...
Add another empty line between imports and def.
Gdrive: Add another empty line between imports and def.
Python
mit
foliant-docs/foliant
import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.CreateFile({ ...
import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.CreateFile({ ...
<commit_before>import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.Create...
import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.CreateFile({ ...
import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.CreateFile({ ...
<commit_before>import os.path import webbrowser import pydrive.auth, pydrive.drive def upload(document): """Upload .docx file to Google Drive and return a web view link to it.""" auth = pydrive.auth.GoogleAuth() auth.CommandLineAuth() gdrive = pydrive.drive.GoogleDrive(auth) gdoc = gdrive.Create...
7048366af948773b6badfb1f3611f9e4c694e810
code/dataplot.py
code/dataplot.py
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length of a streamline...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length of a streamline...
Create commandline options for the clampval
Create commandline options for the clampval
Python
mit
TAdeJong/plasma-analysis,TAdeJong/plasma-analysis
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length of a streamline...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length of a streamline...
<commit_before>import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length ...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length of a streamline...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length of a streamline...
<commit_before>import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys def loadCudaStream(name): """ reads the file specified by name into a numpy array (and removes the superfluous fourth bit from cuda's float4) np.shape(data)=(N,3) where N is the length ...
a3a34026369391837d31d7424e78de207b98340d
preferences/views.py
preferences/views.py
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicdata.models.peopl...
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from tot.utils import get_current_people from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import Per...
Use new util function for getting current people
Use new util function for getting current people
Python
mit
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicdata.models.peopl...
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from tot.utils import get_current_people from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import Per...
<commit_before>from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicda...
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from tot.utils import get_current_people from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import Per...
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicdata.models.peopl...
<commit_before>from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicda...
21858e2137d3b15089c5d036cd99d4a3be4e3dbe
python/sanitytest.py
python/sanitytest.py
#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes assert("virConnect" in globals) assert("virDomain" in globals) assert("virDomainSnapshot" in globals) assert("virInterface" in globals) assert("virNWFilter" in globals) assert("virNodeD...
#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes for clsname in ["virConnect", "virDomain", "virDomainSnapshot", "virInterface", "virNWFilter", "virNodeDe...
Check if classes are derived from object
Check if classes are derived from object This makes sure we don't regress to old style classes
Python
lgpl-2.1
trainstack/libvirt,siboulet/libvirt-openvz,elmarco/libvirt,crobinso/libvirt,eskultety/libvirt,crobinso/libvirt,shugaoye/libvirt,libvirt/libvirt,fabianfreyer/libvirt,iam-TJ/libvirt,eskultety/libvirt,olafhering/libvirt,shugaoye/libvirt,shugaoye/libvirt,rlaager/libvirt,cbosdo/libvirt,rlaager/libvirt,nertpinx/libvirt,andre...
#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes assert("virConnect" in globals) assert("virDomain" in globals) assert("virDomainSnapshot" in globals) assert("virInterface" in globals) assert("virNWFilter" in globals) assert("virNodeD...
#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes for clsname in ["virConnect", "virDomain", "virDomainSnapshot", "virInterface", "virNWFilter", "virNodeDe...
<commit_before>#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes assert("virConnect" in globals) assert("virDomain" in globals) assert("virDomainSnapshot" in globals) assert("virInterface" in globals) assert("virNWFilter" in globals) a...
#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes for clsname in ["virConnect", "virDomain", "virDomainSnapshot", "virInterface", "virNWFilter", "virNodeDe...
#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes assert("virConnect" in globals) assert("virDomain" in globals) assert("virDomainSnapshot" in globals) assert("virInterface" in globals) assert("virNWFilter" in globals) assert("virNodeD...
<commit_before>#!/usr/bin/python import libvirt globals = dir(libvirt) # Sanity test that the generator hasn't gone wrong # Look for core classes assert("virConnect" in globals) assert("virDomain" in globals) assert("virDomainSnapshot" in globals) assert("virInterface" in globals) assert("virNWFilter" in globals) a...
2d018f4cff87f5f94e949d36201edd83019c336d
rabbitpy/__init__.py
rabbitpy/__init__.py
""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, record): ...
""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, record): ...
Add Channel and the convenience exchange classes
Add Channel and the convenience exchange classes
Python
bsd-3-clause
gmr/rabbitpy,jonahbull/rabbitpy,gmr/rabbitpy
""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, record): ...
""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, record): ...
<commit_before>""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, recor...
""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, record): ...
""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, record): ...
<commit_before>""" rabbitpy, a pythonic RabbitMQ client """ __version__ = '0.14.0' version = __version__ DEBUG = False import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): """Python 2.6 does not have a NullHandler""" def emit(self, recor...
d4cb09e9ffa645c97976c524a3d084172f091a16
p560m/subarray_sum.py
p560m/subarray_sum.py
from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n if s - k in sum_count: ans +=...
from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n ans += sum_count[s - k] sum_count...
Update p560m subarray sum in Python
Update p560m subarray sum in Python
Python
mit
l33tdaima/l33tdaima,l33tdaima/l33tdaima,l33tdaima/l33tdaima,l33tdaima/l33tdaima,l33tdaima/l33tdaima
from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n if s - k in sum_count: ans +=...
from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n ans += sum_count[s - k] sum_count...
<commit_before>from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n if s - k in sum_count: ...
from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n ans += sum_count[s - k] sum_count...
from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n if s - k in sum_count: ans +=...
<commit_before>from typing import List from collections import defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: sum_count = defaultdict(int) sum_count[0] = 1 s, ans = 0, 0 for n in nums: s += n if s - k in sum_count: ...
ffd39111a7b76e2cdec4e27501d0f5bfaba269d9
actor/app_logging.py
actor/app_logging.py
import errno import os import logging def _mkdir_p(path): try: os.mkdir(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def log_file_handler(app_name, log_level, log_dir): app_log_dir = os.path.join(log_d...
import errno import os import logging def _mkdir_p(path): ab_path = path if not os.path.isabs(ab_path): curr_dir = os.getcwd() ab_path = os.path.join(curr_dir, path) try: os.makedirs(ab_path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(ab_path)...
Fix logging bug: mkdir -> makedirs.
Fix logging bug: mkdir -> makedirs.
Python
mit
cqumirrors/actor
import errno import os import logging def _mkdir_p(path): try: os.mkdir(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def log_file_handler(app_name, log_level, log_dir): app_log_dir = os.path.join(log_d...
import errno import os import logging def _mkdir_p(path): ab_path = path if not os.path.isabs(ab_path): curr_dir = os.getcwd() ab_path = os.path.join(curr_dir, path) try: os.makedirs(ab_path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(ab_path)...
<commit_before>import errno import os import logging def _mkdir_p(path): try: os.mkdir(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def log_file_handler(app_name, log_level, log_dir): app_log_dir = os....
import errno import os import logging def _mkdir_p(path): ab_path = path if not os.path.isabs(ab_path): curr_dir = os.getcwd() ab_path = os.path.join(curr_dir, path) try: os.makedirs(ab_path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(ab_path)...
import errno import os import logging def _mkdir_p(path): try: os.mkdir(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def log_file_handler(app_name, log_level, log_dir): app_log_dir = os.path.join(log_d...
<commit_before>import errno import os import logging def _mkdir_p(path): try: os.mkdir(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def log_file_handler(app_name, log_level, log_dir): app_log_dir = os....
9877bf47e3cd11070bac6377ea734ca20ff364ba
testing/python/setup_plan.py
testing/python/setup_plan.py
def test_show_fixtures_and_test(testdir): p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-plan", p) assert result.ret == 0 result.stdout...
def test_show_fixtures_and_test(testdir): """ Verifies that fixtures are not executed. """ p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-pl...
Improve commenting for setupplan unittest.
Improve commenting for setupplan unittest.
Python
mit
etataurov/pytest,pytest-dev/pytest,hpk42/pytest,skylarjhdownes/pytest,rmfitzpatrick/pytest,jaraco/pytest,MichaelAquilina/pytest,tomviner/pytest,ddboline/pytest,Akasurde/pytest,nicoddemus/pytest,The-Compiler/pytest,tgoodlet/pytest,hackebrot/pytest,nicoddemus/pytest,tareqalayan/pytest,txomon/pytest,eli-b/pytest,markshao/...
def test_show_fixtures_and_test(testdir): p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-plan", p) assert result.ret == 0 result.stdout...
def test_show_fixtures_and_test(testdir): """ Verifies that fixtures are not executed. """ p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-pl...
<commit_before>def test_show_fixtures_and_test(testdir): p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-plan", p) assert result.ret == 0 ...
def test_show_fixtures_and_test(testdir): """ Verifies that fixtures are not executed. """ p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-pl...
def test_show_fixtures_and_test(testdir): p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-plan", p) assert result.ret == 0 result.stdout...
<commit_before>def test_show_fixtures_and_test(testdir): p = testdir.makepyfile(''' import pytest @pytest.fixture def arg(): assert False def test_arg(arg): assert False ''') result = testdir.runpytest("--setup-plan", p) assert result.ret == 0 ...