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
bcd009c442e42065ba1de313f4892c1a57642daa
TeleinfoParser.py
TeleinfoParser.py
#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2', 'ADIR3' ] de...
#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2', 'ADIR3' ] de...
Fix incorrect checksum verification when checksum is 32 (0x20, space)
Fix incorrect checksum verification when checksum is 32 (0x20, space)
Python
mit
pyrou/UDPTeleinfoServer
#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2', 'ADIR3' ] de...
#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2', 'ADIR3' ] de...
<commit_before>#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2',...
#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2', 'ADIR3' ] de...
#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2', 'ADIR3' ] de...
<commit_before>#!/usr/bin/env python class TeleinfoParser: integerKeys = [ 'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM', 'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR', 'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX', 'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2',...
ca96de4c3fdd788833e3f343de2c711c5bf6e40f
packages/dcos-integration-test/extra/get_test_group.py
packages/dcos-integration-test/extra/get_test_group.py
""" Usage: $ python test_group_name.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_group(group_name...
""" Usage: $ python get_test_group.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_group(group_name:...
Fix usage comment to refer to the correct filename
Fix usage comment to refer to the correct filename
Python
apache-2.0
mesosphere-mergebot/dcos,dcos/dcos,GoelDeepak/dcos,mesosphere-mergebot/mergebot-test-dcos,dcos/dcos,kensipe/dcos,mesosphere-mergebot/mergebot-test-dcos,dcos/dcos,mesosphere-mergebot/dcos,kensipe/dcos,GoelDeepak/dcos,GoelDeepak/dcos,kensipe/dcos,kensipe/dcos,dcos/dcos,mesosphere-mergebot/dcos,mesosphere-mergebot/dcos,me...
""" Usage: $ python test_group_name.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_group(group_name...
""" Usage: $ python get_test_group.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_group(group_name:...
<commit_before>""" Usage: $ python test_group_name.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_g...
""" Usage: $ python get_test_group.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_group(group_name:...
""" Usage: $ python test_group_name.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_group(group_name...
<commit_before>""" Usage: $ python test_group_name.py group_1 test_foo.py test_bar.py::TestClass $ This is used by CI to run only a certain set of tests on a particular builder. See ``test_groups.yaml`` for details. """ import yaml from pathlib import Path from typing import List import click def patterns_from_g...
fbad1649e9939a3be4194e0d508ff5889f48bb6f
unleash/plugins/utils_assign.py
unleash/plugins/utils_assign.py
import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. :param data: Source to search in. ...
from unleash.exc import PluginError import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. ...
Raise PluginErrors instead of ValueErrors in versions.
Raise PluginErrors instead of ValueErrors in versions.
Python
mit
mbr/unleash
import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. :param data: Source to search in. ...
from unleash.exc import PluginError import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. ...
<commit_before>import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. :param data: Source to...
from unleash.exc import PluginError import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. ...
import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. :param data: Source to search in. ...
<commit_before>import re # regular expression for finding assignments _quotes = "['|\"|\"\"\"]" BASE_ASSIGN_PATTERN = r'({}\s*=\s*[ubr]?' + _quotes + r')(.*?)(' +\ _quotes + r')' def find_assign(data, varname): """Finds a substring that looks like an assignment. :param data: Source to...
f339af2e48f0e485f13d368dad47f541264c4f58
web/processors/user.py
web/processors/user.py
from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aambassadors = Use...
from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aambassadors = Use...
Sort listed ambassadors by date_joined
Sort listed ambassadors by date_joined
Python
mit
ercchy/coding-events,michelesr/coding-events,joseihf/coding-events,ioana-chiorean/coding-events,joseihf/coding-events,codeeu/coding-events,michelesr/coding-events,joseihf/coding-events,ercchy/coding-events,codeeu/coding-events,ercchy/coding-events,michelesr/coding-events,ioana-chiorean/coding-events,codeeu/coding-event...
from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aambassadors = Use...
from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aambassadors = Use...
<commit_before>from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aam...
from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aambassadors = Use...
from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aambassadors = Use...
<commit_before>from django.contrib.auth.models import User from django_countries import countries def get_user(user_id): user = User.objects.get(id=user_id) return user def get_user_profile(user_id): user = User.objects.get(id=user_id) return user.profile def get_ambassadors(): ambassadors = [] aam...
bb2234447039df6bee80842749b0ecdb19fb62fc
aerende/models.py
aerende/models.py
import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id self.title = ...
import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id self.title = ...
Remove duplicate tags during init
Remove duplicate tags during init
Python
mit
Autophagy/aerende
import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id self.title = ...
import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id self.title = ...
<commit_before>import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id ...
import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id self.title = ...
import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id self.title = ...
<commit_before>import uuid class Note(object): """ A note. Currently has a title, tags, texr and a priority.""" def __init__(self, title, tags, text, priority=1, unique_id=None): if unique_id is None: self.id = str(uuid.uuid4()) else: self.id = unique_id ...
83919e74b7d20688811a4f782d4fccaf3bc3c055
comics/comics/hijinksensue.py
comics/comics/hijinksensue.py
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" class Crawler(CrawlerBase): ...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" active = False class Crawl...
Update "HijiNKS Ensue" after feed change
Update "HijiNKS Ensue" after feed change
Python
agpl-3.0
datagutten/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,jodal/comics
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" class Crawler(CrawlerBase): ...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" active = False class Crawl...
<commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" class Crawler(C...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" active = False class Crawl...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" class Crawler(CrawlerBase): ...
<commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "HijiNKS Ensue" language = "en" url = "http://hijinksensue.com/" start_date = "2007-05-11" rights = "Joel Watson" class Crawler(C...
7e025a5fa40d5f7ba5721ad01951ad2020ed2485
phoxpy/tests/test_client.py
phoxpy/tests/test_client.py
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.tests.lisserver import MockHttpSession class Ses...
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.server import MockHttpSession, SimpleLISServer ...
Update tests for new environment.
Update tests for new environment.
Python
bsd-3-clause
kxepal/phoxpy
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.tests.lisserver import MockHttpSession class Ses...
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.server import MockHttpSession, SimpleLISServer ...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.tests.lisserver import MockHttpSes...
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.server import MockHttpSession, SimpleLISServer ...
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.tests.lisserver import MockHttpSession class Ses...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2011 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import unittest from phoxpy import client from phoxpy.tests.lisserver import MockHttpSes...
20b13d500ea1cfa4b06413f0f02114bed60ca98f
apps/challenges/auth.py
apps/challenges/auth.py
OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This backend doesn't pr...
OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This backend doesn't pr...
Remove 'is_live' from draft visibility check.
Remove 'is_live' from draft visibility check.
Python
bsd-3-clause
mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite
OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This backend doesn't pr...
OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This backend doesn't pr...
<commit_before>OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This bac...
OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This backend doesn't pr...
OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This backend doesn't pr...
<commit_before>OWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']] class SubmissionBackend(object): """Provide custom permission logic for submissions.""" supports_object_permissions = True supports_anonymous_user = True def authenticate(self): """This bac...
ba4c2dc22aae5dd4f862aad7c388eecf36acfbd8
app/main/forms.py
app/main/forms.py
from flask_wtf import Form from wtforms.validators import DataRequired, Email from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ DataRequired(message="Email can not be empty"), Email(message="P...
from flask_wtf import Form from wtforms import validators from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ validators.DataRequired(message="Email can not be empty"), validators.Email(message...
Change import to indicate function of imported classes
Change import to indicate function of imported classes
Python
mit
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend
from flask_wtf import Form from wtforms.validators import DataRequired, Email from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ DataRequired(message="Email can not be empty"), Email(message="P...
from flask_wtf import Form from wtforms import validators from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ validators.DataRequired(message="Email can not be empty"), validators.Email(message...
<commit_before>from flask_wtf import Form from wtforms.validators import DataRequired, Email from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ DataRequired(message="Email can not be empty"), E...
from flask_wtf import Form from wtforms import validators from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ validators.DataRequired(message="Email can not be empty"), validators.Email(message...
from flask_wtf import Form from wtforms.validators import DataRequired, Email from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ DataRequired(message="Email can not be empty"), Email(message="P...
<commit_before>from flask_wtf import Form from wtforms.validators import DataRequired, Email from dmutils.forms import StripWhitespaceStringField class EmailAddressForm(Form): email_address = StripWhitespaceStringField('Email address', validators=[ DataRequired(message="Email can not be empty"), E...
b167b1c8099dc184c366416dab9a7c6e5be7423a
api/base/exceptions.py
api/base/exceptions.py
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
Handle cases where there are multiple values for a field.
Handle cases where there are multiple values for a field.
Python
apache-2.0
Ghalko/osf.io,caneruguz/osf.io,felliott/osf.io,binoculars/osf.io,icereval/osf.io,ticklemepierce/osf.io,caneruguz/osf.io,mattclark/osf.io,brianjgeiger/osf.io,HalcyonChimera/osf.io,brandonPurvis/osf.io,laurenrevere/osf.io,aaxelb/osf.io,MerlinZhang/osf.io,caseyrygt/osf.io,doublebits/osf.io,Nesiehr/osf.io,kch8qx/osf.io,acs...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest...
b9f6939ea0569ecd54141cbee064a3f15fcf1937
arrow/api.py
arrow/api.py
# -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*args, **kwargs): ...
# -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*args, **kwargs): ...
Fix typo in reference ":class:`ArrowFactory <...>"
Fix typo in reference ":class:`ArrowFactory <...>"
Python
apache-2.0
crsmithdev/arrow
# -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*args, **kwargs): ...
# -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*args, **kwargs): ...
<commit_before># -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*ar...
# -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*args, **kwargs): ...
# -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*args, **kwargs): ...
<commit_before># -*- coding: utf-8 -*- ''' Provides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>` methods for use as a module API. ''' from __future__ import absolute_import from arrow.factory import ArrowFactory # internal default factory. _factory = ArrowFactory() def get(*ar...
0155ed7c37fd4cafa2650911d4f902a3a8982761
test/test_bot.py
test/test_bot.py
import re import unittest from gather.bot import ListenerBot class TestGatherBot(unittest.TestCase): def test_register(self): bot = ListenerBot() self.assertEqual({}, bot.actions) regex = r'^test' action = unittest.mock.Mock() bot.register_action(regex, action) self...
import asyncio import re import unittest from unittest import mock from gather.bot import ListenerBot def async_test(f): # http://stackoverflow.com/a/23036785/304210 def wrapper(*args, **kwargs): coro = asyncio.coroutine(f) future = coro(*args, **kwargs) loop = asyncio.get_event_loop()...
Add a test for on_message
Add a test for on_message
Python
mit
veryhappythings/discord-gather
import re import unittest from gather.bot import ListenerBot class TestGatherBot(unittest.TestCase): def test_register(self): bot = ListenerBot() self.assertEqual({}, bot.actions) regex = r'^test' action = unittest.mock.Mock() bot.register_action(regex, action) self...
import asyncio import re import unittest from unittest import mock from gather.bot import ListenerBot def async_test(f): # http://stackoverflow.com/a/23036785/304210 def wrapper(*args, **kwargs): coro = asyncio.coroutine(f) future = coro(*args, **kwargs) loop = asyncio.get_event_loop()...
<commit_before>import re import unittest from gather.bot import ListenerBot class TestGatherBot(unittest.TestCase): def test_register(self): bot = ListenerBot() self.assertEqual({}, bot.actions) regex = r'^test' action = unittest.mock.Mock() bot.register_action(regex, actio...
import asyncio import re import unittest from unittest import mock from gather.bot import ListenerBot def async_test(f): # http://stackoverflow.com/a/23036785/304210 def wrapper(*args, **kwargs): coro = asyncio.coroutine(f) future = coro(*args, **kwargs) loop = asyncio.get_event_loop()...
import re import unittest from gather.bot import ListenerBot class TestGatherBot(unittest.TestCase): def test_register(self): bot = ListenerBot() self.assertEqual({}, bot.actions) regex = r'^test' action = unittest.mock.Mock() bot.register_action(regex, action) self...
<commit_before>import re import unittest from gather.bot import ListenerBot class TestGatherBot(unittest.TestCase): def test_register(self): bot = ListenerBot() self.assertEqual({}, bot.actions) regex = r'^test' action = unittest.mock.Mock() bot.register_action(regex, actio...
158f1101c3c13db5df916329a66517c7bb85e132
plata/context_processors.py
plata/context_processors.py
import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``plata.price_inclu...
import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``plata.price_inclu...
Add current value for price_includes_tax to context
Add current value for price_includes_tax to context
Python
bsd-3-clause
armicron/plata,armicron/plata,armicron/plata
import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``plata.price_inclu...
import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``plata.price_inclu...
<commit_before>import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``pl...
import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``plata.price_inclu...
import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``plata.price_inclu...
<commit_before>import plata def plata_context(request): """ Adds a few variables from Plata to the context if they are available: * ``plata.shop``: The current :class:`plata.shop.views.Shop` instance * ``plata.order``: The current order * ``plata.contact``: The current contact instance * ``pl...
22c7da6d3de76cf6c36b4206f204a9ee979ba5f7
strides/graphs.py
strides/graphs.py
import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys import os.path figdir = "figures" df = pd.read_csv(sys.stdin, " ", header=None, index_col=0, names=[2**(i) for i in range(6)]+["rand"]) print(df) #print(df["X2"]/2**df.index) df.plot(logy=True) plt....
import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys df = pd.read_csv(sys.stdin, " ", header=None, index_col=0) print(df) print(df["X2"]/2**df.index) df.plot(logy=True) plt.savefig("graph.pdf")
Add perelement figures write figures into subdirectory
Add perelement figures write figures into subdirectory
Python
bsd-3-clause
jpfairbanks/cse6140,jpfairbanks/cse6140,jpfairbanks/cse6140
import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys import os.path figdir = "figures" df = pd.read_csv(sys.stdin, " ", header=None, index_col=0, names=[2**(i) for i in range(6)]+["rand"]) print(df) #print(df["X2"]/2**df.index) df.plot(logy=True) plt....
import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys df = pd.read_csv(sys.stdin, " ", header=None, index_col=0) print(df) print(df["X2"]/2**df.index) df.plot(logy=True) plt.savefig("graph.pdf")
<commit_before>import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys import os.path figdir = "figures" df = pd.read_csv(sys.stdin, " ", header=None, index_col=0, names=[2**(i) for i in range(6)]+["rand"]) print(df) #print(df["X2"]/2**df.index) df.plot(...
import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys df = pd.read_csv(sys.stdin, " ", header=None, index_col=0) print(df) print(df["X2"]/2**df.index) df.plot(logy=True) plt.savefig("graph.pdf")
import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys import os.path figdir = "figures" df = pd.read_csv(sys.stdin, " ", header=None, index_col=0, names=[2**(i) for i in range(6)]+["rand"]) print(df) #print(df["X2"]/2**df.index) df.plot(logy=True) plt....
<commit_before>import pandas as pd import matplotlib matplotlib.use("pdf") import matplotlib.pyplot as plt import sys import os.path figdir = "figures" df = pd.read_csv(sys.stdin, " ", header=None, index_col=0, names=[2**(i) for i in range(6)]+["rand"]) print(df) #print(df["X2"]/2**df.index) df.plot(...
47e4e74dcf5e2a10f1e231d2fa8af453213e77fb
Lib/test/test_winsound.py
Lib/test/test_winsound.py
# Rediculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!"
# Ridiculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!"
Fix spelling error and remove Windows line endings.
Fix spelling error and remove Windows line endings.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
# Rediculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!" Fix spelling error and remove Windows line endings.
# Ridiculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!"
<commit_before># Rediculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!" <commit_msg>Fix spelling error and remove Windows line endings.<commit_after>
# Ridiculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!"
# Rediculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!" Fix spelling error and remove Windows line endings.# Ridiculously simple test of the winsound module for Windows. im...
<commit_before># Rediculously simple test of the winsound module for Windows. import winsound for i in range(100, 2000, 100): winsound.Beep(i, 75) print "Hopefully you heard some sounds increasing in frequency!" <commit_msg>Fix spelling error and remove Windows line endings.<commit_after># Ridiculously simple tes...
1579eb8d2de5aa49ad7012ab08350659a20725e1
basis/managers.py
basis/managers.py
from django.db import models class BasisModelManager(models.Manager): def get_query_set(self): return super(BasisModelManager, self).get_query_set().filter(deleted=False)
from django.db import models from .compat import DJANGO16 if DJANGO16: class BasisModelManager(models.Manager): def get_queryset(self): return super(BasisModelManager, self).get_queryset().filter(deleted=False) else: class BasisModelManager(models.Manager): def get_query_set(self):...
Fix deprecation warning for get_query_set
Fix deprecation warning for get_query_set get_query_set was renamed get_queryset in django 1.6
Python
mit
frecar/django-basis
from django.db import models class BasisModelManager(models.Manager): def get_query_set(self): return super(BasisModelManager, self).get_query_set().filter(deleted=False) Fix deprecation warning for get_query_set get_query_set was renamed get_queryset in django 1.6
from django.db import models from .compat import DJANGO16 if DJANGO16: class BasisModelManager(models.Manager): def get_queryset(self): return super(BasisModelManager, self).get_queryset().filter(deleted=False) else: class BasisModelManager(models.Manager): def get_query_set(self):...
<commit_before>from django.db import models class BasisModelManager(models.Manager): def get_query_set(self): return super(BasisModelManager, self).get_query_set().filter(deleted=False) <commit_msg>Fix deprecation warning for get_query_set get_query_set was renamed get_queryset in django 1.6<commit_after...
from django.db import models from .compat import DJANGO16 if DJANGO16: class BasisModelManager(models.Manager): def get_queryset(self): return super(BasisModelManager, self).get_queryset().filter(deleted=False) else: class BasisModelManager(models.Manager): def get_query_set(self):...
from django.db import models class BasisModelManager(models.Manager): def get_query_set(self): return super(BasisModelManager, self).get_query_set().filter(deleted=False) Fix deprecation warning for get_query_set get_query_set was renamed get_queryset in django 1.6from django.db import models from .compa...
<commit_before>from django.db import models class BasisModelManager(models.Manager): def get_query_set(self): return super(BasisModelManager, self).get_query_set().filter(deleted=False) <commit_msg>Fix deprecation warning for get_query_set get_query_set was renamed get_queryset in django 1.6<commit_after...
4b000960edc30d9917b80646a0374fb8bf99efcb
storage/tests/testtools.py
storage/tests/testtools.py
""" Test tools for the storage service. """ import unittest from storage.storage import app as storage_app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): storage_app.config['TESTING'] = ...
""" Test tools for the storage service. """ import unittest from storage.storage import app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): app.config['TESTING'] = True app.config...
Remove unnecessary rename on input
Remove unnecessary rename on input
Python
mit
jenca-cloud/jenca-authentication
""" Test tools for the storage service. """ import unittest from storage.storage import app as storage_app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): storage_app.config['TESTING'] = ...
""" Test tools for the storage service. """ import unittest from storage.storage import app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): app.config['TESTING'] = True app.config...
<commit_before>""" Test tools for the storage service. """ import unittest from storage.storage import app as storage_app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): storage_app.confi...
""" Test tools for the storage service. """ import unittest from storage.storage import app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): app.config['TESTING'] = True app.config...
""" Test tools for the storage service. """ import unittest from storage.storage import app as storage_app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): storage_app.config['TESTING'] = ...
<commit_before>""" Test tools for the storage service. """ import unittest from storage.storage import app as storage_app, db class InMemoryStorageTests(unittest.TestCase): """ Set up and tear down an application with an in memory database for testing. """ def setUp(self): storage_app.confi...
505456fed7bdbd6b2cd78eae10b3b64657cd377b
tests/unit/test_commands.py
tests/unit/test_commands.py
import pytest from pip._internal.commands import commands_dict, create_command def test_commands_dict__order(): """ Check the ordering of commands_dict. """ names = list(commands_dict) # A spot-check is sufficient to check that commands_dict encodes an # ordering. assert names[0] == 'inst...
import pytest from pip._internal.cli.req_command import ( IndexGroupCommand, RequirementCommand, SessionCommandMixin, ) from pip._internal.commands import commands_dict, create_command def check_commands(pred, expected): """ Check the commands satisfying a predicate. """ commands = [creat...
Test the command class inheritance for each command.
Test the command class inheritance for each command.
Python
mit
pradyunsg/pip,xavfernandez/pip,pfmoore/pip,rouge8/pip,xavfernandez/pip,pypa/pip,sbidoul/pip,pfmoore/pip,pypa/pip,rouge8/pip,rouge8/pip,pradyunsg/pip,xavfernandez/pip,sbidoul/pip
import pytest from pip._internal.commands import commands_dict, create_command def test_commands_dict__order(): """ Check the ordering of commands_dict. """ names = list(commands_dict) # A spot-check is sufficient to check that commands_dict encodes an # ordering. assert names[0] == 'inst...
import pytest from pip._internal.cli.req_command import ( IndexGroupCommand, RequirementCommand, SessionCommandMixin, ) from pip._internal.commands import commands_dict, create_command def check_commands(pred, expected): """ Check the commands satisfying a predicate. """ commands = [creat...
<commit_before>import pytest from pip._internal.commands import commands_dict, create_command def test_commands_dict__order(): """ Check the ordering of commands_dict. """ names = list(commands_dict) # A spot-check is sufficient to check that commands_dict encodes an # ordering. assert na...
import pytest from pip._internal.cli.req_command import ( IndexGroupCommand, RequirementCommand, SessionCommandMixin, ) from pip._internal.commands import commands_dict, create_command def check_commands(pred, expected): """ Check the commands satisfying a predicate. """ commands = [creat...
import pytest from pip._internal.commands import commands_dict, create_command def test_commands_dict__order(): """ Check the ordering of commands_dict. """ names = list(commands_dict) # A spot-check is sufficient to check that commands_dict encodes an # ordering. assert names[0] == 'inst...
<commit_before>import pytest from pip._internal.commands import commands_dict, create_command def test_commands_dict__order(): """ Check the ordering of commands_dict. """ names = list(commands_dict) # A spot-check is sufficient to check that commands_dict encodes an # ordering. assert na...
e183578b6211d7311d62100ad643cbaf8408de99
tests/__init__.py
tests/__init__.py
import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object(module, main_name, return_value=0): with unittest.mock.patch.object(module, "__name__", "__main__"): with unittest.mock.patch.object(module.sys, "exit") as exit: module.module_...
import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object( module, main_name, return_value=0 ), unittest.mock.patch.object( module, "__name__", "__main__" ), unittest.mock.patch.object( module.sys, "exit" ) as exit: module.mod...
Use multiple context managers on one with statement (thanks Anna)
Use multiple context managers on one with statement (thanks Anna)
Python
mpl-2.0
rfinnie/2ping,rfinnie/2ping
import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object(module, main_name, return_value=0): with unittest.mock.patch.object(module, "__name__", "__main__"): with unittest.mock.patch.object(module.sys, "exit") as exit: module.module_...
import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object( module, main_name, return_value=0 ), unittest.mock.patch.object( module, "__name__", "__main__" ), unittest.mock.patch.object( module.sys, "exit" ) as exit: module.mod...
<commit_before>import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object(module, main_name, return_value=0): with unittest.mock.patch.object(module, "__name__", "__main__"): with unittest.mock.patch.object(module.sys, "exit") as exit: ...
import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object( module, main_name, return_value=0 ), unittest.mock.patch.object( module, "__name__", "__main__" ), unittest.mock.patch.object( module.sys, "exit" ) as exit: module.mod...
import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object(module, main_name, return_value=0): with unittest.mock.patch.object(module, "__name__", "__main__"): with unittest.mock.patch.object(module.sys, "exit") as exit: module.module_...
<commit_before>import unittest.mock def _test_module_init(module, main_name="main"): with unittest.mock.patch.object(module, main_name, return_value=0): with unittest.mock.patch.object(module, "__name__", "__main__"): with unittest.mock.patch.object(module.sys, "exit") as exit: ...
d96e52c346314622afc904a2917416028c6784e3
swampdragon_live/models.py
swampdragon_live/models.py
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): instance_type = ContentType.objects.get_...
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): if ContentType.objects.exists(): ...
Fix initial migration until ContentType is available
Fix initial migration until ContentType is available
Python
mit
mback2k/swampdragon-live,mback2k/swampdragon-live
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): instance_type = ContentType.objects.get_...
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): if ContentType.objects.exists(): ...
<commit_before># -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): instance_type = ContentTy...
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): if ContentType.objects.exists(): ...
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): instance_type = ContentType.objects.get_...
<commit_before># -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from django.db.models.signals import post_save from django.dispatch import receiver from .tasks import push_new_content @receiver(post_save) def post_save_handler(sender, instance, **kwargs): instance_type = ContentTy...
06d98438f9535a0477cdc85acf4c001fa7657b26
qtpy/tests/test_qtopengl.py
qtpy/tests/test_qtopengl.py
import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None assert QtOpen...
import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None assert QtOpen...
Remove commented code and replace by improved comment
Remove commented code and replace by improved comment
Python
mit
spyder-ide/qtpy
import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None assert QtOpen...
import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None assert QtOpen...
<commit_before>import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None ...
import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None assert QtOpen...
import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None assert QtOpen...
<commit_before>import pytest from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 def test_qtopengl(): """Test the qtpy.QtOpenGL namespace""" from qtpy import QtOpenGL assert QtOpenGL.QOpenGLBuffer is not None assert QtOpenGL.QOpenGLContext is not None assert QtOpenGL.QOpenGLContextGroup is not None ...
1c2b6c0daea1d04985ef6ddff35527ba207ec191
qual/tests/test_calendar.py
qual/tests/test_calendar.py
import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self.assertIsNotNon...
import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self.assertIsNotNon...
Check that a certain date is invalid.
Check that a certain date is invalid. This distinguishes correctly between the proleptic Gregorian calendar, and the historical or astronomical calendars, where this date would be valid.
Python
apache-2.0
jwg4/calexicon,jwg4/qual
import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self.assertIsNotNon...
import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self.assertIsNotNon...
<commit_before>import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self...
import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self.assertIsNotNon...
import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self.assertIsNotNon...
<commit_before>import unittest from datetime import date import qual class TestProlepticGregorianCalendar(unittest.TestCase): def setUp(self): self.calendar = qual.ProlepticGregorianCalendar() def check_valid_date(self, year, month, day): d = self.calendar.date(year, month, day) self...
e50655479c0d3a96edd4005f834541889839fca3
binary_to_text.py
binary_to_text.py
#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys def binary_to_text(binary_file, text_file): msg = pb2.NetParameter() with open(binary_file) as f: msg.ParseFromString(f.read()) with open(text_file, "w") as f: f.write(pb2_text.M...
#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys class ParameterTypeException(Exception): pass def binary_to_text(binary_file, text_file, parameter_type): if (parameter_type == "Net"): msg = pb2.NetParameter() elif (parameter_type == "Solver...
Add option to process SolverParameters.
Add option to process SolverParameters.
Python
bsd-3-clause
BeautifulDestinations/dnngraph,BeautifulDestinations/dnngraph
#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys def binary_to_text(binary_file, text_file): msg = pb2.NetParameter() with open(binary_file) as f: msg.ParseFromString(f.read()) with open(text_file, "w") as f: f.write(pb2_text.M...
#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys class ParameterTypeException(Exception): pass def binary_to_text(binary_file, text_file, parameter_type): if (parameter_type == "Net"): msg = pb2.NetParameter() elif (parameter_type == "Solver...
<commit_before>#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys def binary_to_text(binary_file, text_file): msg = pb2.NetParameter() with open(binary_file) as f: msg.ParseFromString(f.read()) with open(text_file, "w") as f: f.w...
#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys class ParameterTypeException(Exception): pass def binary_to_text(binary_file, text_file, parameter_type): if (parameter_type == "Net"): msg = pb2.NetParameter() elif (parameter_type == "Solver...
#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys def binary_to_text(binary_file, text_file): msg = pb2.NetParameter() with open(binary_file) as f: msg.ParseFromString(f.read()) with open(text_file, "w") as f: f.write(pb2_text.M...
<commit_before>#! /usr/bin/env python import Gen.caffe_pb2 as pb2 import google.protobuf.text_format as pb2_text import sys def binary_to_text(binary_file, text_file): msg = pb2.NetParameter() with open(binary_file) as f: msg.ParseFromString(f.read()) with open(text_file, "w") as f: f.w...
86ac48a3dcb71a4e504dcf04e30a00262d168e5f
test/parseJaguar.py
test/parseJaguar.py
import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) os.chdir("eg01") for file in ["dvb_gopt.out"]: t = Jaguar(file) t.parse() print t.moenergies[0,:] print t.homos[0] print t.moenergies[0,t.homos[0]]
import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) files = [ ["eg01","dvb_gopt.out"], ["eg02","dvb_sp.out"], ["eg03","dvb_ir.out"], ["eg06","dvb_un_sp.out"] ] for f in files: t = Jaguar(os.path.join(f[0],f[1])) t.pars...
Test the parsing of all of the uploaded Jaguar files
Test the parsing of all of the uploaded Jaguar files
Python
bsd-3-clause
jchodera/cclib,ben-albrecht/cclib,Schamnad/cclib,cclib/cclib,berquist/cclib,jchodera/cclib,berquist/cclib,gaursagar/cclib,ben-albrecht/cclib,Clyde-fare/cclib,andersx/cclib,berquist/cclib,andersx/cclib,gaursagar/cclib,ATenderholt/cclib,ghutchis/cclib,Schamnad/cclib,cclib/cclib,langner/cclib,cclib/cclib,Clyde-fare/cclib,...
import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) os.chdir("eg01") for file in ["dvb_gopt.out"]: t = Jaguar(file) t.parse() print t.moenergies[0,:] print t.homos[0] print t.moenergies[0,t.homos[0]] Test the parsing of all of the uploaded Jaguar file...
import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) files = [ ["eg01","dvb_gopt.out"], ["eg02","dvb_sp.out"], ["eg03","dvb_ir.out"], ["eg06","dvb_un_sp.out"] ] for f in files: t = Jaguar(os.path.join(f[0],f[1])) t.pars...
<commit_before>import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) os.chdir("eg01") for file in ["dvb_gopt.out"]: t = Jaguar(file) t.parse() print t.moenergies[0,:] print t.homos[0] print t.moenergies[0,t.homos[0]] <commit_msg>Test the parsing of all ...
import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) files = [ ["eg01","dvb_gopt.out"], ["eg02","dvb_sp.out"], ["eg03","dvb_ir.out"], ["eg06","dvb_un_sp.out"] ] for f in files: t = Jaguar(os.path.join(f[0],f[1])) t.pars...
import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) os.chdir("eg01") for file in ["dvb_gopt.out"]: t = Jaguar(file) t.parse() print t.moenergies[0,:] print t.homos[0] print t.moenergies[0,t.homos[0]] Test the parsing of all of the uploaded Jaguar file...
<commit_before>import os from cclib.parser import Jaguar os.chdir(os.path.join("..","data","Jaguar","basicJaguar")) os.chdir("eg01") for file in ["dvb_gopt.out"]: t = Jaguar(file) t.parse() print t.moenergies[0,:] print t.homos[0] print t.moenergies[0,t.homos[0]] <commit_msg>Test the parsing of all ...
651663d2af72f46e7952d2835126f1512741f635
UserInput.py
UserInput.py
"""Like the raw_input built-in, but with bells and whistles.""" import getpass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or default is accepted. Return the input. Arguments: field Descript...
"""Like the input built-in, but with bells and whistles.""" import getpass # Use raw_input for Python 2.x try: input = raw_input except NameError: pass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or def...
Fix for Python 2.6 and Python 3.
Fix for Python 2.6 and Python 3.
Python
mit
vmlaker/coils
"""Like the raw_input built-in, but with bells and whistles.""" import getpass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or default is accepted. Return the input. Arguments: field Descript...
"""Like the input built-in, but with bells and whistles.""" import getpass # Use raw_input for Python 2.x try: input = raw_input except NameError: pass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or def...
<commit_before>"""Like the raw_input built-in, but with bells and whistles.""" import getpass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or default is accepted. Return the input. Arguments: fiel...
"""Like the input built-in, but with bells and whistles.""" import getpass # Use raw_input for Python 2.x try: input = raw_input except NameError: pass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or def...
"""Like the raw_input built-in, but with bells and whistles.""" import getpass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or default is accepted. Return the input. Arguments: field Descript...
<commit_before>"""Like the raw_input built-in, but with bells and whistles.""" import getpass def user_input(field, default='', choices=None, password=False, empty_ok=False, accept=False): """Prompt user for input until a value is retrieved or default is accepted. Return the input. Arguments: fiel...
b503881ae6229bddd7ef65d95f9c38d6d0ad5ec2
chain/functions/relu.py
chain/functions/relu.py
import numpy import pycuda.gpuarray as gpuarray from chain import Function class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): return numpy.maximum(0, x[0]), def forward_gpu(self, x): return gpuarray.maximum(0, x[0]...
import ctypes import libcudnn import numpy import pycuda.gpuarray as gpuarray from chain import Function, cudnn _mode = libcudnn.cudnnActivationMode['CUDNN_ACTIVATION_RELU'] class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): re...
Use CuDNN implementation for ReLU on GPU
Use CuDNN implementation for ReLU on GPU
Python
mit
jnishi/chainer,chainer/chainer,masia02/chainer,truongdq/chainer,umitanuki/chainer,cemoody/chainer,ronekko/chainer,ttakamura/chainer,okuta/chainer,laysakura/chainer,kikusu/chainer,keisuke-umezawa/chainer,hvy/chainer,wavelets/chainer,hvy/chainer,niboshi/chainer,ikasumi/chainer,kashif/chainer,wkentaro/chainer,ysekky/chain...
import numpy import pycuda.gpuarray as gpuarray from chain import Function class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): return numpy.maximum(0, x[0]), def forward_gpu(self, x): return gpuarray.maximum(0, x[0]...
import ctypes import libcudnn import numpy import pycuda.gpuarray as gpuarray from chain import Function, cudnn _mode = libcudnn.cudnnActivationMode['CUDNN_ACTIVATION_RELU'] class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): re...
<commit_before>import numpy import pycuda.gpuarray as gpuarray from chain import Function class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): return numpy.maximum(0, x[0]), def forward_gpu(self, x): return gpuarray....
import ctypes import libcudnn import numpy import pycuda.gpuarray as gpuarray from chain import Function, cudnn _mode = libcudnn.cudnnActivationMode['CUDNN_ACTIVATION_RELU'] class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): re...
import numpy import pycuda.gpuarray as gpuarray from chain import Function class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): return numpy.maximum(0, x[0]), def forward_gpu(self, x): return gpuarray.maximum(0, x[0]...
<commit_before>import numpy import pycuda.gpuarray as gpuarray from chain import Function class ReLU(Function): """Rectified Linear Unit.""" # TODO(beam2d): Implement in-place version. def forward_cpu(self, x): return numpy.maximum(0, x[0]), def forward_gpu(self, x): return gpuarray....
58fc39ae95522ce152b4ff137071f74c5490e14e
chatterbot/constants.py
chatterbot/constants.py
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 ''' The maximum length of characters that the text label of a conversation can contai...
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. The number 255 is used because that is the maximum length of a char field in most databases. This value should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_...
Change statement text max-length to 255
Change statement text max-length to 255
Python
bsd-3-clause
vkosuri/ChatterBot,gunthercox/ChatterBot
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 ''' The maximum length of characters that the text label of a conversation can contai...
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. The number 255 is used because that is the maximum length of a char field in most databases. This value should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_...
<commit_before>""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 ''' The maximum length of characters that the text label of a conversa...
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. The number 255 is used because that is the maximum length of a char field in most databases. This value should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_...
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 ''' The maximum length of characters that the text label of a conversation can contai...
<commit_before>""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 ''' The maximum length of characters that the text label of a conversa...
27021bfa7062219a41ad29c40b97643ecf16f72b
doc/mkapidoc.py
doc/mkapidoc.py
#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(doc_dir) # Gen...
#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(doc_dir) # Gen...
Hide AbstractMethod class from the docs.
Hide AbstractMethod class from the docs.
Python
mit
knipknap/exscript,maximumG/exscript,knipknap/exscript,maximumG/exscript
#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(doc_dir) # Gen...
#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(doc_dir) # Gen...
<commit_before>#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(...
#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(doc_dir) # Gen...
#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(doc_dir) # Gen...
<commit_before>#!/usr/bin/env python # Generates the *public* API documentation. # Remember to hide your private parts, people! import os, re, sys project = 'Exscript' base_dir = os.path.join('..', 'src', project) doc_dir = 'api' # Create the documentation directory. if not os.path.exists(doc_dir): os.makedirs(...
208760340d3314f666d7e6437817cc96e0e16194
organizer/urls/tag.py
organizer/urls/tag.py
from django.conf.urls import url from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', TagCreate.as_view(), name='organizer_tag_create'), url(r'^(?P<slug...
from django.conf.urls import url from django.contrib.auth.decorators import \ login_required from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', login_required...
Use login_required decorator in URL pattern.
Ch20: Use login_required decorator in URL pattern.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.conf.urls import url from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', TagCreate.as_view(), name='organizer_tag_create'), url(r'^(?P<slug...
from django.conf.urls import url from django.contrib.auth.decorators import \ login_required from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', login_required...
<commit_before>from django.conf.urls import url from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', TagCreate.as_view(), name='organizer_tag_create'), ...
from django.conf.urls import url from django.contrib.auth.decorators import \ login_required from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', login_required...
from django.conf.urls import url from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', TagCreate.as_view(), name='organizer_tag_create'), url(r'^(?P<slug...
<commit_before>from django.conf.urls import url from ..views import ( TagCreate, TagDelete, TagDetail, TagList, TagUpdate) urlpatterns = [ url(r'^$', TagList.as_view(), name='organizer_tag_list'), url(r'^create/$', TagCreate.as_view(), name='organizer_tag_create'), ...
1f253c5bdf90055ff2d00a3b8d18c152c3b7031f
versions.py
versions.py
#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False return '.'.join(res...
#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False return '.'.join(res...
Check for Python 2.7 as well
Check for Python 2.7 as well
Python
bsd-3-clause
hugoxia/pika,vrtsystems/pika,vitaly-krugl/pika,fkarb/pika-python3,Tarsbot/pika,Zephor5/pika,zixiliuyue/pika,renshawbay/pika-python3,reddec/pika,jstnlef/pika,skftn/pika,pika/pika,shinji-s/pika,knowsis/pika,benjamin9999/pika
#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False return '.'.join(res...
#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False return '.'.join(res...
<commit_before>#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False retu...
#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False return '.'.join(res...
#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False return '.'.join(res...
<commit_before>#!/usr/bin/env python import os import warnings warnings.filterwarnings('ignore', category=DeprecationWarning) def test_for_version(filename): stdin, stdout = os.popen4('%s -V' % filename, 'r') response = stdout.read() if response.find('command not found') > 0: return False retu...
539bd8a9df362f285bda375732ec71b3df1bcaae
orbeon_xml_api/tests/test_runner.py
orbeon_xml_api/tests/test_runner.py
from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner.xml') self.buil...
from xmlunittest import XmlTestCase from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase, XmlTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/da...
Add Runner unit-tests: constructor with validation.
Add Runner unit-tests: constructor with validation.
Python
mit
bobslee/orbeon-xml-api
from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner.xml') self.buil...
from xmlunittest import XmlTestCase from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase, XmlTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/da...
<commit_before>from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner.xml') ...
from xmlunittest import XmlTestCase from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase, XmlTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/da...
from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner.xml') self.buil...
<commit_before>from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner.xml') ...
cde7dbd5a1bb83e85e15559120189d108f6f66aa
tortilla/utils.py
tortilla/utils.py
# -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTHON__", False) ...
# -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTHON__", False) ...
Fix super() call for python <= 3.2
Fix super() call for python <= 3.2
Python
mit
redodo/tortilla
# -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTHON__", False) ...
# -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTHON__", False) ...
<commit_before># -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTH...
# -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTHON__", False) ...
# -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTHON__", False) ...
<commit_before># -*- coding: utf-8 -*- import six from formats import FormatBank, discover_json, discover_yaml formats = FormatBank() discover_json(formats, content_type='application/json') discover_yaml(formats, content_type='application/x-yaml') def run_from_ipython(): return getattr(__builtins__, "__IPYTH...
0de0818e5a0c52dde8c841d8e8254e2f4a3f9633
app/sense.py
app/sense.py
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display self.lo...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.25 class Handler: def __init__(self, display, logger, sensor): self.display = display self.l...
Allow PiSense readings to be toggled on/off
Allow PiSense readings to be toggled on/off
Python
mit
gizmo-cda/g2x,thelonious/g2x,thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display self.lo...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.25 class Handler: def __init__(self, display, logger, sensor): self.display = display self.l...
<commit_before>#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display ...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.25 class Handler: def __init__(self, display, logger, sensor): self.display = display self.l...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display self.lo...
<commit_before>#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display ...
990f4f3ec850525ac4fcb78b33031b60dbe25ce4
versebot/verse.py
versebot/verse.py
""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with book, chapter, v...
""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with book, chapter, v...
Remove spaces and set to lowercase
Remove spaces and set to lowercase
Python
mit
Matthew-Arnold/slack-versebot,Matthew-Arnold/slack-versebot
""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with book, chapter, v...
""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with book, chapter, v...
<commit_before>""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with b...
""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with book, chapter, v...
""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with book, chapter, v...
<commit_before>""" VerseBot for reddit By Matthieu Grieger verse.py Copyright (c) 2015 Matthieu Grieger (MIT License) """ class Verse: """ Class that holds the properties and methods of a Verse object. """ def __init__(self, book, chapter, verse, translation): """ Initializes a Verse object with b...
fd87d09b03be003dcd13d778c175f796c4fdf7d6
test_http2_server.py
test_http2_server.py
from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert 'This is a very ...
from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert 'This is a very ...
Change directory test to look for link, rather than just file name
Change directory test to look for link, rather than just file name
Python
mit
jwarren116/network-tools,jwarren116/network-tools
from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert 'This is a very ...
from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert 'This is a very ...
<commit_before>from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert '...
from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert 'This is a very ...
from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert 'This is a very ...
<commit_before>from echo_client import client def test_ok(): response = client('GET a_web_page.html HTTP/1.1').split('\r\n') first_line = response[0] assert first_line == 'HTTP/1.1 200 OK' def test_body(): response = client('GET sample.txt HTTP/1.1').split('\r\n') body = response[4] assert '...
e94f2cb6dd144cec7b10aecb29669e7ba2ef98b1
chatterbot/__init__.py
chatterbot/__init__.py
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.0' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', )
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.1' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', )
Update release version to 0.6.1
Update release version to 0.6.1
Python
bsd-3-clause
gunthercox/ChatterBot,vkosuri/ChatterBot
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.0' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', ) Update release version to 0.6.1
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.1' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', )
<commit_before>""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.0' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', ) <commit_msg>Update release version...
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.1' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', )
""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.0' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', ) Update release version to 0.6.1""" ChatterBot is ...
<commit_before>""" ChatterBot is a machine learning, conversational dialog engine. """ from .chatterbot import ChatBot __version__ = '0.6.0' __author__ = 'Gunther Cox' __email__ = '[email protected]' __url__ = 'https://github.com/gunthercox/ChatterBot' __all__ = ( 'ChatBot', ) <commit_msg>Update release version...
666d9c999ebf0cc388d8f045a04756424c2d9b62
gdemo/util.py
gdemo/util.py
"""Share utility functions.""" from urllib import parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/')
"""Share utility functions.""" try: from urllib import parse except ImportError: import urllib as parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/')
Make it work for Python 2
Make it work for Python 2 Gabbi is designed to work with both Python 2.7 and 3.4.
Python
apache-2.0
cdent/gabbi-demo,cdent/gabbi-demo
"""Share utility functions.""" from urllib import parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/') Make it work for Python 2 Gabbi is designed to work with both Python 2.7 and 3.4.
"""Share utility functions.""" try: from urllib import parse except ImportError: import urllib as parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/')
<commit_before>"""Share utility functions.""" from urllib import parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/') <commit_msg>Make it work for Python 2 Gabbi is designed to work with both Python 2.7 a...
"""Share utility functions.""" try: from urllib import parse except ImportError: import urllib as parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/')
"""Share utility functions.""" from urllib import parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/') Make it work for Python 2 Gabbi is designed to work with both Python 2.7 and 3.4."""Share utility fun...
<commit_before>"""Share utility functions.""" from urllib import parse def get_route_value(environ, name): value = environ['wsgiorg.routing_args'][1][name] value = parse.unquote(value) return value.replace('%2F', '/') <commit_msg>Make it work for Python 2 Gabbi is designed to work with both Python 2.7 a...
be3cfd7033097bbc073e05c232f702bbcbfbd4db
xgcm/__init__.py
xgcm/__init__.py
from mdsxray import open_mdsdataset from gridops import GCMDataset from regridding import regrid_vertical
from .mdsxray import open_mdsdataset from .gridops import GCMDataset from .regridding import regrid_vertical
Fix the imports for Python 3
Fix the imports for Python 3
Python
mit
rabernat/xmitgcm,xgcm/xmitgcm,sambarluc/xmitgcm,xgcm/xgcm,rabernat/xgcm
from mdsxray import open_mdsdataset from gridops import GCMDataset from regridding import regrid_vertical Fix the imports for Python 3
from .mdsxray import open_mdsdataset from .gridops import GCMDataset from .regridding import regrid_vertical
<commit_before>from mdsxray import open_mdsdataset from gridops import GCMDataset from regridding import regrid_vertical <commit_msg>Fix the imports for Python 3<commit_after>
from .mdsxray import open_mdsdataset from .gridops import GCMDataset from .regridding import regrid_vertical
from mdsxray import open_mdsdataset from gridops import GCMDataset from regridding import regrid_vertical Fix the imports for Python 3from .mdsxray import open_mdsdataset from .gridops import GCMDataset from .regridding import regrid_vertical
<commit_before>from mdsxray import open_mdsdataset from gridops import GCMDataset from regridding import regrid_vertical <commit_msg>Fix the imports for Python 3<commit_after>from .mdsxray import open_mdsdataset from .gridops import GCMDataset from .regridding import regrid_vertical
f60363b3d24d2f4af5ddb894cc1f6494b371b18e
mass_mailing_switzerland/wizards/mailchimp_export_update_wizard.py
mass_mailing_switzerland/wizards/mailchimp_export_update_wizard.py
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # #####################...
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # #####################...
FIX opt_out prevention for mailchimp export
FIX opt_out prevention for mailchimp export
Python
agpl-3.0
CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # #####################...
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # #####################...
<commit_before>############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # ######...
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # #####################...
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # #####################...
<commit_before>############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py # ######...
3ef1531f6934055a416cdddc694f6ca75694d649
voltron/common.py
voltron/common.py
import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }, 'loggers'...
import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }, 'loggers'...
Make use of expanduser() more sane
Make use of expanduser() more sane
Python
mit
snare/voltron,snare/voltron,snare/voltron,snare/voltron
import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }, 'loggers'...
import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }, 'loggers'...
<commit_before>import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }...
import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }, 'loggers'...
import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }, 'loggers'...
<commit_before>import logging import logging.config LOG_CONFIG = { 'version': 1, 'formatters': { 'standard': {'format': 'voltron: [%(levelname)s] %(message)s'} }, 'handlers': { 'default': { 'class': 'logging.StreamHandler', 'formatter': 'standard' } }...
22207247c286ad3c656c3f6b550d869cf92f6e92
fs/sshfs/__init__.py
fs/sshfs/__init__.py
from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS
from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS from ..opener import Opener, registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] def open_fs(self, fs_url, parse_result, writeable, create, cwd): #from .sshfs import SSHFS ...
Add fs Opener based on the builtin FTPFS opener
Add fs Opener based on the builtin FTPFS opener
Python
lgpl-2.1
althonos/fs.sshfs
from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS Add fs Opener based on the builtin FTPFS opener
from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS from ..opener import Opener, registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] def open_fs(self, fs_url, parse_result, writeable, create, cwd): #from .sshfs import SSHFS ...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS <commit_msg>Add fs Opener based on the builtin FTPFS opener<commit_after>
from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS from ..opener import Opener, registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] def open_fs(self, fs_url, parse_result, writeable, create, cwd): #from .sshfs import SSHFS ...
from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS Add fs Opener based on the builtin FTPFS openerfrom __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS from ..opener import Opener, registry @registry.install clas...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS <commit_msg>Add fs Opener based on the builtin FTPFS opener<commit_after>from __future__ import absolute_import from __future__ import unicode_literals from .sshfs import SSHFS from ..opener import ...
d0bf235af3742a17c722488fe3679d5b73a0d945
thinc/neural/_classes/softmax.py
thinc/neural/_classes/softmax.py
from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine): name = 'so...
from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine): name = 'so...
Fix gemm calls in Softmax
Fix gemm calls in Softmax
Python
mit
spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc
from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine): name = 'so...
from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine): name = 'so...
<commit_before>from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine):...
from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine): name = 'so...
from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine): name = 'so...
<commit_before>from .affine import Affine from ... import describe from ...describe import Dimension, Synapses, Biases from ...check import has_shape from ... import check @describe.attributes( W=Synapses("Weights matrix", lambda obj: (obj.nO, obj.nI), lambda W, ops: None) ) class Softmax(Affine):...
246971d8dd7d6c5fdc480c55e4e79ffd7a840b9b
Cura/View/View.py
Cura/View/View.py
#Abstract for all views class View(object): def __init__(self): self._renderer = None
#Abstract for all views class View(object): def __init__(self): self._renderer = None def render(self, glcontext): pass
Add a render method to view that should be reimplemented
Add a render method to view that should be reimplemented
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
#Abstract for all views class View(object): def __init__(self): self._renderer = NoneAdd a render method to view that should be reimplemented
#Abstract for all views class View(object): def __init__(self): self._renderer = None def render(self, glcontext): pass
<commit_before>#Abstract for all views class View(object): def __init__(self): self._renderer = None<commit_msg>Add a render method to view that should be reimplemented<commit_after>
#Abstract for all views class View(object): def __init__(self): self._renderer = None def render(self, glcontext): pass
#Abstract for all views class View(object): def __init__(self): self._renderer = NoneAdd a render method to view that should be reimplemented#Abstract for all views class View(object): def __init__(self): self._renderer = None def render(self, glcontext): pass
<commit_before>#Abstract for all views class View(object): def __init__(self): self._renderer = None<commit_msg>Add a render method to view that should be reimplemented<commit_after>#Abstract for all views class View(object): def __init__(self): self._renderer = None def render(self, glcont...
ca674b743b6d48593f45d999335ae893cf2a90d6
base/config/production.py
base/config/production.py
" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITTER = dict( ...
" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITTER = dict( ...
Add github and facebook oauth credentials.
Add github and facebook oauth credentials.
Python
bsd-3-clause
klen/Flask-Foundation,klen/fquest,klen/tweetchi
" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITTER = dict( ...
" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITTER = dict( ...
<commit_before>" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITT...
" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITTER = dict( ...
" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITTER = dict( ...
<commit_before>" Production settings must be here. " from .core import * from os import path as op SECRET_KEY = 'SecretKeyForSessionSigning' ADMINS = frozenset([MAIL_USERNAME]) # flask.ext.collect # ----------------- COLLECT_STATIC_ROOT = op.join(op.dirname(ROOTDIR), 'static') # auth.oauth # ---------- OAUTH_TWITT...
ac50044c16e2302e7543923d562cca5ba715e311
web/impact/impact/v1/events/base_history_event.py
web/impact/impact/v1/events/base_history_event.py
from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, "description...
from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, "description...
Switch from () to __call__()
[AC-4857] Switch from () to __call__()
Python
mit
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, "description...
from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, "description...
<commit_before>from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, ...
from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, "description...
from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, "description...
<commit_before>from abc import ( ABCMeta, abstractmethod, ) from impact.v1.helpers import ( STRING_FIELD, ) class BaseHistoryEvent(object): __metaclass__ = ABCMeta CLASS_FIELDS = { "event_type": STRING_FIELD, "datetime": STRING_FIELD, "latest_datetime": STRING_FIELD, ...
6722e16aef43f9cfe03e7e76fc578582139721f6
vint/linting/env.py
vint/linting/env.py
import os import os.path import re import logging from pathlib import Path VIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:[\._]g?vimrc|.*\.vim$)' def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file_paths': _get_f...
import os import os.path from pathlib import Path from vint.linting.file_filter import find_vim_script def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file_paths': _get_file_paths(cmdargs) } def _ge...
Split file collecting algorithm to FileFilter
Split file collecting algorithm to FileFilter
Python
mit
Kuniwak/vint,RianFuro/vint,RianFuro/vint,Kuniwak/vint
import os import os.path import re import logging from pathlib import Path VIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:[\._]g?vimrc|.*\.vim$)' def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file_paths': _get_f...
import os import os.path from pathlib import Path from vint.linting.file_filter import find_vim_script def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file_paths': _get_file_paths(cmdargs) } def _ge...
<commit_before>import os import os.path import re import logging from pathlib import Path VIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:[\._]g?vimrc|.*\.vim$)' def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file...
import os import os.path from pathlib import Path from vint.linting.file_filter import find_vim_script def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file_paths': _get_file_paths(cmdargs) } def _ge...
import os import os.path import re import logging from pathlib import Path VIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:[\._]g?vimrc|.*\.vim$)' def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file_paths': _get_f...
<commit_before>import os import os.path import re import logging from pathlib import Path VIM_SCRIPT_FILE_NAME_PATTERNS = r'(?:[\._]g?vimrc|.*\.vim$)' def build_environment(cmdargs): return { 'cmdargs': cmdargs, 'home_path': _get_home_path(cmdargs), 'cwd': _get_cwd(cmdargs), 'file...
ba8e567592c96dacb697e067004dc71799e4e93f
ctypeslib/test/stdio.py
ctypeslib/test/stdio.py
import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif """, persist=False)
import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) _gen_basename = include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif /* Silly comment */ """, persist=...
Store the basename of the generated files, to allow the unittests to clean up in the tearDown method.
Store the basename of the generated files, to allow the unittests to clean up in the tearDown method.
Python
mit
sugarmanz/ctypeslib
import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif """, persist=False) Store the basename of the gene...
import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) _gen_basename = include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif /* Silly comment */ """, persist=...
<commit_before>import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif """, persist=False) <commit_msg>Sto...
import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) _gen_basename = include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif /* Silly comment */ """, persist=...
import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif """, persist=False) Store the basename of the gene...
<commit_before>import os from ctypeslib.dynamic_module import include from ctypes import * if os.name == "nt": _libc = CDLL("msvcrt") else: _libc = CDLL(None) include("""\ #include <stdio.h> #ifdef _MSC_VER # include <fcntl.h> #else # include <sys/fcntl.h> #endif """, persist=False) <commit_msg>Sto...
1ff4dab34d4aa6935d4d1b54aa354882790b9b44
astroquery/astrometry_net/__init__.py
astroquery/astrometry_net/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage> # for docs and...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage> # for docs and...
Add config items for server, timeout
Add config items for server, timeout
Python
bsd-3-clause
imbasimba/astroquery,ceb8/astroquery,ceb8/astroquery,imbasimba/astroquery
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage> # for docs and...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage> # for docs and...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage>...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage> # for docs and...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage> # for docs and...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ <Put Your Tool Name Here> ------------------------- :author: <your name> (<your email>) """ # Make the URL of the server, timeout and other items configurable # See <http://docs.astropy.org/en/latest/config/index.html#developer-usage>...
89e3d4ae0a7be5baef6354324b2e7f8623564c94
examples/olfaction/data/gen_olf_input.py
examples/olfaction/data/gen_olf_input.py
#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in time t = np.arang...
#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in time t = np.arang...
Use 'array' rather than 'real' for data array name in olfactory stimulus generation script.
Use 'array' rather than 'real' for data array name in olfactory stimulus generation script.
Python
bsd-3-clause
cerrno/neurokernel
#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in time t = np.arang...
#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in time t = np.arang...
<commit_before>#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in tim...
#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in time t = np.arang...
#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in time t = np.arang...
<commit_before>#!/usr/bin/env python """ Generate sample olfactory model stimulus. """ import numpy as np import h5py osn_num = 1375 dt = 1e-4 # time step Ot = 2000 # number of data point during reset period Rt = 1000 # number of data point during odor delivery period Nt = 4*Ot + 3*Rt # number of data points in tim...
87753b0bff057b61879e2dbcc4dceba7aec95451
settings/const.py
settings/const.py
import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = True #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepteerd" auth_handl...
import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = False #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepteerd" auth_hand...
Disable pool generation by default
Disable pool generation by default
Python
bsd-2-clause
bliksemlabs/bliksemintegration,bliksemlabs/bliksemintegration
import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = True #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepteerd" auth_handl...
import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = False #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepteerd" auth_hand...
<commit_before>import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = True #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepte...
import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = False #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepteerd" auth_hand...
import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = True #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepteerd" auth_handl...
<commit_before>import urllib2 #Database settings database_connect = "dbname='ridprod'" kv1_database_connect = "dbname='kv1tmp'" iff_database_connect = "dbname='ifftmp'" pool_generation_enabled = True #NDOVLoket settings ndovloket_url = "data.ndovloket.nl" ndovloket_user = "voorwaarden" ndovloket_password = "geaccepte...
9aa17b90b8f3413f0621cc25a686774dd809dc84
frigg/projects/serializers.py
frigg/projects/serializers.py
from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class ProjectSerializer(serializers.ModelSerializer): builds = BuildInlineSerializer(read_only=True, many=True) class Meta: model = Project fields = ( 'i...
from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class EnvironmentVariableSerializer(serializers.ModelSerializer): def to_representation(self, instance): representation = super().to_representation(instance) if instance...
Add drf serializer for environment variables
feat: Add drf serializer for environment variables
Python
mit
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class ProjectSerializer(serializers.ModelSerializer): builds = BuildInlineSerializer(read_only=True, many=True) class Meta: model = Project fields = ( 'i...
from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class EnvironmentVariableSerializer(serializers.ModelSerializer): def to_representation(self, instance): representation = super().to_representation(instance) if instance...
<commit_before>from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class ProjectSerializer(serializers.ModelSerializer): builds = BuildInlineSerializer(read_only=True, many=True) class Meta: model = Project fields = (...
from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class EnvironmentVariableSerializer(serializers.ModelSerializer): def to_representation(self, instance): representation = super().to_representation(instance) if instance...
from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class ProjectSerializer(serializers.ModelSerializer): builds = BuildInlineSerializer(read_only=True, many=True) class Meta: model = Project fields = ( 'i...
<commit_before>from rest_framework import serializers from frigg.builds.serializers import BuildInlineSerializer from .models import Project class ProjectSerializer(serializers.ModelSerializer): builds = BuildInlineSerializer(read_only=True, many=True) class Meta: model = Project fields = (...
85537b6bee3efdd1862726a7e68bd79f693ecd4f
tornado_menumaker/helper/Page.py
tornado_menumaker/helper/Page.py
#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def __init__(self, u...
#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def __init__(self, u...
Make still class available when decorating class with @page
Make still class available when decorating class with @page
Python
agpl-3.0
tornado-utils/tornado-menumaker
#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def __init__(self, u...
#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def __init__(self, u...
<commit_before>#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def _...
#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def __init__(self, u...
#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def __init__(self, u...
<commit_before>#!/usr/bin/python # -*- encoding: utf-8 -*- """ """ import inspect from tornado.web import Application from .Route import Route from .Index import IndexRoute __author__ = 'Martin Martimeo <[email protected]>' __date__ = '16.06.13 - 23:46' class Page(Route): """ A Page """ def _...
4bcf35efcfc751a1c337fdcf50d23d9d06549717
demo/apps/catalogue/models.py
demo/apps/catalogue/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ user oscars category as a wagtail Page. this works becuase they both use treebeard """ name = models.CharField( verbose_name=_('name')...
from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ The Oscars Category as a Wagtail Page This works because they both use Treebeard """ name = models.CharField( verbose_name=_('name'), ...
Fix typo in doc string
Fix typo in doc string
Python
mit
pgovers/oscar-wagtail-demo,pgovers/oscar-wagtail-demo
from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ user oscars category as a wagtail Page. this works becuase they both use treebeard """ name = models.CharField( verbose_name=_('name')...
from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ The Oscars Category as a Wagtail Page This works because they both use Treebeard """ name = models.CharField( verbose_name=_('name'), ...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ user oscars category as a wagtail Page. this works becuase they both use treebeard """ name = models.CharField( verbose...
from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ The Oscars Category as a Wagtail Page This works because they both use Treebeard """ name = models.CharField( verbose_name=_('name'), ...
from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ user oscars category as a wagtail Page. this works becuase they both use treebeard """ name = models.CharField( verbose_name=_('name')...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailcore.models import Page class Category(Page): """ user oscars category as a wagtail Page. this works becuase they both use treebeard """ name = models.CharField( verbose...
0a69133e44810dd0469555f62ec49eba120e6ecc
apps/storybase/utils.py
apps/storybase/utils.py
"""Shared utility functions""" from django.template.defaultfilters import slugify as django_slugify def slugify(value): """ Normalizes string, converts to lowercase, removes non-alpha characters, converts spaces to hyphens, and truncates to 50 characters. """ slug = django_slugify(value) slug ...
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(settings.L...
Add utility function to convert a language code to a its full name
Add utility function to convert a language code to a its full name
Python
mit
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
"""Shared utility functions""" from django.template.defaultfilters import slugify as django_slugify def slugify(value): """ Normalizes string, converts to lowercase, removes non-alpha characters, converts spaces to hyphens, and truncates to 50 characters. """ slug = django_slugify(value) slug ...
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(settings.L...
<commit_before>"""Shared utility functions""" from django.template.defaultfilters import slugify as django_slugify def slugify(value): """ Normalizes string, converts to lowercase, removes non-alpha characters, converts spaces to hyphens, and truncates to 50 characters. """ slug = django_slugify(v...
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(settings.L...
"""Shared utility functions""" from django.template.defaultfilters import slugify as django_slugify def slugify(value): """ Normalizes string, converts to lowercase, removes non-alpha characters, converts spaces to hyphens, and truncates to 50 characters. """ slug = django_slugify(value) slug ...
<commit_before>"""Shared utility functions""" from django.template.defaultfilters import slugify as django_slugify def slugify(value): """ Normalizes string, converts to lowercase, removes non-alpha characters, converts spaces to hyphens, and truncates to 50 characters. """ slug = django_slugify(v...
62b1c49c67c72c36d4177c657df49a4700586c06
djangoTemplate/urls.py
djangoTemplate/urls.py
"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')), url('', ...
"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')), url('', ...
Change the url patters from python_social_auth to social_django
Change the url patters from python_social_auth to social_django
Python
mit
tosp/djangoTemplate,tosp/djangoTemplate
"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')), url('', ...
"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')), url('', ...
<commit_before>"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')...
"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')), url('', ...
"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')), url('', ...
<commit_before>"""djangoTemplate URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url('', include('base.urls')...
62f4c6b7d24176284054b13c4e1e9b6d631c7b42
basicTest.py
basicTest.py
import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) screen = slither.se...
import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) screen = slither.se...
Update basic test Now uses the new format by @BookOwl.
Update basic test Now uses the new format by @BookOwl.
Python
mit
PySlither/Slither,PySlither/Slither
import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) screen = slither.se...
import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) screen = slither.se...
<commit_before>import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) scre...
import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) screen = slither.se...
import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) screen = slither.se...
<commit_before>import slither, pygame, time snakey = slither.Sprite() snakey.setCostumeByName("costume0") SoExcited = slither.Sprite() SoExcited.addCostume("SoExcited.png", "avatar") SoExcited.setCostumeByNumber(0) SoExcited.goTo(300, 300) SoExcited.setScaleTo(0.33) slither.slitherStage.setColor(40, 222, 40) scre...
385f190d782c7d2edbba8b425db2418e6891ea86
framework/mongo/__init__.py
framework/mongo/__init__.py
# -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals import api_globals...
# -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals import api_globals...
Consolidate hasattr + getter to single statement with default value.
Consolidate hasattr + getter to single statement with default value.
Python
apache-2.0
kch8qx/osf.io,aaxelb/osf.io,chrisseto/osf.io,baylee-d/osf.io,billyhunt/osf.io,acshi/osf.io,SSJohns/osf.io,kwierman/osf.io,emetsger/osf.io,icereval/osf.io,DanielSBrown/osf.io,mattclark/osf.io,njantrania/osf.io,jmcarp/osf.io,HalcyonChimera/osf.io,emetsger/osf.io,Nesiehr/osf.io,bdyetton/prettychart,doublebits/osf.io,lynds...
# -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals import api_globals...
# -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals import api_globals...
<commit_before># -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals imp...
# -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals import api_globals...
# -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals import api_globals...
<commit_before># -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals imp...
890190f40b9061f7bfa15bbd7e56abc0f1b7d44a
redmapper/__init__.py
redmapper/__init__.py
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
Make fitters available at main import level.
Make fitters available at main import level.
Python
apache-2.0
erykoff/redmapper,erykoff/redmapper
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
<commit_before>from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redseq...
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
<commit_before>from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redseq...
aa8234d1e6b4916e6945468a2bc5772df2d53e28
bot/admin.py
bot/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', 'las...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', 'las...
Add Discord Admin for debugging.
Add Discord Admin for debugging.
Python
apache-2.0
ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server,ItsCalebJones/SpaceLaunchNow-Server
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', 'las...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', 'las...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', 'las...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', 'las...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', ...
e9fbd541b3fcb84c6d2de9ba1de53886730a67fa
common.py
common.py
import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir
import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir def get_yourproject_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir
Add new changes to th branch
Add new changes to th branch
Python
mit
nvthanh1/Skypybot
import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dirAdd new changes to th branch
import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir def get_yourproject_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir
<commit_before>import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir<commit_msg>Add new changes to th branch<commit_after>
import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir def get_yourproject_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir
import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dirAdd new changes to th branchimport os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir def get_yourproject_path(): root_dir = os.path.abspath(os.path.di...
<commit_before>import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir<commit_msg>Add new changes to th branch<commit_after>import os def get_project_path(): root_dir = os.path.abspath(os.path.dirname(__file__)) return root_dir def get_yourproject_path(): ...
42a54411634ef395ca3c2dfbfeefd7cea2d55101
auth0plus/exceptions.py
auth0plus/exceptions.py
try: from auth0.v2.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = message def ...
try: from auth0.v3.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = message def ...
Update to v3 of the auth0 client for the exception handling
Update to v3 of the auth0 client for the exception handling
Python
isc
bretth/auth0plus
try: from auth0.v2.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = message def ...
try: from auth0.v3.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = message def ...
<commit_before> try: from auth0.v2.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = messag...
try: from auth0.v3.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = message def ...
try: from auth0.v2.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = message def ...
<commit_before> try: from auth0.v2.exceptions import Auth0Error except ImportError: # pragma: no cover class Auth0Error(Exception): def __init__(self, status_code, error_code, message): self.status_code = status_code self.error_code = error_code self.message = messag...
53ad3866b8dfbd012748e4ad7d7ed7025d491bd0
src/alexa-main.py
src/alexa-main.py
import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): if event['session']['new']: events.on_session_started({'requestId': event['request']['requestId']}, event['session']) request...
import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): # Make sure only this Alexa skill can use this function if event['session']['application']['applicationId'] != APPLICATION_ID: raise ValueError("Invalid Applica...
REVERT remove application id validation
REVERT remove application id validation
Python
mit
mauriceyap/ccm-assistant
import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): if event['session']['new']: events.on_session_started({'requestId': event['request']['requestId']}, event['session']) request...
import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): # Make sure only this Alexa skill can use this function if event['session']['application']['applicationId'] != APPLICATION_ID: raise ValueError("Invalid Applica...
<commit_before>import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): if event['session']['new']: events.on_session_started({'requestId': event['request']['requestId']}, event['session'...
import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): # Make sure only this Alexa skill can use this function if event['session']['application']['applicationId'] != APPLICATION_ID: raise ValueError("Invalid Applica...
import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): if event['session']['new']: events.on_session_started({'requestId': event['request']['requestId']}, event['session']) request...
<commit_before>import handlers.events as events APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" def lambda_handler(event, context): if event['session']['new']: events.on_session_started({'requestId': event['request']['requestId']}, event['session'...
5cd674ec764be72bb3e94c0b56fdf733a4a1c885
Discord/utilities/errors.py
Discord/utilities/errors.py
from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class NotPermittedVoice...
from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class NotPermittedVoice...
Remove Audio Already Done error
[Discord] Remove Audio Already Done error
Python
mit
Harmon758/Harmonbot,Harmon758/Harmonbot
from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class NotPermittedVoice...
from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class NotPermittedVoice...
<commit_before> from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class No...
from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class NotPermittedVoice...
from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class NotPermittedVoice...
<commit_before> from discord.ext.commands.errors import CommandError class NotServerOwner(CommandError): '''Not Server Owner''' pass class VoiceNotConnected(CommandError): '''Voice Not Connected''' pass class PermittedVoiceNotConnected(VoiceNotConnected): '''Permitted, but Voice Not Connected''' pass class No...
737d069c57c3cb2d6305f8e5d1f7d88402ef1327
go/apps/jsbox/definition.py
go/apps/jsbox/definition.py
import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(ConversationDefinition...
import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(ConversationDefinition...
Add support for v2 endpoints in config.
Add support for v2 endpoints in config.
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(ConversationDefinition...
import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(ConversationDefinition...
<commit_before>import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(Convers...
import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(ConversationDefinition...
import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(ConversationDefinition...
<commit_before>import json from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class ViewLogsAction(ConversationAction): action_name = 'view_logs' action_display_name = 'View Sandbox Logs' redirect_to = 'jsbox_logs' class ConversationDefinition(Convers...
c97e5cf11fc21e2ef4ee04779a424e4d6a2b96ae
tools/perf/metrics/__init__.py
tools/perf/metrics/__init__.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of measuring somethin...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of measuring somethin...
Add CustomizeBrowserOptions method to Metric base class
Add CustomizeBrowserOptions method to Metric base class BUG=271177 Review URL: https://chromiumcodereview.appspot.com/22938004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@217198 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
mogoweb/chromium-crosswalk,Just-D/chromium-1,M4sse/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,M4sse/chr...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of measuring somethin...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of measuring somethin...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of mea...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of measuring somethin...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of measuring somethin...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Metric(object): """Base class for all the metrics that are used by telemetry measurements. The Metric class represents a way of mea...
f9c7a911411429972929bb4372b370192bd4cf8a
altair/examples/interactive_layered_crossfilter.py
altair/examples/interactive_layered_crossfilter.py
""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega_datasets impor...
""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega_datasets impor...
Update crossfilter to gray/blue scheme
Update crossfilter to gray/blue scheme Same as in https://vega.github.io/editor/#/examples/vega-lite/interactive_layered_crossfilter
Python
bsd-3-clause
altair-viz/altair,jakevdp/altair
""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega_datasets impor...
""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega_datasets impor...
<commit_before>""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega...
""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega_datasets impor...
""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega_datasets impor...
<commit_before>""" Interactive Crossfilter ======================= This example shows a multi-panel view of the same data, where you can interactively select a portion of the data in any of the panels to highlight that portion in any of the other panels. """ # category: interactive charts import altair as alt from vega...
6064db3000f2aeec66a775345d22b8a2b421497f
astropy/utils/tests/test_gzip.py
astropy/utils/tests/test_gzip.py
import io import os from ...tests.helper import pytest from .. import gzip def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8')
import io import os from ...tests.helper import pytest from .. import gzip pytestmark = pytest.mark.skipif("sys.version_info < (3,0)") def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8')
Fix gzip test for Python 2.6
Fix gzip test for Python 2.6
Python
bsd-3-clause
tbabej/astropy,bsipocz/astropy,lpsinger/astropy,MSeifert04/astropy,StuartLittlefair/astropy,larrybradley/astropy,DougBurke/astropy,stargaser/astropy,pllim/astropy,stargaser/astropy,MSeifert04/astropy,tbabej/astropy,lpsinger/astropy,joergdietrich/astropy,astropy/astropy,joergdietrich/astropy,dhomeier/astropy,kelle/astro...
import io import os from ...tests.helper import pytest from .. import gzip def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8') Fix gzip test for Python 2.6
import io import os from ...tests.helper import pytest from .. import gzip pytestmark = pytest.mark.skipif("sys.version_info < (3,0)") def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8')
<commit_before>import io import os from ...tests.helper import pytest from .. import gzip def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8') <commit_msg>Fix gzip test for Python 2.6<commit_after>
import io import os from ...tests.helper import pytest from .. import gzip pytestmark = pytest.mark.skipif("sys.version_info < (3,0)") def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8')
import io import os from ...tests.helper import pytest from .. import gzip def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8') Fix gzip test for Python 2.6import io import os from ...tests.helper import pytest from .. import gzip pytestmark...
<commit_before>import io import os from ...tests.helper import pytest from .. import gzip def test_gzip(tmpdir): fd = gzip.GzipFile(str(tmpdir.join("test.gz")), 'wb') fd = io.TextIOWrapper(fd, encoding='utf8') <commit_msg>Fix gzip test for Python 2.6<commit_after>import io import os from ...tests.helper impo...
6797c9b705b0cfd5c770f68695402baf044510ff
utils/training_utils/params.py
utils/training_utils/params.py
# Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 1000 # Number of mini-batch SGD steps after which an evaluat...
# Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 900 # Number of mini-batch SGD steps after which an evaluati...
Change default value of checkpoint frequency
Change default value of checkpoint frequency The default values of evaluation and checkpoint frequency are the same, and they are approximately equal to the number of steps in each epoch.
Python
mit
harpribot/representation-music,harpribot/representation-music
# Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 1000 # Number of mini-batch SGD steps after which an evaluat...
# Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 900 # Number of mini-batch SGD steps after which an evaluati...
<commit_before># Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 1000 # Number of mini-batch SGD steps after w...
# Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 900 # Number of mini-batch SGD steps after which an evaluati...
# Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 1000 # Number of mini-batch SGD steps after which an evaluat...
<commit_before># Data set split TRAIN_FRACTION = 0.75 VALIDATE_FRACTION = 0.1 TEST_FRACTION = 0.15 TOTAL_NUM_EXAMPLES = 147052 # Total number of tracks assert(TRAIN_FRACTION + VALIDATE_FRACTION + TEST_FRACTION == 1.0) # Validation and check pointing EVALUATION_FREQ = 1000 # Number of mini-batch SGD steps after w...
f195c01ad6a98b3454880106e95fe40bbeb14da0
tests/test_essentia_dissonance.py
tests/test_essentia_dissonance.py
#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self.analyzer = get_...
#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self.analyzer = get_...
Fix unit test for essentia dissonance
Fix unit test for essentia dissonance
Python
agpl-3.0
Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide
#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self.analyzer = get_...
#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self.analyzer = get_...
<commit_before>#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self....
#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self.analyzer = get_...
#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self.analyzer = get_...
<commit_before>#! /usr/bin/env python from unit_timeside import unittest, TestRunner from timeside.plugins.decoder.file import FileDecoder from timeside.core import get_processor from timeside.core.tools.test_samples import samples class TestEssentiaDissonance(unittest.TestCase): def setUp(self): self....
853c727c472efc09df90cb016bd05f81d4cf5e8e
beetle_preview/__init__.py
beetle_preview/__init__.py
from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdir(self.director...
from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdir(self.director...
Print a line telling where the site is available at
Print a line telling where the site is available at
Python
mit
cknv/beetle-preview
from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdir(self.director...
from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdir(self.director...
<commit_before>from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdi...
from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdir(self.director...
from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdir(self.director...
<commit_before>from http import server from socketserver import TCPServer import os class Server: def __init__(self, own_config, config, builder): self.directory = config.folders['output'] self.port = own_config.get('port', 5000) self.builder = builder def serve(self): os.chdi...
b474c7368f3a8152296acf9cad7459510b71ada5
fs/opener/sshfs.py
fs/opener/sshfs.py
from ._base import Opener from ._registry import registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result.resource.partition('/') ...
from ._base import Opener from ._registry import registry from ..subfs import ClosingSubFS @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result....
Fix SSHOpener to use the new ClosingSubFS
Fix SSHOpener to use the new ClosingSubFS
Python
lgpl-2.1
althonos/fs.sshfs
from ._base import Opener from ._registry import registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result.resource.partition('/') ...
from ._base import Opener from ._registry import registry from ..subfs import ClosingSubFS @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result....
<commit_before>from ._base import Opener from ._registry import registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result.resource.partitio...
from ._base import Opener from ._registry import registry from ..subfs import ClosingSubFS @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result....
from ._base import Opener from ._registry import registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result.resource.partition('/') ...
<commit_before>from ._base import Opener from ._registry import registry @registry.install class SSHOpener(Opener): protocols = ['ssh'] @staticmethod def open_fs(fs_url, parse_result, writeable, create, cwd): from ..sshfs import SSHFS ssh_host, _, dir_path = parse_result.resource.partitio...
22f305a7cb1daab3dc61b0d22b796916417de9d2
examples/mnist-deepautoencoder.py
examples/mnist-deepautoencoder.py
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 16, 64, 256, 784), train_batches=100, tied_weights=True, ) e.run(train, va...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.run(train, va...
Increase size of bottleneck layer.
Increase size of bottleneck layer.
Python
mit
lmjohns3/theanets,chrinide/theanets,devdoer/theanets
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 16, 64, 256, 784), train_batches=100, tied_weights=True, ) e.run(train, va...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.run(train, va...
<commit_before>#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 16, 64, 256, 784), train_batches=100, tied_weights=True, ) ...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.run(train, va...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 16, 64, 256, 784), train_batches=100, tied_weights=True, ) e.run(train, va...
<commit_before>#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 16, 64, 256, 784), train_batches=100, tied_weights=True, ) ...
f70bbbdadc044a76f7b90b2cac0191353a6a5048
depfinder.py
depfinder.py
import ast def get_imported_libs(code): tree = ast.parse(code) # ast.Import represents lines like 'import foo' and 'import foo, bar' # the extra for name in t.names is needed, because names is a list that # would be ['foo'] for the first and ['foo', 'bar'] for the second imports = [name.name.split...
import ast import os from collections import deque import sys from stdlib_list import stdlib_list conf = { 'ignore_relative_imports': True, 'ignore_builtin_modules': True, 'pyver': None, } def get_imported_libs(code): tree = ast.parse(code) imports = deque() for t in tree.body: # ast....
Rework the import finding logic
MNT: Rework the import finding logic
Python
bsd-3-clause
ericdill/depfinder
import ast def get_imported_libs(code): tree = ast.parse(code) # ast.Import represents lines like 'import foo' and 'import foo, bar' # the extra for name in t.names is needed, because names is a list that # would be ['foo'] for the first and ['foo', 'bar'] for the second imports = [name.name.split...
import ast import os from collections import deque import sys from stdlib_list import stdlib_list conf = { 'ignore_relative_imports': True, 'ignore_builtin_modules': True, 'pyver': None, } def get_imported_libs(code): tree = ast.parse(code) imports = deque() for t in tree.body: # ast....
<commit_before>import ast def get_imported_libs(code): tree = ast.parse(code) # ast.Import represents lines like 'import foo' and 'import foo, bar' # the extra for name in t.names is needed, because names is a list that # would be ['foo'] for the first and ['foo', 'bar'] for the second imports = [...
import ast import os from collections import deque import sys from stdlib_list import stdlib_list conf = { 'ignore_relative_imports': True, 'ignore_builtin_modules': True, 'pyver': None, } def get_imported_libs(code): tree = ast.parse(code) imports = deque() for t in tree.body: # ast....
import ast def get_imported_libs(code): tree = ast.parse(code) # ast.Import represents lines like 'import foo' and 'import foo, bar' # the extra for name in t.names is needed, because names is a list that # would be ['foo'] for the first and ['foo', 'bar'] for the second imports = [name.name.split...
<commit_before>import ast def get_imported_libs(code): tree = ast.parse(code) # ast.Import represents lines like 'import foo' and 'import foo, bar' # the extra for name in t.names is needed, because names is a list that # would be ['foo'] for the first and ['foo', 'bar'] for the second imports = [...
2a8c4790bd432fc4dc0fdda64c0cea4f76fac9ff
feincms/context_processors.py
feincms/context_processors.py
from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincms_page'): ...
from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincms_page'): ...
Fix add_page_if_missing context processor when no pages exist yet
Fix add_page_if_missing context processor when no pages exist yet
Python
bsd-3-clause
matthiask/feincms2-content,hgrimelid/feincms,nickburlett/feincms,michaelkuty/feincms,michaelkuty/feincms,hgrimelid/feincms,feincms/feincms,pjdelport/feincms,joshuajonah/feincms,pjdelport/feincms,michaelkuty/feincms,joshuajonah/feincms,matthiask/feincms2-content,matthiask/django-content-editor,matthiask/django-content-e...
from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincms_page'): ...
from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincms_page'): ...
<commit_before>from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincm...
from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincms_page'): ...
from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincms_page'): ...
<commit_before>from feincms.module.page.models import Page def add_page_if_missing(request): # If this attribute exists, the a page object has been registered already # by some other part of the code. We let it decide, which page object it # wants to pass into the template if hasattr(request, '_feincm...
efa36e1013e44fa75f6a77a74bd8bf21f3120976
django_facebook/models.py
django_facebook/models.py
from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste the fields in....
from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste the fields in....
Allow for a longer image path
Allow for a longer image path My profile image for example does not fit in the default VARCHAR(100)
Python
bsd-3-clause
fivejjs/Django-facebook,troygrosfield/Django-facebook,danosaure/Django-facebook,rafaelgontijo/Django-facebook-fork,abendleiter/Django-facebook,pjdelport/Django-facebook,fivejjs/Django-facebook,abendleiter/Django-facebook,abendleiter/Django-facebook,andriisoldatenko/Django-facebook,ganescoo/Django-facebook,VishvajitP/Dj...
from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste the fields in....
from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste the fields in....
<commit_before>from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste ...
from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste the fields in....
from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste the fields in....
<commit_before>from django.db import models from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect class FacebookProfileModel(models.Model): ''' Abstract class to add to your profile model. NOTE: If you don't use this this abstract class, make sure you copy/paste ...
78a03f0b0cbc948a6c9fb215e9051d099c528a82
src/app.py
src/app.py
from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Monitoring' return render_template('dashboard.html', data=data, heading=title, page_title...
from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Transparency Dashboard' return render_template('dashboard.html', data=data, heading=title...
Change page title and heading
Change page title and heading
Python
mit
devinit/grand-bargain-monitoring,devinit/grand-bargain-monitoring,devinit/grand-bargain-monitoring
from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Monitoring' return render_template('dashboard.html', data=data, heading=title, page_title...
from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Transparency Dashboard' return render_template('dashboard.html', data=data, heading=title...
<commit_before>from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Monitoring' return render_template('dashboard.html', data=data, heading=ti...
from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Transparency Dashboard' return render_template('dashboard.html', data=data, heading=title...
from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Monitoring' return render_template('dashboard.html', data=data, heading=title, page_title...
<commit_before>from flask import Flask from flask import render_template, url_for import parse_data app = Flask(__name__) @app.route("/dashboard") def dashboard(): data = parse_data.load_and_format_data() title = 'Grand Bargain Monitoring' return render_template('dashboard.html', data=data, heading=ti...
6b7e32c98fa8a11dcd7bbbadaa2a057e4ff0ce90
f5_os_test/__init__.py
f5_os_test/__init__.py
# Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
Add function to create name strings with random characters
Add function to create name strings with random characters Issues: Fixes #48 Problem: Need a function that will generate names with random chars. Analysis: Added new function, random_name(). Tests: test_solution.py
Python
apache-2.0
F5Networks/f5-openstack-test,pjbreaux/f5-openstack-test
# Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
<commit_before># Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
<commit_before># Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
1a98b29293ccfab6534a48402414e89726d8e5bb
Python/pomodoro.py
Python/pomodoro.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() spr.call(['notify-send', 'Started new pomodoro']) time.sleep(30 * 60) end = datetime.datetime.now() duration = (end - start).total_seconds() // 60 fo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() start_str = start.strftime("%H:%M:%S") spr.call(['notify-send', '--app-name', 'POMODORO', '--icon', 'dialog-information', ...
Set icon, summary for notification
Set icon, summary for notification
Python
bsd-2-clause
familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() spr.call(['notify-send', 'Started new pomodoro']) time.sleep(30 * 60) end = datetime.datetime.now() duration = (end - start).total_seconds() // 60 fo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() start_str = start.strftime("%H:%M:%S") spr.call(['notify-send', '--app-name', 'POMODORO', '--icon', 'dialog-information', ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() spr.call(['notify-send', 'Started new pomodoro']) time.sleep(30 * 60) end = datetime.datetime.now() duration = (end - start).total_seconds(...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() start_str = start.strftime("%H:%M:%S") spr.call(['notify-send', '--app-name', 'POMODORO', '--icon', 'dialog-information', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() spr.call(['notify-send', 'Started new pomodoro']) time.sleep(30 * 60) end = datetime.datetime.now() duration = (end - start).total_seconds() // 60 fo...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import subprocess as spr import time def main(): start = datetime.datetime.now() spr.call(['notify-send', 'Started new pomodoro']) time.sleep(30 * 60) end = datetime.datetime.now() duration = (end - start).total_seconds(...
d9a6071674857ceae566d29c7c77a31a5ed5214d
byceps/blueprints/api/decorators.py
byceps/blueprints/api/decorators.py
""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from ...services.authentication.api import service as a...
""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from werkzeug.datastructures import WWWAuthenticate fro...
Return proper WWW-Authenticate header if API authentication fails
Return proper WWW-Authenticate header if API authentication fails
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from ...services.authentication.api import service as a...
""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from werkzeug.datastructures import WWWAuthenticate fro...
<commit_before>""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from ...services.authentication.api impo...
""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from werkzeug.datastructures import WWWAuthenticate fro...
""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from ...services.authentication.api import service as a...
<commit_before>""" byceps.blueprints.api.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from functools import wraps from typing import Optional from flask import abort, request from ...services.authentication.api impo...
b5653ac28ac8358127943bd1f40c22dfd8a274f3
examples/list_people.py
examples/list_people.py
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Name:", person.na...
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Name:", person.na...
Make Python example output identical to C++ and Java by removing redundant spaces.
Make Python example output identical to C++ and Java by removing redundant spaces.
Python
bsd-3-clause
malthe/google-protobuf,malthe/google-protobuf,malthe/google-protobuf,malthe/google-protobuf,malthe/google-protobuf
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Name:", person.na...
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Name:", person.na...
<commit_before>#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Na...
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Name:", person.na...
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Name:", person.na...
<commit_before>#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Na...
8de8da05bb9461aaa48d3058f5b1e2caab6191f1
openmath/xml.py
openmath/xml.py
from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN": om.OMForeign...
from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN": om.OMForeign...
Use dict() syntax that works in Python 2.6 onward
Use dict() syntax that works in Python 2.6 onward
Python
mit
OpenMath/py-openmath
from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN": om.OMForeign...
from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN": om.OMForeign...
<commit_before>from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN...
from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN": om.OMForeign...
from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN": om.OMForeign...
<commit_before>from . import openmath as om openmath_ns = "http://www.openmath.org/OpenMath" omtags = { "OMOBJ": om.OMObject, "OMR": om.OMReference, "OMI": om.OMInteger, "OMF": om.OMFloat, "OMSTR": om.OMString, "OMB": om.OMBytes, "OMS": om.OMSymbol, "OMV": om.OMVariable, "OMFOREIGN...
ab4ae040895c50da6cb0827f6461d1733c7fe30a
tests/test_plugin_states.py
tests/test_plugin_states.py
from contextlib import contextmanager from os import path from unittest import TestCase from canaryd_packages import six from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd.plugin import get_plugin_by_name @six.add_metaclass(JsonTest) class TestPluginStates(TestCase): j...
from contextlib import contextmanager from os import path from unittest import TestCase from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd_packages import six from canaryd.plugin import get_plugin_by_name class TestPluginRealStates(TestCase): def run_plugin(self, plug...
Add real plugin state tests for plugins that always work (meta, containers, services).
Add real plugin state tests for plugins that always work (meta, containers, services).
Python
mit
Oxygem/canaryd,Oxygem/canaryd
from contextlib import contextmanager from os import path from unittest import TestCase from canaryd_packages import six from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd.plugin import get_plugin_by_name @six.add_metaclass(JsonTest) class TestPluginStates(TestCase): j...
from contextlib import contextmanager from os import path from unittest import TestCase from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd_packages import six from canaryd.plugin import get_plugin_by_name class TestPluginRealStates(TestCase): def run_plugin(self, plug...
<commit_before>from contextlib import contextmanager from os import path from unittest import TestCase from canaryd_packages import six from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd.plugin import get_plugin_by_name @six.add_metaclass(JsonTest) class TestPluginStates(T...
from contextlib import contextmanager from os import path from unittest import TestCase from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd_packages import six from canaryd.plugin import get_plugin_by_name class TestPluginRealStates(TestCase): def run_plugin(self, plug...
from contextlib import contextmanager from os import path from unittest import TestCase from canaryd_packages import six from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd.plugin import get_plugin_by_name @six.add_metaclass(JsonTest) class TestPluginStates(TestCase): j...
<commit_before>from contextlib import contextmanager from os import path from unittest import TestCase from canaryd_packages import six from dictdiffer import diff from jsontest import JsonTest from mock import patch from canaryd.plugin import get_plugin_by_name @six.add_metaclass(JsonTest) class TestPluginStates(T...
94a91f128b046a818acb873579c8aadd41aa5c3a
test/streamparse/cli/test_sparse.py
test/streamparse/cli/test_sparse.py
from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(...
from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(...
Fix remaining load_suparsers typo instance
Fix remaining load_suparsers typo instance
Python
apache-2.0
msmakhlouf/streamparse,codywilbourn/streamparse,petchat/streamparse,petchat/streamparse,Parsely/streamparse,msmakhlouf/streamparse,petchat/streamparse,petchat/streamparse,msmakhlouf/streamparse,msmakhlouf/streamparse,codywilbourn/streamparse,eric7j/streamparse,petchat/streamparse,crohling/streamparse,hodgesds/streampar...
from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(...
from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(...
<commit_before>from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser....
from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(...
from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(...
<commit_before>from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli import sparse from nose.tools import ok_ class SparseTestCase(unittest.TestCase): def test_load_subparsers(self): parser = argparse.ArgumentParser() subparsers = parser....
26dcd1ce43864de77c1cd26065c09cc2b4c4788e
tests/fuzzer/test_random_content.py
tests/fuzzer/test_random_content.py
# Copyright (c) 2016 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametrize('fuzzer_kwa...
# Copyright (c) 2016-2021 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametrize('fuzze...
Make use of chained comparisons
Make use of chained comparisons
Python
bsd-3-clause
akosthekiss/fuzzinator,akosthekiss/fuzzinator,akosthekiss/fuzzinator,renatahodovan/fuzzinator,renatahodovan/fuzzinator,renatahodovan/fuzzinator,akosthekiss/fuzzinator,renatahodovan/fuzzinator
# Copyright (c) 2016 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametrize('fuzzer_kwa...
# Copyright (c) 2016-2021 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametrize('fuzze...
<commit_before># Copyright (c) 2016 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametr...
# Copyright (c) 2016-2021 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametrize('fuzze...
# Copyright (c) 2016 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametrize('fuzzer_kwa...
<commit_before># Copyright (c) 2016 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import pytest import fuzzinator @pytest.mark.parametr...
c79cedf826a3b6ee89e6186954185ef3217dd901
tomviz/python/InvertData.py
tomviz/python/InvertData.py
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
Add the minimum scalar value to the result of the InvertOperator
Add the minimum scalar value to the result of the InvertOperator Without it, all results would be shifted so the minimum was 0.
Python
bsd-3-clause
OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,mathturtle/tomviz
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
<commit_before>import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset)...
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if sca...
<commit_before>import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset)...
47053a42b9053755aad052159dac845b34195297
config/test/__init__.py
config/test/__init__.py
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executab...
from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
Use common testHarness in derived projects
Use common testHarness in derived projects
Python
lgpl-2.1
CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executab...
from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
<commit_before>from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
from SCons.Script import * import inspect def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executab...
<commit_before>from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spaw...
37831f549eddc014ab89cc7dba3616a133c774a2
api/BucketListAPI.py
api/BucketListAPI.py
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import app, db @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return response if __name__ == '__main__': app.run...
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import create_app, db app = create_app('DevelopmentEnv') @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return respon...
Add create_app method to __init__.py
Add create_app method to __init__.py
Python
mit
patlub/BucketListAPI,patlub/BucketListAPI
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import app, db @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return response if __name__ == '__main__': app.run...
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import create_app, db app = create_app('DevelopmentEnv') @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return respon...
<commit_before>from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import app, db @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return response if __name__ == '__main_...
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import create_app, db app = create_app('DevelopmentEnv') @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return respon...
from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import app, db @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return response if __name__ == '__main__': app.run...
<commit_before>from flask import Flask, jsonify from modals.modals import User, Bucket, Item from api.__init__ import app, db @app.errorhandler(404) def page_not_found(e): response = jsonify({'error': 'The request can not be completed'}) response.status_code = 404 return response if __name__ == '__main_...
ffa8f79fe15621081acbb220a2a4dfd3d4d6d500
galton/utils/logger.py
galton/utils/logger.py
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
Correct env_key input argument default value
Correct env_key input argument default value
Python
bsd-3-clause
Neurita/galton
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
<commit_before># -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=...
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
# -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=LOG_LEVEL, ...
<commit_before># -*- coding: utf-8 -*- import os import os.path as op import yaml import logging.config from .text_files import read from ..config import LOG_LEVEL MODULE_NAME = __name__.split('.')[0] def setup_logging(log_config_file=op.join(op.dirname(__file__), 'logger.yml'), log_default_level=...
554572f327e4b9c920f65b416bfc6a3a5b549846
numba/tests/npyufunc/test_parallel_env_variable.py
numba/tests/npyufunc/test_parallel_env_variable.py
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
Reset the num threads to the env variable, not the default
Reset the num threads to the env variable, not the default
Python
bsd-2-clause
numba/numba,stonebig/numba,cpcloud/numba,gmarkall/numba,sklam/numba,stuartarchibald/numba,seibert/numba,seibert/numba,cpcloud/numba,numba/numba,sklam/numba,IntelLabs/numba,stuartarchibald/numba,IntelLabs/numba,IntelLabs/numba,gmarkall/numba,cpcloud/numba,seibert/numba,stuartarchibald/numba,numba/numba,sklam/numba,seibe...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
<commit_before>from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numb...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numba_parallel_test...
<commit_before>from numba.np.ufunc.parallel import get_thread_count from os import environ as env from numba.core import config import unittest class TestParallelEnvVariable(unittest.TestCase): """ Tests environment variables related to the underlying "parallel" functions for npyufuncs. """ _numb...
4b5dd61607c9692bb330f89545d5f76d7a1ed221
puzzle/feeds.py
puzzle/feeds.py
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
Fix linkage in the RSS feed
Fix linkage in the RSS feed
Python
mit
jomoore/threepins,jomoore/threepins,jomoore/threepins
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
<commit_before>""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from dj...
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils impo...
<commit_before>""" Generate an RSS feed of published crosswords from staff users. Uses the built-in feed framework. There's no attempt to send the actual crossword, it's just a message indicating that a new one is available. """ from django.contrib.syndication.views import Feed from django.urls import reverse from dj...
a0ceb84519d1bf735979b3afdfdb8b17621d308b
froide/problem/admin.py
froide/problem/admin.py
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
Fix overwriting resolution with empty text
Fix overwriting resolution with empty text
Python
mit
stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
<commit_before>from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): dat...
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): date_hierarchy = '...
<commit_before>from django.contrib import admin from django.utils.html import format_html from django.urls import reverse from django.utils.translation import gettext_lazy as _ from froide.helper.admin_utils import make_nullfilter from .models import ProblemReport class ProblemReportAdmin(admin.ModelAdmin): dat...
1171ade137c54c778a284ef32fdbdcd9e5c1d828
runcommands/runners/result.py
runcommands/runners/result.py
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
Add __repr__() and __str__() to Result
Add __repr__() and __str__() to Result
Python
mit
wylee/runcommands,wylee/runcommands
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
<commit_before>from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self....
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self.return_code == ...
<commit_before>from ..util import cached_property class Result: def __init__(self, return_code, stdout_data, stderr_data, encoding): self.return_code = return_code self.stdout_data = stdout_data self.stderr_data = stderr_data self.encoding = encoding self.succeeded = self....
ed45c8201977aecde226b2e9b060820a8fd677c3
test/functional/rpc_deprecated.py
test/functional/rpc_deprecated.py
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework class Depr...
Remove test for deprecated createmultsig option
[tests] Remove test for deprecated createmultsig option
Python
mit
guncoin/guncoin,AkioNak/bitcoin,tjps/bitcoin,myriadteam/myriadcoin,tjps/bitcoin,tecnovert/particl-core,vmp32k/litecoin,jamesob/bitcoin,achow101/bitcoin,jtimon/bitcoin,particl/particl-core,DigitalPandacoin/pandacoin,MarcoFalke/bitcoin,kazcw/bitcoin,cdecker/bitcoin,andreaskern/bitcoin,paveljanik/bitcoin,Kogser/bitcoin,an...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework class Depr...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramew...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework class Depr...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramew...
09c3b752154478b15a45d11f08d46a5003f174ec
giveaminute/keywords.py
giveaminute/keywords.py
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ from framework.controller import log # find keywords in a string def getKeywords(db, s): """Get all matches for passed in string in keyword tables :param db: database handle ...
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ # find keywords in a string def getKeywords(db, s): sql = "select keyword from keyword" data = list(db.query(sql)) words = [] for d in data: if (d.keywor...
Revert keyword optimization for current release
Revert keyword optimization for current release
Python
agpl-3.0
codeforeurope/Change-By-Us,watchcat/cbu-rotterdam,codeforeurope/Change-By-Us,codeforeurope/Change-By-Us,codeforeurope/Change-By-Us,watchcat/cbu-rotterdam,localprojects/Change-By-Us,watchcat/cbu-rotterdam,watchcat/cbu-rotterdam,watchcat/cbu-rotterdam,localprojects/Change-By-Us,localprojects/Change-By-Us,localprojects/Ch...
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ from framework.controller import log # find keywords in a string def getKeywords(db, s): """Get all matches for passed in string in keyword tables :param db: database handle ...
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ # find keywords in a string def getKeywords(db, s): sql = "select keyword from keyword" data = list(db.query(sql)) words = [] for d in data: if (d.keywor...
<commit_before>""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ from framework.controller import log # find keywords in a string def getKeywords(db, s): """Get all matches for passed in string in keyword tables :param db: d...
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ # find keywords in a string def getKeywords(db, s): sql = "select keyword from keyword" data = list(db.query(sql)) words = [] for d in data: if (d.keywor...
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ from framework.controller import log # find keywords in a string def getKeywords(db, s): """Get all matches for passed in string in keyword tables :param db: database handle ...
<commit_before>""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ from framework.controller import log # find keywords in a string def getKeywords(db, s): """Get all matches for passed in string in keyword tables :param db: d...
d7001ccab0879e17308bf2dc945b5fd3b726be27
statblock/dice.py
statblock/dice.py
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
Write the critical multiplier or the range when the damage gets converted into a String
Write the critical multiplier or the range when the damage gets converted into a String
Python
mit
bkittelmann/statblock
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
<commit_before>from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number =...
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number = number ...
<commit_before>from random import random class Die: """ Abstracts the random dice throw. Roll will produce the result. The die can be further parametrized by a multiplicator and/or a modifier, like 2 * Die(8) +4. """ def __init__(self, number, multiplicator=1, modifier=0): self.number =...
95f7c6cba7c4077053899e3ca01c8ffd3172873c
grouprise/core/views.py
grouprise/core/views.py
import json import django from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class AppConfig: def __init__(self): self._settings = {} self._defaul...
import json import django from django_filters.views import FilterMixin from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class TemplateFilterMixin(FilterMixin): ...
Add view mixin for working with filters in templates
Add view mixin for working with filters in templates
Python
agpl-3.0
stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten
import json import django from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class AppConfig: def __init__(self): self._settings = {} self._defaul...
import json import django from django_filters.views import FilterMixin from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class TemplateFilterMixin(FilterMixin): ...
<commit_before>import json import django from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class AppConfig: def __init__(self): self._settings = {} ...
import json import django from django_filters.views import FilterMixin from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class TemplateFilterMixin(FilterMixin): ...
import json import django from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class AppConfig: def __init__(self): self._settings = {} self._defaul...
<commit_before>import json import django from rules.contrib.views import PermissionRequiredMixin class PermissionMixin(PermissionRequiredMixin): @property def raise_exception(self): return self.request.user.is_authenticated class AppConfig: def __init__(self): self._settings = {} ...
a789e8bf574973259c0461b99fb9a486abed6e23
systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py
systemvm/patches/debian/config/opt/cloud/bin/cs_ip.py
from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ipo = IPNet...
from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ipo = IPNet...
Fix a bug that would add updated control ip address instead of replace
Fix a bug that would add updated control ip address instead of replace
Python
apache-2.0
jcshen007/cloudstack,resmo/cloudstack,resmo/cloudstack,GabrielBrascher/cloudstack,resmo/cloudstack,jcshen007/cloudstack,jcshen007/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,resmo/cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,Gab...
from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ipo = IPNet...
from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ipo = IPNet...
<commit_before>from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ...
from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ipo = IPNet...
from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ipo = IPNet...
<commit_before>from pprint import pprint from netaddr import * def merge(dbag, ip): added = False for dev in dbag: if dev == "id": continue for address in dbag[dev]: if address['public_ip'] == ip['public_ip']: dbag[dev].remove(address) if ip['add']: ...
67ebe8da58384529c49673e2314d4fc228aebe9e
python/testData/inspections/PyPackageRequirementsInspection/ImportsNotInRequirementsTxt/test1.py
python/testData/inspections/PyPackageRequirementsInspection/ImportsNotInRequirementsTxt/test1.py
import pip import <weak_warning descr="Package 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package 'django' is not listed in project requirem...
import pip import <weak_warning descr="Package containing module 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package containing module 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package contai...
Fix test data for PyPackageRequirementsInspectionTest.testImportsNotInRequirementsTxt.
Fix test data for PyPackageRequirementsInspectionTest.testImportsNotInRequirementsTxt.
Python
apache-2.0
apixandru/intellij-community,da1z/intellij-community,mglukhikh/intellij-community,allotria/intellij-community,ibinti/intellij-community,suncycheng/intellij-community,apixandru/intellij-community,da1z/intellij-community,ibinti/intellij-community,vvv1559/intellij-community,ibinti/intellij-community,ThiagoGarciaAlves/inte...
import pip import <weak_warning descr="Package 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package 'django' is not listed in project requirem...
import pip import <weak_warning descr="Package containing module 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package containing module 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package contai...
<commit_before>import pip import <weak_warning descr="Package 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package 'django' is not listed in p...
import pip import <weak_warning descr="Package containing module 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package containing module 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package contai...
import pip import <weak_warning descr="Package 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package 'django' is not listed in project requirem...
<commit_before>import pip import <weak_warning descr="Package 'opster' is not listed in project requirements">opster</weak_warning> from <weak_warning descr="Package 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert import <weak_warning descr="Package 'django' is not listed in p...
ed91a6832d459dffa18d1b2d7b827b6aa6da2627
src/sentry/api/endpoints/team_project_index.py
src/sentry/api/endpoints/team_project_index.py
from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sentry.constants import MEMBER_ADMIN from s...
from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.base import DocSection from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sent...
Add team project list to docs
Add team project list to docs
Python
bsd-3-clause
BuildingLink/sentry,JamesMura/sentry,mvaled/sentry,beeftornado/sentry,JamesMura/sentry,ngonzalvez/sentry,Kryz/sentry,fuziontech/sentry,nicholasserra/sentry,TedaLIEz/sentry,JackDanger/sentry,songyi199111/sentry,BayanGroup/sentry,songyi199111/sentry,1tush/sentry,kevinlondon/sentry,gg7/sentry,jokey2k/sentry,Natim/sentry,v...
from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sentry.constants import MEMBER_ADMIN from s...
from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.base import DocSection from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sent...
<commit_before>from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sentry.constants import MEMB...
from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.base import DocSection from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sent...
from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sentry.constants import MEMBER_ADMIN from s...
<commit_before>from __future__ import absolute_import from rest_framework import serializers, status from rest_framework.response import Response from sentry.api.bases.team import TeamEndpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sentry.constants import MEMB...
b04f3bd19b508140b0b4feee46d590b61da46bed
swift/__init__.py
swift/__init__.py
import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: return '%s-dev' ...
import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: return '%s-dev' ...
Switch Swift trunk to 1.4.1, now that the 1.4.0 release branch is branched out.
Switch Swift trunk to 1.4.1, now that the 1.4.0 release branch is branched out.
Python
apache-2.0
mja054/swift_plugin,iostackproject/IO-Bandwidth-Differentiation,williamthegrey/swift,openstack/swift,notmyname/swift,matthewoliver/swift,orion/swift-config,thiagodasilva/swift,zackmdavis/swift,smerritt/swift,bkolli/swift,Em-Pan/swift,Khushbu27/Tutorial,openstack/swift,larsbutler/swift,aerwin3/swift,redhat-openstack/swi...
import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: return '%s-dev' ...
import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: return '%s-dev' ...
<commit_before>import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: r...
import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: return '%s-dev' ...
import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: return '%s-dev' ...
<commit_before>import gettext class Version(object): def __init__(self, canonical_version, final): self.canonical_version = canonical_version self.final = final @property def pretty_version(self): if self.final: return self.canonical_version else: r...