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
4b56e0da85cec4aa89b8105c3a7ca416a2f7919e
wdim/client/blob.py
wdim/client/blob.py
import json import hashlib from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data): sha = hashlib.new(cls.H...
import json import hashlib from typing import Any, Dict from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data: Dic...
Allow Blob to be accessed with __getitem__
Allow Blob to be accessed with __getitem__
Python
mit
chrisseto/Still
import json import hashlib from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data): sha = hashlib.new(cls.H...
import json import hashlib from typing import Any, Dict from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data: Dic...
<commit_before>import json import hashlib from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data): sha = ha...
import json import hashlib from typing import Any, Dict from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data: Dic...
import json import hashlib from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data): sha = hashlib.new(cls.H...
<commit_before>import json import hashlib from wdim import orm from wdim.orm import fields from wdim.orm import exceptions class Blob(orm.Storable): HASH_METHOD = 'sha256' _id = fields.StringField(unique=True) data = fields.DictField() @classmethod async def create(cls, data): sha = ha...
a78445cfada5cc1f77a7887dc5241071bef69989
compass/tests/test_models.py
compass/tests/test_models.py
from django.test import TestCase from compass.models import (Category, Book) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class BookTestCase(TestC...
from django.test import TestCase from compass.models import (Category, Book, Compass) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class BookTestC...
Test correct heading returned in search results
Test correct heading returned in search results
Python
mit
andela-osule/bookworm,andela-osule/bookworm
from django.test import TestCase from compass.models import (Category, Book) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class BookTestCase(TestC...
from django.test import TestCase from compass.models import (Category, Book, Compass) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class BookTestC...
<commit_before>from django.test import TestCase from compass.models import (Category, Book) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class Boo...
from django.test import TestCase from compass.models import (Category, Book, Compass) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class BookTestC...
from django.test import TestCase from compass.models import (Category, Book) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class BookTestCase(TestC...
<commit_before>from django.test import TestCase from compass.models import (Category, Book) class CategoryTestCase(TestCase): def test_can_add_category(self,): Category.create(title="Mock Category") self.assertEqual(Category.find("Mock Category").count(), 1) class Boo...
e299906aae483f1cb6deaff83a68519a042b92e6
stripe/stripe_response.py
stripe/stripe_response.py
from __future__ import absolute_import, division, print_function import json class StripeResponse: def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(self): ...
from __future__ import absolute_import, division, print_function import json class StripeResponse(object): def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(self): ...
Make StripeResponse a new-style class
Make StripeResponse a new-style class
Python
mit
stripe/stripe-python
from __future__ import absolute_import, division, print_function import json class StripeResponse: def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(self): ...
from __future__ import absolute_import, division, print_function import json class StripeResponse(object): def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(self): ...
<commit_before>from __future__ import absolute_import, division, print_function import json class StripeResponse: def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(...
from __future__ import absolute_import, division, print_function import json class StripeResponse(object): def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(self): ...
from __future__ import absolute_import, division, print_function import json class StripeResponse: def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(self): ...
<commit_before>from __future__ import absolute_import, division, print_function import json class StripeResponse: def __init__(self, body, code, headers): self.body = body self.code = code self.headers = headers self.data = json.loads(body) @property def idempotency_key(...
eaa2ef92eba11d44bf5159342e314b932d79f58d
fedora/__init__.py
fedora/__init__.py
# Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
# Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
Undo the webtest import... it's causing runtime failiure and unittests are currently broken anyway.
Undo the webtest import... it's causing runtime failiure and unittests are currently broken anyway.
Python
lgpl-2.1
fedora-infra/python-fedora
# Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
# Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
<commit_before># Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your opt...
# Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
# Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
<commit_before># Copyright 2008 Red Hat, Inc. # This file is part of python-fedora # # python-fedora is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your opt...
b4061152064269f8848c374cf81a867a9c0a7388
latex/errors.py
latex/errors.py
import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.split('\n') errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: err = m.grou...
import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.splitlines() errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: err = m.gro...
Use splitlines instead of split on new line.
Use splitlines instead of split on new line.
Python
bsd-3-clause
mbr/latex
import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.split('\n') errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: err = m.grou...
import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.splitlines() errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: err = m.gro...
<commit_before>import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.split('\n') errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: ...
import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.splitlines() errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: err = m.gro...
import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.split('\n') errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: err = m.grou...
<commit_before>import re LATEX_ERR_RE = re.compile(r'(?P<filename>[^:]+):(?P<line>[0-9]*):' r'\s*(?P<error>.*)') def parse_log(log, context_size=3): lines = log.split('\n') errors = [] for n, line in enumerate(lines): m = LATEX_ERR_RE.match(line) if m: ...
662287761b8549a86d3fb8c05ec37d47491da120
flatblocks/urls.py
flatblocks/urls.py
from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path("^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit"), ]
from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path( r"^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit", ), ]
Use raw string notation for regular expression.
Use raw string notation for regular expression.
Python
bsd-3-clause
funkybob/django-flatblocks,funkybob/django-flatblocks
from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path("^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit"), ] Use raw string notation for regular expression.
from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path( r"^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit", ), ]
<commit_before>from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path("^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit"), ] <commit_msg>Use raw string notation for regular expression....
from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path( r"^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit", ), ]
from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path("^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit"), ] Use raw string notation for regular expression.from django.contrib.admin.v...
<commit_before>from django.contrib.admin.views.decorators import staff_member_required from django.urls import re_path from flatblocks.views import edit urlpatterns = [ re_path("^edit/(?P<pk>\d+)/$", staff_member_required(edit), name="flatblocks-edit"), ] <commit_msg>Use raw string notation for regular expression....
1cc6ec9f328d3ce045a4a1a50138b11c0b23cc3a
pyfr/ctypesutil.py
pyfr/ctypesutil.py
# -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): lname = platform_libname(name) sdirs = platform_libdirs() ...
# -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): # If an explicit override has been given then use it lpath =...
Enable library paths to be explicitly specified.
Enable library paths to be explicitly specified. All shared libraries loaded through the load_library function can bow be specified explicitly through a suitable environmental variable PYFR_<LIB>_LIBRARY_PATH=/path/to/lib.here where <LIB> corresponds to the name of the library, e.g. METIS.
Python
bsd-3-clause
BrianVermeire/PyFR
# -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): lname = platform_libname(name) sdirs = platform_libdirs() ...
# -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): # If an explicit override has been given then use it lpath =...
<commit_before># -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): lname = platform_libname(name) sdirs = platfo...
# -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): # If an explicit override has been given then use it lpath =...
# -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): lname = platform_libname(name) sdirs = platform_libdirs() ...
<commit_before># -*- coding: utf-8 -*- import ctypes import ctypes.util import os import sys def find_libc(): if sys.platform == 'win32': return ctypes.util.find_msvcrt() else: return ctypes.util.find_library('c') def load_library(name): lname = platform_libname(name) sdirs = platfo...
8237291e194aa900857fe382d0b8cefb7806c331
ocradmin/ocrmodels/models.py
ocradmin/ocrmodels/models.py
from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", null=True, blank=...
from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", null=True, blank=...
Improve unicode method. Whitespace cleanup
Improve unicode method. Whitespace cleanup
Python
apache-2.0
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", null=True, blank=...
from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", null=True, blank=...
<commit_before>from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", nu...
from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", null=True, blank=...
from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", null=True, blank=...
<commit_before>from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField import tagging # OCR model, erm, model class OcrModel(models.Model): """ OCR model objects. """ user = models.ForeignKey(User) derived_from = models.ForeignKey("self", nu...
146d9eb75b55298886a3860976b19be5b42825b2
deriva/core/base_cli.py
deriva/core/base_cli.py
import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epilog) self.parser.add_argument( ...
import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version, "A valid version string is required" self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epil...
Add some detail text to assertion.
Add some detail text to assertion.
Python
apache-2.0
informatics-isi-edu/deriva-py
import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epilog) self.parser.add_argument( ...
import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version, "A valid version string is required" self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epil...
<commit_before>import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epilog) self.parser...
import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version, "A valid version string is required" self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epil...
import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epilog) self.parser.add_argument( ...
<commit_before>import argparse import logging from . import init_logging class BaseCLI(object): def __init__(self, description, epilog, version=None): assert version self.version = version self.parser = argparse.ArgumentParser(description=description, epilog=epilog) self.parser...
e26b95803707e74dba2cc451476466eefc156f8f
tests/test_coefficient.py
tests/test_coefficient.py
# -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_only_contract_pe...
# -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_only_contract_pe...
Fix evaluation date & test period
Fix evaluation date & test period
Python
agpl-3.0
sgmap/openfisca-france,sgmap/openfisca-france,antoinearnoud/openfisca-france,antoinearnoud/openfisca-france
# -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_only_contract_pe...
# -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_only_contract_pe...
<commit_before># -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_o...
# -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_only_contract_pe...
# -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_only_contract_pe...
<commit_before># -*- coding: utf-8 -*- from nose.tools import assert_equal from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import * from openfisca_core.periods import * from openfisca_france import FranceTaxBenefitSystem def test_coefficient_proratisation_o...
02df4f76b61556edc04869e8e70bf63c3df75ef3
humbug/backends.py
humbug/backends.py
from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authenticate a user ba...
from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authenticate a user ba...
Allow case-insensitive email addresses when doing authentication
Allow case-insensitive email addresses when doing authentication (imported from commit b52e39c7f706a2107b5d86e8e18293a46ed9e6ff)
Python
apache-2.0
armooo/zulip,qq1012803704/zulip,ikasumiwt/zulip,hj3938/zulip,nicholasbs/zulip,kou/zulip,pradiptad/zulip,jackrzhang/zulip,codeKonami/zulip,alliejones/zulip,Vallher/zulip,bastianh/zulip,natanovia/zulip,so0k/zulip,noroot/zulip,lfranchi/zulip,bitemyapp/zulip,wavelets/zulip,showell/zulip,codeKonami/zulip,praveenaki/zulip,dn...
from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authenticate a user ba...
from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authenticate a user ba...
<commit_before>from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authent...
from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authenticate a user ba...
from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authenticate a user ba...
<commit_before>from django.contrib.auth.models import User class EmailAuthBackend(object): """ Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair. """ def authenticate(self, username=None, password=None): """ Authent...
7a99695c7612609de294a6905820fad3e41afc43
marketpulse/devices/models.py
marketpulse/devices/models.py
from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model)
from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model) class Meta: orderi...
Order devices by manufacturer and model.
Order devices by manufacturer and model.
Python
mpl-2.0
johngian/marketpulse,akatsoulas/marketpulse,johngian/marketpulse,mozilla/marketpulse,mozilla/marketpulse,johngian/marketpulse,akatsoulas/marketpulse,mozilla/marketpulse,johngian/marketpulse,akatsoulas/marketpulse,akatsoulas/marketpulse,mozilla/marketpulse
from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model) Order devices by manufacturer a...
from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model) class Meta: orderi...
<commit_before>from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model) <commit_msg>Orde...
from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model) class Meta: orderi...
from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model) Order devices by manufacturer a...
<commit_before>from django.db import models class Device(models.Model): """Model for FfxOS devices data.""" model = models.CharField(max_length=120) manufacturer = models.CharField(max_length=120) def __unicode__(self): return '{0}, {1}'.format(self.manufacturer, self.model) <commit_msg>Orde...
a760beb8d66222b456b160344eb0b4b7fccbf84a
Lib/test/test_linuxaudiodev.py
Lib/test/test_linuxaudiodev.py
from test_support import verbose, findfile, TestFailed import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno.ENODEV): rais...
from test_support import verbose, findfile, TestFailed, TestSkipped import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno.EN...
Raise TestSkipped, not ImportError. Honesty's the best policy.
Raise TestSkipped, not ImportError. Honesty's the best policy.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
from test_support import verbose, findfile, TestFailed import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno.ENODEV): rais...
from test_support import verbose, findfile, TestFailed, TestSkipped import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno.EN...
<commit_before>from test_support import verbose, findfile, TestFailed import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno....
from test_support import verbose, findfile, TestFailed, TestSkipped import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno.EN...
from test_support import verbose, findfile, TestFailed import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno.ENODEV): rais...
<commit_before>from test_support import verbose, findfile, TestFailed import linuxaudiodev import errno import os def play_sound_file(path): fp = open(path, 'r') data = fp.read() fp.close() try: a = linuxaudiodev.open('w') except linuxaudiodev.error, msg: if msg[0] in (errno.EACCES, errno....
70db9410173183c83d80ca23e56ceb0d627fcbae
scripts/indices.py
scripts/indices.py
# Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ('username', ASCE...
# Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['storedfilenode'].create_index([ ('tags', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user']...
Add index on file tags field
Add index on file tags field
Python
apache-2.0
baylee-d/osf.io,abought/osf.io,Johnetordoff/osf.io,felliott/osf.io,alexschiller/osf.io,mluo613/osf.io,brianjgeiger/osf.io,crcresearch/osf.io,aaxelb/osf.io,wearpants/osf.io,hmoco/osf.io,mfraezz/osf.io,caseyrollins/osf.io,leb2dg/osf.io,emetsger/osf.io,caneruguz/osf.io,alexschiller/osf.io,CenterForOpenScience/osf.io,bayle...
# Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ('username', ASCE...
# Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['storedfilenode'].create_index([ ('tags', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user']...
<commit_before># Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ('...
# Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['storedfilenode'].create_index([ ('tags', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user']...
# Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ('username', ASCE...
<commit_before># Indices that need to be added manually: # # invoke shell --no-transaction from pymongo import ASCENDING, DESCENDING db['user'].create_index([ ('emails', ASCENDING), ]) db['user'].create_index([ ('external_accounts', ASCENDING), ]) db['user'].create_index([ ('emails', ASCENDING), ('...
ecbabd56f6afc4474402d3293bf11e3b6eb2e8f4
server/__init__.py
server/__init__.py
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsR...
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsR...
Switch to generating REST end points from docker image
Switch to generating REST end points from docker image
Python
apache-2.0
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsR...
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsR...
<commit_before>import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot']...
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsR...
import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot'] histomicsR...
<commit_before>import os from girder.utility.webroot import Webroot from .rest_slicer_cli import( genRESTEndPointsForSlicerCLIsInSubDirs, genRESTEndPointsForSlicerCLIsInDocker ) _template = os.path.join( os.path.dirname(__file__), 'webroot.mako' ) def load(info): girderRoot = info['serverRoot']...
56dc9af410907780faba79699d274bef96a18675
functionaltests/common/base.py
functionaltests/common/base.py
""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
Remove unnecessary __init__ from functionaltests
Remove unnecessary __init__ from functionaltests The __init__ just passes the same arguments, so it is not necessary to implement it. This patch removes it for the cleanup. Change-Id: Ib465356c47d06bfc66bef69126b089be24d19474
Python
apache-2.0
openstack/designate,openstack/designate,openstack/designate
""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
<commit_before>""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
<commit_before>""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
40ca8cde872704438fecd22ae98bc7db610de1f9
services/flickr.py
services/flickr.py
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
Rewrite Flickr to use the new scope selection system
Rewrite Flickr to use the new scope selection system
Python
bsd-3-clause
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
<commit_before>import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr.com/services/o...
<commit_before>import foauth.providers class Flickr(foauth.providers.OAuth1): # General info about the provider provider_url = 'http://www.flickr.com/' docs_url = 'http://www.flickr.com/services/api/' category = 'Pictures' # URLs to interact with the API request_token_url = 'http://www.flickr...
267b0634546c55ebb42d6b1b9c3deca9d7408cc2
run_tests.py
run_tests.py
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation TEST_PATH Path to pac...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
Fix test runner to accept 1 arg
Fix test runner to accept 1 arg
Python
mit
the-blue-alliance/the-blue-alliance,synth3tk/the-blue-alliance,josephbisch/the-blue-alliance,verycumbersome/the-blue-alliance,josephbisch/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopr...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation TEST_PATH Path to pac...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
<commit_before>#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation TEST_PAT...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation TEST_PATH Path to pac...
<commit_before>#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation TEST_PAT...
def9d7037a3c629f63e1a0d8c1721501abc110cd
linguee_api/downloaders/httpx_downloader.py
linguee_api/downloaders/httpx_downloader.py
import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader class HTTPXDownloader(IDownloader): """ Real downloader. Sends request to linguee.com to read the page. """ async def download(self, url: str) -> str: async with httpx.AsyncClient() as client: ...
import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader ERROR_503 = ( "The Linguee server returned 503. The API proxy was temporarily blocked by " "Linguee. For more details, see https://github.com/imankulov/linguee-api#" "the-api-server-returns-the-linguee-server-returned...
Update the 503 error message.
Update the 503 error message.
Python
mit
imankulov/linguee-api
import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader class HTTPXDownloader(IDownloader): """ Real downloader. Sends request to linguee.com to read the page. """ async def download(self, url: str) -> str: async with httpx.AsyncClient() as client: ...
import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader ERROR_503 = ( "The Linguee server returned 503. The API proxy was temporarily blocked by " "Linguee. For more details, see https://github.com/imankulov/linguee-api#" "the-api-server-returns-the-linguee-server-returned...
<commit_before>import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader class HTTPXDownloader(IDownloader): """ Real downloader. Sends request to linguee.com to read the page. """ async def download(self, url: str) -> str: async with httpx.AsyncClient() a...
import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader ERROR_503 = ( "The Linguee server returned 503. The API proxy was temporarily blocked by " "Linguee. For more details, see https://github.com/imankulov/linguee-api#" "the-api-server-returns-the-linguee-server-returned...
import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader class HTTPXDownloader(IDownloader): """ Real downloader. Sends request to linguee.com to read the page. """ async def download(self, url: str) -> str: async with httpx.AsyncClient() as client: ...
<commit_before>import httpx from linguee_api.downloaders.interfaces import DownloaderError, IDownloader class HTTPXDownloader(IDownloader): """ Real downloader. Sends request to linguee.com to read the page. """ async def download(self, url: str) -> str: async with httpx.AsyncClient() a...
ffa00eaea02cda8258bf42d4fa733fb8693e2f0c
chemtrails/apps.py
chemtrails/apps.py
# -*- coding: utf-8 -*- from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' def ready(s...
# -*- coding: utf-8 -*- import os from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' ...
Read Neo4j config from ENV if present
Read Neo4j config from ENV if present
Python
mit
inonit/django-chemtrails,inonit/django-chemtrails,inonit/django-chemtrails
# -*- coding: utf-8 -*- from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' def ready(s...
# -*- coding: utf-8 -*- import os from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' ...
<commit_before># -*- coding: utf-8 -*- from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' ...
# -*- coding: utf-8 -*- import os from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' ...
# -*- coding: utf-8 -*- from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' def ready(s...
<commit_before># -*- coding: utf-8 -*- from django.apps import AppConfig from django.conf import settings from django.db.models.signals import m2m_changed, post_migrate, post_save, pre_delete from neomodel import config config.AUTO_INSTALL_LABELS = False class ChemTrailsConfig(AppConfig): name = 'chemtrails' ...
7a688f0712ff323668955a21ea335f3308fcc840
wurstmineberg.45s.py
wurstmineberg.45s.py
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
Add “Start Minecraft” menu item
Add “Start Minecraft” menu item From https://github.com/matryer/bitbar-plugins/blob/master/Games/minecraftplayers.1m.py
Python
mit
wurstmineberg/bitbar-server-status
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
<commit_before>#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['ve...
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
<commit_before>#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['ve...
6cc904a4ee48f8bdbc52cff6cda254e5e69b3c48
framework/analytics/migrate.py
framework/analytics/migrate.py
from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It is possible to b...
from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It is possible to b...
Update to latest version of ODM: Join queries with `&`, not `,`
Update to latest version of ODM: Join queries with `&`, not `,`
Python
apache-2.0
brandonPurvis/osf.io,GaryKriebel/osf.io,brianjgeiger/osf.io,kch8qx/osf.io,leb2dg/osf.io,zachjanicki/osf.io,cosenal/osf.io,jeffreyliu3230/osf.io,kushG/osf.io,mluo613/osf.io,GaryKriebel/osf.io,njantrania/osf.io,jinluyuan/osf.io,erinspace/osf.io,mfraezz/osf.io,barbour-em/osf.io,adlius/osf.io,HarryRybacki/osf.io,hmoco/osf....
from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It is possible to b...
from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It is possible to b...
<commit_before>from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It i...
from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It is possible to b...
from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It is possible to b...
<commit_before>from website.app import init_app from website.models import Node, User from framework import Q from framework.analytics import piwik app = init_app("website.settings", set_backends=True) # NOTE: This is a naive implementation for migration, requiring a POST request # for every user and every node. It i...
75a4097006e6ea5f1693b9d746456b060974d8a0
mtglib/__init__.py
mtglib/__init__.py
__version__ = '1.5.2' __author__ = 'Cameron Higby-Naquin'
__version__ = '1.6.0' __author__ = 'Cameron Higby-Naquin'
Increment minor version for new feature release.
Increment minor version for new feature release.
Python
mit
chigby/mtg,chigby/mtg
__version__ = '1.5.2' __author__ = 'Cameron Higby-Naquin' Increment minor version for new feature release.
__version__ = '1.6.0' __author__ = 'Cameron Higby-Naquin'
<commit_before>__version__ = '1.5.2' __author__ = 'Cameron Higby-Naquin' <commit_msg>Increment minor version for new feature release.<commit_after>
__version__ = '1.6.0' __author__ = 'Cameron Higby-Naquin'
__version__ = '1.5.2' __author__ = 'Cameron Higby-Naquin' Increment minor version for new feature release.__version__ = '1.6.0' __author__ = 'Cameron Higby-Naquin'
<commit_before>__version__ = '1.5.2' __author__ = 'Cameron Higby-Naquin' <commit_msg>Increment minor version for new feature release.<commit_after>__version__ = '1.6.0' __author__ = 'Cameron Higby-Naquin'
d4db750d2ff2e18c9fced49fffe7a3073880078b
InvenTree/common/apps.py
InvenTree/common/apps.py
# -*- coding: utf-8 -*- from django.apps import AppConfig class CommonConfig(AppConfig): name = 'common' def ready(self): pass
# -*- coding: utf-8 -*- import logging from django.apps import AppConfig logger = logging.getLogger('inventree') class CommonConfig(AppConfig): name = 'common' def ready(self): self.clear_restart_flag() def clear_restart_flag(self): """ Clear the SERVER_RESTART_REQUI...
Clear the SERVER_RESTART_REQUIRED flag automatically when the server reloads
Clear the SERVER_RESTART_REQUIRED flag automatically when the server reloads
Python
mit
SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree
# -*- coding: utf-8 -*- from django.apps import AppConfig class CommonConfig(AppConfig): name = 'common' def ready(self): pass Clear the SERVER_RESTART_REQUIRED flag automatically when the server reloads
# -*- coding: utf-8 -*- import logging from django.apps import AppConfig logger = logging.getLogger('inventree') class CommonConfig(AppConfig): name = 'common' def ready(self): self.clear_restart_flag() def clear_restart_flag(self): """ Clear the SERVER_RESTART_REQUI...
<commit_before># -*- coding: utf-8 -*- from django.apps import AppConfig class CommonConfig(AppConfig): name = 'common' def ready(self): pass <commit_msg>Clear the SERVER_RESTART_REQUIRED flag automatically when the server reloads<commit_after>
# -*- coding: utf-8 -*- import logging from django.apps import AppConfig logger = logging.getLogger('inventree') class CommonConfig(AppConfig): name = 'common' def ready(self): self.clear_restart_flag() def clear_restart_flag(self): """ Clear the SERVER_RESTART_REQUI...
# -*- coding: utf-8 -*- from django.apps import AppConfig class CommonConfig(AppConfig): name = 'common' def ready(self): pass Clear the SERVER_RESTART_REQUIRED flag automatically when the server reloads# -*- coding: utf-8 -*- import logging from django.apps import AppConfig logger = logging.get...
<commit_before># -*- coding: utf-8 -*- from django.apps import AppConfig class CommonConfig(AppConfig): name = 'common' def ready(self): pass <commit_msg>Clear the SERVER_RESTART_REQUIRED flag automatically when the server reloads<commit_after># -*- coding: utf-8 -*- import logging from django.app...
ae918211a85654d7eaa848cbd09f717d0339f844
database_email_backend/backend.py
database_email_backend/backend.py
#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: retur...
#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: retur...
Convert everything to unicode strings before inserting to DB
Convert everything to unicode strings before inserting to DB
Python
mit
machtfit/django-database-email-backend,machtfit/django-database-email-backend,jbinary/django-database-email-backend,stefanfoulis/django-database-email-backend,jbinary/django-database-email-backend
#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: retur...
#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: retur...
<commit_before>#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: ...
#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: retur...
#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: retur...
<commit_before>#-*- coding: utf-8 -*- from email.MIMEBase import MIMEBase from django.core.mail.backends.base import BaseEmailBackend from database_email_backend.models import Email, Attachment class DatabaseEmailBackend(BaseEmailBackend): def send_messages(self, email_messages): if not email_messages: ...
b4c97d3b7b914c193c018a1d808f0815778996b4
keystone/common/sql/data_migration_repo/versions/002_password_created_at_not_nullable.py
keystone/common/sql/data_migration_repo/versions/002_password_created_at_not_nullable.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Remove comment from previous migration
Remove comment from previous migration The migration was using a comment from the first one. Change-Id: I25dc9ca79f30f156bfc4296c44e141991119635e
Python
apache-2.0
ilay09/keystone,rajalokan/keystone,mahak/keystone,openstack/keystone,ilay09/keystone,openstack/keystone,mahak/keystone,mahak/keystone,openstack/keystone,rajalokan/keystone,rajalokan/keystone,ilay09/keystone
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
cd0b6af73dd49b4da851a75232b5829b91b9030c
genome_designer/conf/demo_settings.py
genome_designer/conf/demo_settings.py
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
Allow refresh materialized view in DEMO_MODE.
Allow refresh materialized view in DEMO_MODE.
Python
mit
woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone,churchlab/millstone,churchlab/millstone
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
<commit_before>""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_l...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_list_view', ...
<commit_before>""" Settings for DEMO_MODE. Must set DEMO_MODE = True in local_settings.py. """ # Views that are visible in demo mode. DEMO_SAFE_VIEWS = [ 'main.views.home_view', 'main.views.project_list_view', 'main.views.project_view', 'main.views.tab_root_analyze', 'main.views.reference_genome_l...
e073e020d46953e15f0fb30d2947028c42261fc1
cropimg/widgets.py
cropimg/widgets.py
from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None): try: attrs["data-value"] = getattr(value, "url", "") except ValueError: # attribute has no f...
from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None, renderer=None, **kwargs): try: attrs["data-value"] = getattr(value, "url", "") except ValueEr...
Make sure that the admin widget also supports Django 2
Make sure that the admin widget also supports Django 2
Python
mit
rewardz/cropimg-django,rewardz/cropimg-django,rewardz/cropimg-django
from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None): try: attrs["data-value"] = getattr(value, "url", "") except ValueError: # attribute has no f...
from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None, renderer=None, **kwargs): try: attrs["data-value"] = getattr(value, "url", "") except ValueEr...
<commit_before>from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None): try: attrs["data-value"] = getattr(value, "url", "") except ValueError: # att...
from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None, renderer=None, **kwargs): try: attrs["data-value"] = getattr(value, "url", "") except ValueEr...
from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None): try: attrs["data-value"] = getattr(value, "url", "") except ValueError: # attribute has no f...
<commit_before>from django.forms.widgets import Input, ClearableFileInput from django.template.loader import render_to_string class CIImgWidget(ClearableFileInput): def render(self, name, value, attrs=None): try: attrs["data-value"] = getattr(value, "url", "") except ValueError: # att...
413bebe630c29764dcbf17b114662427edfdac3c
pydot/errors.py
pydot/errors.py
class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response try: self.err_code = js...
class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response self.err_code = json_response.get('...
Refactor error data extraction from JSON
Refactor error data extraction from JSON
Python
mit
joshgeller/PyPardot
class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response try: self.err_code = js...
class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response self.err_code = json_response.get('...
<commit_before>class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response try: sel...
class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response self.err_code = json_response.get('...
class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response try: self.err_code = js...
<commit_before>class PardotAPIError(Exception): """ Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out the error code and message. """ def __init__(self, json_response): self.response = json_response try: sel...
13e4a0ef064460ffa90bc150dc04b9a1fff26a1c
blanc_basic_news/news/templatetags/news_tags.py
blanc_basic_news/news/templatetags/news_tags.py
from django import template from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('date', 'month')
from django import template from django.utils import timezone from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('da...
Add a template tag to get the latest news posts.
Add a template tag to get the latest news posts.
Python
bsd-3-clause
blancltd/blanc-basic-news
from django import template from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('date', 'month') Add a template tag t...
from django import template from django.utils import timezone from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('da...
<commit_before>from django import template from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('date', 'month') <comm...
from django import template from django.utils import timezone from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('da...
from django import template from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('date', 'month') Add a template tag t...
<commit_before>from django import template from blanc_basic_news.news.models import Category, Post register = template.Library() @register.assignment_tag def get_news_categories(): return Category.objects.all() @register.assignment_tag def get_news_months(): return Post.objects.dates('date', 'month') <comm...
649f2aa5a23541a4c57372eeb34a337d84dd0f86
timed/tests/test_serializers.py
timed/tests/test_serializers.py
from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta: pk_key...
from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta: resour...
Remove obsolete pk_key in test
Remove obsolete pk_key in test
Python
agpl-3.0
adfinis-sygroup/timed-backend,adfinis-sygroup/timed-backend,adfinis-sygroup/timed-backend
from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta: pk_key...
from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta: resour...
<commit_before>from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta:...
from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta: resour...
from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta: pk_key...
<commit_before>from datetime import timedelta import pytest from rest_framework_json_api.serializers import DurationField, IntegerField from timed.serializers import DictObjectSerializer class MyPkDictSerializer(DictObjectSerializer): test_duration = DurationField() test_nr = IntegerField() class Meta:...
2b2401fcbefc5c385f5e84057a76a4fcdbed0030
serfnode/handler/handler.py
serfnode/handler/handler.py
#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '__main__': ...
#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '__main__': ...
Set 'no_role' if role is not given
Set 'no_role' if role is not given
Python
mit
waltermoreira/serfnode,waltermoreira/serfnode,waltermoreira/serfnode
#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '__main__': ...
#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '__main__': ...
<commit_before>#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '...
#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '__main__': ...
#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '__main__': ...
<commit_before>#!/usr/bin/env python import os from serf_master import SerfHandlerProxy from base_handler import BaseHandler try: from my_handler import MyHandler except ImportError: print "Could not import user's handler." print "Defaulting to dummy handler." MyHandler = BaseHandler if __name__ == '...
62a3ab3409dbc1dd22896fb7c3b5376c1b6432e2
AcmePlumbingSend.py
AcmePlumbingSend.py
import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.selection_at_cursor...
import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.selection_at_cursor...
Remove artefact from earlier left mouse button selection
Remove artefact from earlier left mouse button selection You used to be able to select with the left mouse button and then right click. You can't now.
Python
mit
lionicsheriff/SublimeAcmePlumbing
import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.selection_at_cursor...
import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.selection_at_cursor...
<commit_before>import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.sele...
import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.selection_at_cursor...
import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.selection_at_cursor...
<commit_before>import sublime, sublime_plugin import os from .Mouse import MouseCommand class AcmePlumbingSend(MouseCommand): """ Sends the current selected text to the plumbing """ def run(self, edit): file_name = self.view.file_name() message = { "data": self.view.substr(self.sele...
ed2c56cd044f905c4325f42b4e9cf7a5df913bfd
books/models.py
books/models.py
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
Set created time with default callback
Set created time with default callback auto_now is evil, as any editing and overriding is almost completely impossible (e.g. unittesting)
Python
mit
trimailov/finance,trimailov/finance,trimailov/finance
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
<commit_before>from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), )...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), ) title = f...
<commit_before>from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): EXPENSE = 'exp' INCOME = 'inc' CATEGORY_CHOICES = ( (EXPENSE, 'expense'), (INCOME, 'income'), )...
5bc51f525c702cd43d3d7bc3819d179815c41807
foliant/backends/pre.py
foliant/backends/pre.py
from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', def __init__(sel...
from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', def __init__(sel...
Allow to override the top-level slug.
Allow to override the top-level slug.
Python
mit
foliant-docs/foliant
from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', def __init__(sel...
from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', def __init__(sel...
<commit_before>from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', d...
from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', def __init__(sel...
from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', def __init__(sel...
<commit_before>from shutil import copytree, rmtree from foliant.utils import spinner from foliant.backends.base import BaseBackend class Backend(BaseBackend): '''Backend that just applies its preprocessors and returns a project that doesn't need any further preprocessing. ''' targets = 'pre', d...
4e3e1c3e70f5ba60ae9637febe4d95348561dd47
db/editjsonfile.py
db/editjsonfile.py
#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess.call([os.geten...
#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess.call([os.geten...
Clean up input and output.
Clean up input and output.
Python
agpl-3.0
vincebusam/pyWebCash,vincebusam/pyWebCash,vincebusam/pyWebCash
#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess.call([os.geten...
#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess.call([os.geten...
<commit_before>#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess...
#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess.call([os.geten...
#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess.call([os.geten...
<commit_before>#!/usr/bin/python import os import sys import json import getpass import tempfile import subprocess import aesjsonfile def editfile(fn, password): db = aesjsonfile.load(fn, password) f = tempfile.NamedTemporaryFile() json.dump(db, f, indent=2) f.flush() while True: subprocess...
c37e3fe832ef3f584a60783a474b31f9f91e3735
github_webhook/test_webhook.py
github_webhook/test_webhook.py
"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN app = Mock() # WHEN webhook = Webhook(app) ...
"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest try: from unittest.mock import Mock except ImportError: from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN ...
Fix mock import for Python 3
Fix mock import for Python 3
Python
apache-2.0
fophillips/python-github-webhook
"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN app = Mock() # WHEN webhook = Webhook(app) ...
"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest try: from unittest.mock import Mock except ImportError: from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN ...
<commit_before>"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN app = Mock() # WHEN webhook = ...
"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest try: from unittest.mock import Mock except ImportError: from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN ...
"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN app = Mock() # WHEN webhook = Webhook(app) ...
<commit_before>"""Tests for github_webhook.webhook""" from __future__ import print_function import unittest from mock import Mock from github_webhook.webhook import Webhook class TestWebhook(unittest.TestCase): def test_constructor(self): # GIVEN app = Mock() # WHEN webhook = ...
8adbb5c9cc089663bcdc62496415d666c9f818a3
service/inchi.py
service/inchi.py
import requests import json from subprocess import Popen, PIPE import tempfile import os config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if request.status_code =...
import requests import json from subprocess import Popen, PIPE import tempfile import os import sys config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if request.st...
Add log statement if REST API can't be accessed
Add log statement if REST API can't be accessed
Python
bsd-3-clause
OpenChemistry/mongochemweb,OpenChemistry/mongochemweb
import requests import json from subprocess import Popen, PIPE import tempfile import os config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if request.status_code =...
import requests import json from subprocess import Popen, PIPE import tempfile import os import sys config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if request.st...
<commit_before>import requests import json from subprocess import Popen, PIPE import tempfile import os config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if reques...
import requests import json from subprocess import Popen, PIPE import tempfile import os import sys config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if request.st...
import requests import json from subprocess import Popen, PIPE import tempfile import os config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if request.status_code =...
<commit_before>import requests import json from subprocess import Popen, PIPE import tempfile import os config = {} with open ('../config/conversion.json') as fp: config = json.load(fp) def to_cml(inchi): request = requests.get('%s/service/chemical/cjson/?q=inchi~eq~%s' % (config['baseUrl'], inchi)) if reques...
94bcaa24f0dc1c0750023770574e26bb41183c6a
hangupsbot/plugins/namelock.py
hangupsbot/plugins/namelock.py
"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom be? chatna...
"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom be? chatna...
Make hangout rename itself after setchatname is called
Make hangout rename itself after setchatname is called
Python
agpl-3.0
makiftasova/hangoutsbot,cd334/hangoutsbot,jhonnyam123/hangoutsbot
"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom be? chatna...
"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom be? chatna...
<commit_before>"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom...
"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom be? chatna...
"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom be? chatna...
<commit_before>"""Allows the user to configure the bot to watch for hangout renames and change the name back to a default name accordingly""" def setchatname(bot, event, *args): """Set a chat name. If no parameters given, remove chat name""" truncatelength = 32 # What should the maximum length of the chatroom...
89b7b7f7fe1ec50f1d0bdfba7581f76326efe717
dacapo_analyzer.py
dacapo_analyzer.py
import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
Use only msecs of dacapo output.
[client] Use only msecs of dacapo output. Signed-off-by: Michael Markert <[email protected]>
Python
mit
fhirschmann/penchy,fhirschmann/penchy
import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
<commit_before>import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
<commit_before>import re BENCHMARKS = set(( 'avrora' , 'batik' , 'eclipse' , 'fop' , 'h2' , 'jython' , 'luindex' , 'lusearch' , 'pmd' , 'sunflow' ...
f5cc0d9327f35d818b10e200404c849a5527aa50
indra/databases/hgnc_client.py
indra/databases/hgnc_client.py
import urllib2 import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/doc/str[@name='symbol']") if hgnc_name_tag is None: ...
import urllib2 from functools32 import lru_cache import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' @lru_cache(maxsize=1000) def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/...
Add caching to HGNC client
Add caching to HGNC client
Python
bsd-2-clause
johnbachman/belpy,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,bgyori/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,jmuhlich/indra,jmuhlich/indra...
import urllib2 import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/doc/str[@name='symbol']") if hgnc_name_tag is None: ...
import urllib2 from functools32 import lru_cache import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' @lru_cache(maxsize=1000) def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/...
<commit_before>import urllib2 import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/doc/str[@name='symbol']") if hgnc_name_t...
import urllib2 from functools32 import lru_cache import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' @lru_cache(maxsize=1000) def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/...
import urllib2 import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/doc/str[@name='symbol']") if hgnc_name_tag is None: ...
<commit_before>import urllib2 import xml.etree.ElementTree as et hgnc_url = 'http://rest.genenames.org/fetch/' def get_hgnc_name(hgnc_id): xml_tree = get_hgnc_entry(hgnc_id) if xml_tree is None: return None hgnc_name_tag =\ xml_tree.find("result/doc/str[@name='symbol']") if hgnc_name_t...
3b3da9ffc5f8247020d2c6c58f83d95e8dbf8dd6
serrano/cors.py
serrano/cors.py
from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' 'of SERRANO_COR...
from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' 'of SERRANO_COR...
Set Access-Control-Allow-Credentials for all responses
Set Access-Control-Allow-Credentials for all responses In order to inform the browser to set the Cookie header on requests, this header must be set otherwise the session is reset on every request.
Python
bsd-2-clause
chop-dbhi/serrano,chop-dbhi/serrano,rv816/serrano_night,rv816/serrano_night
from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' 'of SERRANO_COR...
from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' 'of SERRANO_COR...
<commit_before>from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' ...
from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' 'of SERRANO_COR...
from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' 'of SERRANO_COR...
<commit_before>from warnings import warn from django.conf import settings def patch_response(request, response, methods): if getattr(settings, 'SERRANO_CORS_ENABLED', False): if hasattr(settings, 'SERRANO_CORS_ORIGIN'): warn('SERRANO_CORS_ORIGIN has been deprecated in favor ' ...
73219ea03b46599b4e2c84a301599c7f1f331751
sal/urls.py
sal/urls.py
import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', auth_views.Login...
import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', auth_views.Login...
Fix linter complaint and append rather than cat lists.
Fix linter complaint and append rather than cat lists.
Python
apache-2.0
sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,salopensource/sal
import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', auth_views.Login...
import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', auth_views.Login...
<commit_before>import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', a...
import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', auth_views.Login...
import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', auth_views.Login...
<commit_before>import django.contrib.auth.views as auth_views from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.contrib.staticfiles import views admin.autodiscover() urlpatterns = [ url(r'^login/*$', a...
77a965f27f75a8a5268ad95538d6625cecb44bfa
south/models.py
south/models.py
from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) class Meta: unique_together = (('app_name', 'migration'),) @classmethod def for_migrat...
from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) @classmethod def for_migration(cls, migration): try: return cls.objects.get(app...
Remove unique_together on the model; the key length was too long on wide-character MySQL installs.
Remove unique_together on the model; the key length was too long on wide-character MySQL installs.
Python
apache-2.0
matthiask/south,matthiask/south
from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) class Meta: unique_together = (('app_name', 'migration'),) @classmethod def for_migrat...
from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) @classmethod def for_migration(cls, migration): try: return cls.objects.get(app...
<commit_before>from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) class Meta: unique_together = (('app_name', 'migration'),) @classmethod ...
from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) @classmethod def for_migration(cls, migration): try: return cls.objects.get(app...
from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) class Meta: unique_together = (('app_name', 'migration'),) @classmethod def for_migrat...
<commit_before>from django.db import models class MigrationHistory(models.Model): app_name = models.CharField(max_length=255) migration = models.CharField(max_length=255) applied = models.DateTimeField(blank=True) class Meta: unique_together = (('app_name', 'migration'),) @classmethod ...
3ff91625fc99e279078547220fb4358d647c828a
deflect/widgets.py
deflect/widgets.py
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
from __future__ import unicode_literals from itertools import chain from django.contrib.admin.widgets import AdminTextInputWidget from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(AdminTextInputWidget): """ ...
Change the superclass for admin DataList widget
Change the superclass for admin DataList widget This adds an additional class so it displays the same as other text fields in the admin interface.
Python
bsd-3-clause
jbittel/django-deflect
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
from __future__ import unicode_literals from itertools import chain from django.contrib.admin.widgets import AdminTextInputWidget from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(AdminTextInputWidget): """ ...
<commit_before>from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displa...
from __future__ import unicode_literals from itertools import chain from django.contrib.admin.widgets import AdminTextInputWidget from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(AdminTextInputWidget): """ ...
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
<commit_before>from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displa...
87929f67c0036bf9a0a2ad237c1a03b675484a74
mcgill_app/main.py
mcgill_app/main.py
import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude") # Temperatures of black bodies (K) mapped to style of lines on graph. te...
import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude / W * sr^-1 * m^-3") # Temperatures of black bodies (K) mapped to style of lin...
Change units on graph y-axis
Change units on graph y-axis
Python
mit
jackromo/GSOCMcgillApplication
import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude") # Temperatures of black bodies (K) mapped to style of lines on graph. te...
import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude / W * sr^-1 * m^-3") # Temperatures of black bodies (K) mapped to style of lin...
<commit_before>import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude") # Temperatures of black bodies (K) mapped to style of lines o...
import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude / W * sr^-1 * m^-3") # Temperatures of black bodies (K) mapped to style of lin...
import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude") # Temperatures of black bodies (K) mapped to style of lines on graph. te...
<commit_before>import graphs import star def main(): """ Plots graph of black body emission wavelengths against amplitudes, then UBVR magnitudes of a star. """ graph = graphs.FunctionsGraph(x_label="wavelength / m", y_label="amplitude") # Temperatures of black bodies (K) mapped to style of lines o...
87cfac55b14083fdb8e346b9db1a95bb0f63881a
connect/config/factories.py
connect/config/factories.py
import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com" % n) class S...
import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com" % n) class S...
Reconfigure SiteConfigFactory to use JPG - removes pillow's libjpeg-dev dependency
Reconfigure SiteConfigFactory to use JPG - removes pillow's libjpeg-dev dependency
Python
bsd-3-clause
nlhkabu/connect,f3r3nc/connect,f3r3nc/connect,f3r3nc/connect,nlhkabu/connect,f3r3nc/connect,nlhkabu/connect,nlhkabu/connect
import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com" % n) class S...
import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com" % n) class S...
<commit_before>import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com"...
import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com" % n) class S...
import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com" % n) class S...
<commit_before>import factory from django.contrib.sites.models import Site from connect.config.models import SiteConfig class SiteFactory(factory.django.DjangoModelFactory): class Meta: model = Site name = factory.Sequence(lambda n: "site%s" % n) domain = factory.Sequence(lambda n: "site%s.com"...
78ba73998168d8e723d1c62942b19dabfd9ab229
src/constants.py
src/constants.py
#!/usr/bin/env python SIMULATION_TIME_IN_SECONDS = 40 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90 TRAJECTORY_TYPE = 'linear'
#!/usr/bin/env python TRAJECTORY_TYPE = 'circular' if TRAJECTORY_TYPE == 'linear': SIMULATION_TIME_IN_SECONDS = 40 elif TRAJECTORY_TYPE == 'circular': SIMULATION_TIME_IN_SECONDS = 120 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90
Define simulation time for linear and circular trajectories
Define simulation time for linear and circular trajectories
Python
mit
bit0001/trajectory_tracking,bit0001/trajectory_tracking
#!/usr/bin/env python SIMULATION_TIME_IN_SECONDS = 40 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90 TRAJECTORY_TYPE = 'linear' Define simulation time for linear and circular trajectories
#!/usr/bin/env python TRAJECTORY_TYPE = 'circular' if TRAJECTORY_TYPE == 'linear': SIMULATION_TIME_IN_SECONDS = 40 elif TRAJECTORY_TYPE == 'circular': SIMULATION_TIME_IN_SECONDS = 120 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90
<commit_before>#!/usr/bin/env python SIMULATION_TIME_IN_SECONDS = 40 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90 TRAJECTORY_TYPE = 'linear' <commit_msg>Define simulation time for linear and circular trajectories<commit_after>
#!/usr/bin/env python TRAJECTORY_TYPE = 'circular' if TRAJECTORY_TYPE == 'linear': SIMULATION_TIME_IN_SECONDS = 40 elif TRAJECTORY_TYPE == 'circular': SIMULATION_TIME_IN_SECONDS = 120 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90
#!/usr/bin/env python SIMULATION_TIME_IN_SECONDS = 40 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90 TRAJECTORY_TYPE = 'linear' Define simulation time for linear and circular trajectories#!/usr/bin/env python TRAJECTORY_TYPE = 'circular' if TRAJECTORY_...
<commit_before>#!/usr/bin/env python SIMULATION_TIME_IN_SECONDS = 40 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_IN_SECONDS / DELTA_T) K_V = 0.90 K_W = 0.90 TRAJECTORY_TYPE = 'linear' <commit_msg>Define simulation time for linear and circular trajectories<commit_after>#!/usr/bin/env python TRA...
9150618ca2a1c4b8917596547f73d9c1cc207fda
monkeys/release.py
monkeys/release.py
from invoke import task, run @task def makerelease(version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not local_only: ...
from invoke import task, run @task def makerelease(ctx, version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not local_only:...
Make invoke tasks work with the new version of invoke.
cm: Make invoke tasks work with the new version of invoke.
Python
apache-2.0
ludovicchabant/Wikked,ludovicchabant/Wikked,ludovicchabant/Wikked
from invoke import task, run @task def makerelease(version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not local_only: ...
from invoke import task, run @task def makerelease(ctx, version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not local_only:...
<commit_before>from invoke import task, run @task def makerelease(version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not l...
from invoke import task, run @task def makerelease(ctx, version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not local_only:...
from invoke import task, run @task def makerelease(version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not local_only: ...
<commit_before>from invoke import task, run @task def makerelease(version, local_only=False): if not version: raise Exception("You must specify a version!") # FoodTruck assets. print("Update node modules") run("npm install") print("Generating Wikked assets") run("grunt") if not l...
b3413818bf651c13cef047132813fb26a185cd33
indra/tests/test_reading_files.py
indra/tests/test_reading_files.py
from os import path from indra.tools.reading.read_files import read_files, get_readers from nose.plugins.attrib import attr @attr('slow', 'nonpublic') def test_read_files(): "Test that the system can read files." # Create the test files. example_files = [] # Get txt content abstract_txt = ("This...
from os import path from indra.tools.reading.read_files import read_files, get_reader_classes from nose.plugins.attrib import attr from indra.tools.reading.readers import EmptyReader @attr('slow', 'nonpublic', 'notravis') def test_read_files(): "Test that the system can read files." # Create the test files....
Fix the reading files test.
Fix the reading files test.
Python
bsd-2-clause
johnbachman/belpy,pvtodorov/indra,sorgerlab/indra,bgyori/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/indra,johnbachman/indra,bgyori/indra,sorgerlab/indra,pvtodorov/indra,johnbachman/belpy
from os import path from indra.tools.reading.read_files import read_files, get_readers from nose.plugins.attrib import attr @attr('slow', 'nonpublic') def test_read_files(): "Test that the system can read files." # Create the test files. example_files = [] # Get txt content abstract_txt = ("This...
from os import path from indra.tools.reading.read_files import read_files, get_reader_classes from nose.plugins.attrib import attr from indra.tools.reading.readers import EmptyReader @attr('slow', 'nonpublic', 'notravis') def test_read_files(): "Test that the system can read files." # Create the test files....
<commit_before>from os import path from indra.tools.reading.read_files import read_files, get_readers from nose.plugins.attrib import attr @attr('slow', 'nonpublic') def test_read_files(): "Test that the system can read files." # Create the test files. example_files = [] # Get txt content abstra...
from os import path from indra.tools.reading.read_files import read_files, get_reader_classes from nose.plugins.attrib import attr from indra.tools.reading.readers import EmptyReader @attr('slow', 'nonpublic', 'notravis') def test_read_files(): "Test that the system can read files." # Create the test files....
from os import path from indra.tools.reading.read_files import read_files, get_readers from nose.plugins.attrib import attr @attr('slow', 'nonpublic') def test_read_files(): "Test that the system can read files." # Create the test files. example_files = [] # Get txt content abstract_txt = ("This...
<commit_before>from os import path from indra.tools.reading.read_files import read_files, get_readers from nose.plugins.attrib import attr @attr('slow', 'nonpublic') def test_read_files(): "Test that the system can read files." # Create the test files. example_files = [] # Get txt content abstra...
fd951edbef26dcab2a4b89036811520b22e77fcf
marry-fuck-kill/main.py
marry-fuck-kill/main.py
#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 b...
#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 b...
Remove TODO -- handlers have been cleaned up.
Remove TODO -- handlers have been cleaned up.
Python
apache-2.0
hjfreyer/marry-fuck-kill,hjfreyer/marry-fuck-kill
#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 b...
#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 b...
<commit_before>#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 # # Un...
#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 b...
#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 b...
<commit_before>#!/usr/bin/env python # # Copyright 2010 Hunter Freyer and Michael Kelly # # 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 # # Un...
366937921cfb13fd83fb5964d0373be48e3c8564
cmsplugin_plain_text/models.py
cmsplugin_plain_text/models.py
# -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body
# -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body def __str__(self): return self.body
Add `__str__` method to support Python 3
Add `__str__` method to support Python 3
Python
bsd-3-clause
chschuermann/cmsplugin-plain-text,chschuermann/cmsplugin-plain-text
# -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body Add `__str__` method to support Python 3
# -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body def __str__(self): return self.body
<commit_before># -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body <commit_msg>Add `__str__` method to ...
# -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body def __str__(self): return self.body
# -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body Add `__str__` method to support Python 3# -*- codin...
<commit_before># -*- coding: utf-8 -*- from cms.models import CMSPlugin from django.db import models from django.utils.translation import ugettext_lazy as _ class Plaintext(CMSPlugin): body = models.TextField(_('Plaintext')) def __unicode__(self): return self.body <commit_msg>Add `__str__` method to ...
d15bfddd59f0009852ff5f69a665c8858a5cdd40
__init__.py
__init__.py
r""" ============================================ msm - Markov state models (:mod:`pyemma.msm`) ============================================ .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ """ from . import analysis from . import estimation from . import generation from . ...
r""" ============================================= msm - Markov state models (:mod:`pyemma.msm`) ============================================= .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ its msm tpt cktest hmsm """ from . import analysis from . impor...
Add autodoc for msm user-API
[doc] Add autodoc for msm user-API
Python
bsd-3-clause
clonker/ci-tests
r""" ============================================ msm - Markov state models (:mod:`pyemma.msm`) ============================================ .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ """ from . import analysis from . import estimation from . import generation from . ...
r""" ============================================= msm - Markov state models (:mod:`pyemma.msm`) ============================================= .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ its msm tpt cktest hmsm """ from . import analysis from . impor...
<commit_before>r""" ============================================ msm - Markov state models (:mod:`pyemma.msm`) ============================================ .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ """ from . import analysis from . import estimation from . import gen...
r""" ============================================= msm - Markov state models (:mod:`pyemma.msm`) ============================================= .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ its msm tpt cktest hmsm """ from . import analysis from . impor...
r""" ============================================ msm - Markov state models (:mod:`pyemma.msm`) ============================================ .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ """ from . import analysis from . import estimation from . import generation from . ...
<commit_before>r""" ============================================ msm - Markov state models (:mod:`pyemma.msm`) ============================================ .. currentmodule:: pyemma.msm User-API -------- .. autosummary:: :toctree: generated/ """ from . import analysis from . import estimation from . import gen...
08c2f9fe24b6ce7697bf725e70855e8d6861c370
pandas/__init__.py
pandas/__init__.py
"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pandas except Impor...
"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pandas except Impor...
Use only absolute imports for python 3
Use only absolute imports for python 3
Python
apache-2.0
Kitware/romanesco,Kitware/romanesco,girder/girder_worker,girder/girder_worker,girder/girder_worker,Kitware/romanesco,Kitware/romanesco
"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pandas except Impor...
"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pandas except Impor...
<commit_before>"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pand...
"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pandas except Impor...
"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pandas except Impor...
<commit_before>"""This package contains interface adapters for pandas. On import, this package detects if pandas is installed. If it is installed, then the contained modules are imported to register the pandas classes with Gaia. If pandas is not found, this package will contain no modules. """ try: import pand...
8e900343312fa644a21e5b209b83431ced3c3020
inet/constants.py
inet/constants.py
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ.get("OPS_KEY") OPS_SECRET = os.environ.get("OPS_SECRET") TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS = os.environ['T...
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ["OPS_KEY"] OPS_SECRET = os.environ["OPS_SECRET"] TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS = os.environ['TWITTER_A...
Access envvars using standard dictionary access isntead of get method to ensure missing vars cause an exception to be raised
Access envvars using standard dictionary access isntead of get method to ensure missing vars cause an exception to be raised
Python
mit
nestauk/inet
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ.get("OPS_KEY") OPS_SECRET = os.environ.get("OPS_SECRET") TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS = os.environ['T...
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ["OPS_KEY"] OPS_SECRET = os.environ["OPS_SECRET"] TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS = os.environ['TWITTER_A...
<commit_before>import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ.get("OPS_KEY") OPS_SECRET = os.environ.get("OPS_SECRET") TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS ...
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ["OPS_KEY"] OPS_SECRET = os.environ["OPS_SECRET"] TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS = os.environ['TWITTER_A...
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ.get("OPS_KEY") OPS_SECRET = os.environ.get("OPS_SECRET") TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS = os.environ['T...
<commit_before>import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) OPS_KEY = os.environ.get("OPS_KEY") OPS_SECRET = os.environ.get("OPS_SECRET") TWITTER_CONSUMER_ACCESS = os.environ['TWITTER_CONSUMER_ACCESS'] TWITTER_CONSUMER_SECRET = os.environ['TWITTER_CONSUMER_SECRET'] TWITTER_ACCESS ...
08247c2d4cb3cf1879b568697d7888728ebb1c3b
parse_rest/role.py
parse_rest/role.py
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
Handle adding and removing relations from Roles.
Handle adding and removing relations from Roles. This adds addRelation and removeRelation capabilities to Role, making it possible to add users to the users column and roles to the roles column in a Role object, for example. This prevents the error of Role not having the attribute addRelation or removeRelation when tr...
Python
mit
alacroix/ParsePy,milesrichardson/ParsePy,milesrichardson/ParsePy,alacroix/ParsePy
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
<commit_before># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hop...
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will ...
<commit_before># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hop...
d0f4209f373d91a82339ddfc15445e84f4cf0ac8
oscar_sagepay/config.py
oscar_sagepay/config.py
from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' VPS_AUTHORISE...
from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' VPS_AUTHORISE...
Fix typo retrieving vendor prefix
Fix typo retrieving vendor prefix Properly get the OSCAR_SAGEPAY_TX_CODE_PREFIX from the project settings
Python
bsd-3-clause
django-oscar/django-oscar-sagepay-direct
from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' VPS_AUTHORISE...
from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' VPS_AUTHORISE...
<commit_before>from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' ...
from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' VPS_AUTHORISE...
from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' VPS_AUTHORISE...
<commit_before>from django.conf import settings VPS_PROTOCOL = getattr(settings, 'OSCAR_SAGEPAY_VPS_PROTOCOL', '3.0') VENDOR = settings.OSCAR_SAGEPAY_VENDOR TEST_MODE = getattr(settings, 'OSCAR_SAGEPAY_TEST_MODE', True) if TEST_MODE: VPS_REGISTER_URL = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp' ...
fe34b3be69c119729febefd23f80a24203383f8a
pidman/__init__.py
pidman/__init__.py
# Project Version and Author Information __author__ = "EUL Systems" __copyright__ = "Copyright 2010, Emory University General Library" __credits__ = ["Rebecca Koeser", "Ben Ranker", "Alex Thomas", "Scott Turnbull"] __email__ = "[email protected]" # Version Info, parsed below for actual version number. _...
Update project version and other metadata from previous
Update project version and other metadata from previous
Python
apache-2.0
emory-libraries/pidman,emory-libraries/pidman
Update project version and other metadata from previous
# Project Version and Author Information __author__ = "EUL Systems" __copyright__ = "Copyright 2010, Emory University General Library" __credits__ = ["Rebecca Koeser", "Ben Ranker", "Alex Thomas", "Scott Turnbull"] __email__ = "[email protected]" # Version Info, parsed below for actual version number. _...
<commit_before><commit_msg>Update project version and other metadata from previous<commit_after>
# Project Version and Author Information __author__ = "EUL Systems" __copyright__ = "Copyright 2010, Emory University General Library" __credits__ = ["Rebecca Koeser", "Ben Ranker", "Alex Thomas", "Scott Turnbull"] __email__ = "[email protected]" # Version Info, parsed below for actual version number. _...
Update project version and other metadata from previous# Project Version and Author Information __author__ = "EUL Systems" __copyright__ = "Copyright 2010, Emory University General Library" __credits__ = ["Rebecca Koeser", "Ben Ranker", "Alex Thomas", "Scott Turnbull"] __email__ = "[email protected]" # ...
<commit_before><commit_msg>Update project version and other metadata from previous<commit_after># Project Version and Author Information __author__ = "EUL Systems" __copyright__ = "Copyright 2010, Emory University General Library" __credits__ = ["Rebecca Koeser", "Ben Ranker", "Alex Thomas", "Scott Turnbull"] __email__...
02d67008d0f0bdc205ca9168384c4a951c106a28
nintendo/common/transport.py
nintendo/common/transport.py
import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) def connect(self...
import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) def connect(self...
Add a few functions to Socket class
Add a few functions to Socket class
Python
mit
Kinnay/NintendoClients
import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) def connect(self...
import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) def connect(self...
<commit_before> import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) d...
import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) def connect(self...
import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) def connect(self...
<commit_before> import socket class Socket: TCP = 0 UDP = 1 def __init__(self, type): if type == self.TCP: self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) else: self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.s.setblocking(False) d...
60d8b38eac3c36bd754f5ed01aae6d3af1918adc
notifications/match_score.py
notifications/match_score.py
from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self._event_feed = match.event.id ...
from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self.event = match.event.get() sel...
Add district feed to match score notification
Add district feed to match score notification
Python
mit
phil-lopreiato/the-blue-alliance,verycumbersome/the-blue-alliance,verycumbersome/the-blue-alliance,fangeugene/the-blue-alliance,nwalters512/the-blue-alliance,the-blue-alliance/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,phil-lopreiato/the-blue-alliance,synth3tk/the-blue-alliance,synth3tk/the-b...
from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self._event_feed = match.event.id ...
from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self.event = match.event.get() sel...
<commit_before>from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self._event_feed = match.ev...
from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self.event = match.event.get() sel...
from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self._event_feed = match.event.id ...
<commit_before>from consts.notification_type import NotificationType from helpers.model_to_dict import ModelToDict from notifications.base_notification import BaseNotification class MatchScoreNotification(BaseNotification): def __init__(self, match): self.match = match self._event_feed = match.ev...
79c12316cf132acdb5e375ea30f1cc67d7fd11ed
thehonestgenepipeline/celeryconfig.py
thehonestgenepipeline/celeryconfig.py
from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='rpc://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = Exchange('imput...
from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='amqp://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = Exchange('impu...
Change from rpc to amqp backend
Change from rpc to amqp backend Otherwise retrieving result are problematic
Python
mit
TheHonestGene/thehonestgene-pipeline
from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='rpc://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = Exchange('imput...
from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='amqp://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = Exchange('impu...
<commit_before>from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='rpc://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = ...
from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='amqp://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = Exchange('impu...
from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='rpc://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = Exchange('imput...
<commit_before>from kombu import Exchange, Queue import os BROKER_URL = os.environ['CELERY_BROKER'] CELERY_RESULT_BACKEND='rpc://' CELERY_RESULT_PERSISTENT = True CELERY_DISABLE_RATE_LIMITS = True CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] imputation_exchange = ...
f4c56937caacb4709847d67752f4ff3cba4568f6
tests/test_it.py
tests/test_it.py
import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, skip_in_ci, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(SystemExit, deck...
import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(SystemExit, deck2pdf.main, []) ...
Remove decorator 'skip_in_ci' from test_files
Remove decorator 'skip_in_ci' from test_files Because implement stub of capture engine, 'Output slides pdf' test can run in CircleCI
Python
mit
attakei/deck2pdf-python,attakei/deck2pdf-python,attakei/slide2pdf,attakei/deck2pdf,attakei/slide2pdf,attakei/deck2pdf
import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, skip_in_ci, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(SystemExit, deck...
import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(SystemExit, deck2pdf.main, []) ...
<commit_before>import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, skip_in_ci, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(S...
import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(SystemExit, deck2pdf.main, []) ...
import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, skip_in_ci, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(SystemExit, deck...
<commit_before>import os import shutil import deck2pdf from pytest import raises from . import ( current_dir, test_dir, skip_in_ci, ) class TestForMain(object): def setUp(self): shutil.rmtree(os.path.join(current_dir, '.deck2pdf'), ignore_errors=True) def test_help(self): raises(S...
cabf0004d6e7e3687cdd2ebe9aebeede01877e69
tests/run_tests.py
tests/run_tests.py
""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': platform = '...
""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': platform = '...
Add unit to the test directories
Add unit to the test directories
Python
bsd-3-clause
jstnlef/pika,reddec/pika,pika/pika,Tarsbot/pika,Zephor5/pika,knowsis/pika,shinji-s/pika,fkarb/pika-python3,vitaly-krugl/pika,vrtsystems/pika,benjamin9999/pika,skftn/pika,renshawbay/pika-python3,hugoxia/pika,zixiliuyue/pika
""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': platform = '...
""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': platform = '...
<commit_before>""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': ...
""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': platform = '...
""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': platform = '...
<commit_before>""" Simple test runner to separate out the functional tests and the unit tests. """ import os import subprocess PLATFORMS = ['bsd', 'linux', 'nt'] # Detect what platform we are on try: platform = os.uname()[0].lower() except AttributeError: platform = os.name.lower() if platform == 'darwin': ...
d5b231fbc5dd32ded78e4499a49872487533cda4
tests/test_main.py
tests/test_main.py
from cookiecutter.main import is_repo_url def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True ...
from cookiecutter.main import is_repo_url, expand_abbreviations def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecut...
Implement a test specifically for abbreviations
Implement a test specifically for abbreviations
Python
bsd-3-clause
willingc/cookiecutter,michaeljoseph/cookiecutter,luzfcb/cookiecutter,stevepiercy/cookiecutter,pjbull/cookiecutter,ramiroluz/cookiecutter,luzfcb/cookiecutter,stevepiercy/cookiecutter,michaeljoseph/cookiecutter,pjbull/cookiecutter,cguardia/cookiecutter,terryjbates/cookiecutter,Springerle/cookiecutter,hackebrot/cookiecutt...
from cookiecutter.main import is_repo_url def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True ...
from cookiecutter.main import is_repo_url, expand_abbreviations def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecut...
<commit_before>from cookiecutter.main import is_repo_url def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecutter.git...
from cookiecutter.main import is_repo_url, expand_abbreviations def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecut...
from cookiecutter.main import is_repo_url def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecutter.git') is True ...
<commit_before>from cookiecutter.main import is_repo_url def test_is_repo_url(): """Verify is_repo_url works.""" assert is_repo_url('gitolite@server:team/repo') is True assert is_repo_url('[email protected]:audreyr/cookiecutter.git') is True assert is_repo_url('https://github.com/audreyr/cookiecutter.git...
1028afcdc1e8e1027b10fe5254f5fe5b9499eddd
tests/test_void.py
tests/test_void.py
"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): model = util.load_file_into_mod...
"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util, void def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): m = util.load_file_into_m...
Fix imports for void tests
Fix imports for void tests
Python
apache-2.0
ec-geolink/glharvest,ec-geolink/glharvest,ec-geolink/glharvest
"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): model = util.load_file_into_mod...
"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util, void def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): m = util.load_file_into_m...
<commit_before>"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): model = util.loa...
"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util, void def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): m = util.load_file_into_m...
"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): model = util.load_file_into_mod...
<commit_before>"""test_void.py Test the parsing of VoID dump files. """ import RDF from glharvest import util def test_returns_none_if_the_registry_file_is_not_found(): m = util.load_file_into_model("nonexistantvoidfile.ttl") assert m is None def test_can_load_a_simple_void_file(): model = util.loa...
43fd422599972f9385c9f3f9bc5a9a2e5947e0ea
web/webhooks.py
web/webhooks.py
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, repo): return HttpResponse() def dispatch(re...
import hashlib import hmac from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound from web import jucybot def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, ...
Check HMAC digests in webhook notifications before handling them.
Check HMAC digests in webhook notifications before handling them. Bump #1
Python
apache-2.0
Jucyio/Jucy,Jucyio/Jucy,Jucyio/Jucy
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, repo): return HttpResponse() def dispatch(re...
import hashlib import hmac from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound from web import jucybot def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, ...
<commit_before>from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, repo): return HttpResponse() ...
import hashlib import hmac from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound from web import jucybot def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, ...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, repo): return HttpResponse() def dispatch(re...
<commit_before>from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound def handle_ping(request, repo): return HttpResponse() def handle_issues(request, repo): return HttpResponse() def handle_issue_comment(request, repo): return HttpResponse() ...
f9884fc274d2068051edb41f9ad13ad25a7f1c72
isogram/isogram.py
isogram/isogram.py
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars))
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) # You could also achieve this using "c.isalpha()" instead of LOWERCASE # You would then not need to import from `string`, but it's ma...
Add note about str.isalpha() method as an alternative
Add note about str.isalpha() method as an alternative
Python
agpl-3.0
CubicComet/exercism-python-solutions
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) Add note about str.isalpha() method as an alternative
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) # You could also achieve this using "c.isalpha()" instead of LOWERCASE # You would then not need to import from `string`, but it's ma...
<commit_before>from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) <commit_msg>Add note about str.isalpha() method as an alternative<commit_after>
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) # You could also achieve this using "c.isalpha()" instead of LOWERCASE # You would then not need to import from `string`, but it's ma...
from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) Add note about str.isalpha() method as an alternativefrom string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_iso...
<commit_before>from string import ascii_lowercase LOWERCASE = set(ascii_lowercase) def is_isogram(s): chars = [c for c in s.lower() if c in LOWERCASE] return len(chars) == len(set(chars)) <commit_msg>Add note about str.isalpha() method as an alternative<commit_after>from string import ascii_lowercase LOWE...
16630b23238ee66c8e4ca6017db934befc6ab71e
py/garage/garage/sql/sqlite.py
py/garage/garage/sql/sqlite.py
__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_same_thread, ...
__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_same_thread, ...
Replace double quotes with single quotes
Replace double quotes with single quotes
Python
mit
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_same_thread, ...
__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_same_thread, ...
<commit_before>__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_...
__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_same_thread, ...
__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_same_thread, ...
<commit_before>__all__ = [ 'create_engine', ] import sqlalchemy def create_engine( db_uri, *, check_same_thread=False, echo=False, pragmas=()): engine = sqlalchemy.create_engine( db_uri, echo=echo, connect_args={ 'check_same_thread': check_...
d2c368995e33b375404e3c01f79fdc5a14a48282
polyaxon/libs/repos/utils.py
polyaxon/libs/repos/utils.py
from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_project_code_reference(project, commit=None): if not project.has_code: return None repo = project.repo if commit: try: return CodeReference.objects.get(repo=repo, commit=c...
from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_code_reference(instance, commit=None, external_repo=None): project = instance.project repo = project.repo if project.has_code else external_repo if not repo: return None if commit: ...
Extend code references with external repos
Extend code references with external repos
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_project_code_reference(project, commit=None): if not project.has_code: return None repo = project.repo if commit: try: return CodeReference.objects.get(repo=repo, commit=c...
from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_code_reference(instance, commit=None, external_repo=None): project = instance.project repo = project.repo if project.has_code else external_repo if not repo: return None if commit: ...
<commit_before>from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_project_code_reference(project, commit=None): if not project.has_code: return None repo = project.repo if commit: try: return CodeReference.objects.get(repo...
from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_code_reference(instance, commit=None, external_repo=None): project = instance.project repo = project.repo if project.has_code else external_repo if not repo: return None if commit: ...
from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_project_code_reference(project, commit=None): if not project.has_code: return None repo = project.repo if commit: try: return CodeReference.objects.get(repo=repo, commit=c...
<commit_before>from django.core.exceptions import ObjectDoesNotExist from db.models.repos import CodeReference def get_project_code_reference(project, commit=None): if not project.has_code: return None repo = project.repo if commit: try: return CodeReference.objects.get(repo...
db93242b97eb8733192d38c4b0af0377759fd647
pysal/model/access/__init__.py
pysal/model/access/__init__.py
from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access_log_stream from access import access
from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access
Update import for access changes
[BUG] Update import for access changes
Python
bsd-3-clause
pysal/pysal,weikang9009/pysal,lanselin/pysal,sjsrey/pysal
from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access_log_stream from access import access [BUG] Update import for access changes
from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access
<commit_before>from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access_log_stream from access import access <commit_msg>[BUG] Update import for access changes<commit_after>
from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access
from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access_log_stream from access import access [BUG] Update import for access changesfrom access import fca from access import raam from access import weights from ac...
<commit_before>from access import fca from access import raam from access import weights from access import helpers from access.datasets import datasets from access import access_log_stream from access import access <commit_msg>[BUG] Update import for access changes<commit_after>from access import fca from access impor...
724335a9719174d3aeb745ed2d4c161507a08bd3
pysparkling/fileio/textfile.py
pysparkling/fileio/textfile.py
from __future__ import absolute_import, unicode_literals import logging from io import StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file name. Supports t...
from __future__ import absolute_import, unicode_literals import logging from io import BytesIO, StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file name. S...
Add fileio.TextFile and use it when reading and writing text files in RDD and Context.
Add fileio.TextFile and use it when reading and writing text files in RDD and Context.
Python
mit
giserh/pysparkling
from __future__ import absolute_import, unicode_literals import logging from io import StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file name. Supports t...
from __future__ import absolute_import, unicode_literals import logging from io import BytesIO, StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file name. S...
<commit_before>from __future__ import absolute_import, unicode_literals import logging from io import StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file n...
from __future__ import absolute_import, unicode_literals import logging from io import BytesIO, StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file name. S...
from __future__ import absolute_import, unicode_literals import logging from io import StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file name. Supports t...
<commit_before>from __future__ import absolute_import, unicode_literals import logging from io import StringIO from . import codec from .file import File log = logging.getLogger(__name__) class TextFile(File): """ Derived from :class:`pysparkling.fileio.File`. :param file_name: Any text file n...
1b33866dd7f140efa035dfd32e0a912dfcf60f35
utils/kvtable.py
utils/kvtable.py
''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ def __init__(self, tdb, name='_default'): self.table = tdb.table(name) self.setting = Query() def get(self, key): """Get the value of na...
''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ setting = Query() def __init__(self, tdb, name='_default'): self.table = tdb.table(name) def get(self, key): """Get the value of named setti...
Use upsert to reduce chance of duplicates
Use upsert to reduce chance of duplicates
Python
mit
randomic/antinub-gregbot
''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ def __init__(self, tdb, name='_default'): self.table = tdb.table(name) self.setting = Query() def get(self, key): """Get the value of na...
''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ setting = Query() def __init__(self, tdb, name='_default'): self.table = tdb.table(name) def get(self, key): """Get the value of named setti...
<commit_before>''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ def __init__(self, tdb, name='_default'): self.table = tdb.table(name) self.setting = Query() def get(self, key): """Get ...
''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ setting = Query() def __init__(self, tdb, name='_default'): self.table = tdb.table(name) def get(self, key): """Get the value of named setti...
''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ def __init__(self, tdb, name='_default'): self.table = tdb.table(name) self.setting = Query() def get(self, key): """Get the value of na...
<commit_before>''' Abstraction of TinyDB table for storing config ''' from tinydb import Query class KeyValueTable: """Wrapper around a TinyDB table. """ def __init__(self, tdb, name='_default'): self.table = tdb.table(name) self.setting = Query() def get(self, key): """Get ...
d7db5b38bd90502575c68d7fd5548cb64cd7447a
services/disqus.py
services/disqus.py
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
Reword the permissions for Disqus
Reword the permissions for Disqus
Python
bsd-3-clause
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
<commit_before>from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info ab...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
<commit_before>from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info ab...
43a2f2f27110f45e8a0d19004dac097ae67949c9
gunicorn_config.py
gunicorn_config.py
import os import sys import traceback import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn.SERVER_SOFTWARE = 'None' def...
import os import sys import traceback import eventlet import socket import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn....
Fix rediss ssl eventlet sslerror bug
Fix rediss ssl eventlet sslerror bug This is the same as [^1]. I did a test deploy to double check that Redis on PaaS doesn't work without this. [^1]: https://github.com/alphagov/notifications-api/pull/3508/commits/a2cbe2032565c61b971659aed28ebd4b096ea87d
Python
mit
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
import os import sys import traceback import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn.SERVER_SOFTWARE = 'None' def...
import os import sys import traceback import eventlet import socket import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn....
<commit_before>import os import sys import traceback import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn.SERVER_SOFTWARE...
import os import sys import traceback import eventlet import socket import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn....
import os import sys import traceback import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn.SERVER_SOFTWARE = 'None' def...
<commit_before>import os import sys import traceback import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 5 worker_class = "eventlet" errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) disable_redirect_access_to_syslog = True gunicorn.SERVER_SOFTWARE...
9691ff0a1fa5fee4895cc5cff33ca169498dbbc6
encrypt.py
encrypt.py
from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = VideoFileClip(file...
from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = VideoFileClip(filen...
Add newline to a file
Add newline to a file
Python
apache-2.0
AntiPiracy/webapp,tcyrus-hackathon/scurvy-webapp,AntiPiracy/webapp,tcyrus-hackathon/scurvy-webapp,tcyrus-hackathon/scurvy-webapp,AntiPiracy/webapp
from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = VideoFileClip(file...
from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = VideoFileClip(filen...
<commit_before>from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = Vid...
from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = VideoFileClip(filen...
from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = VideoFileClip(file...
<commit_before>from PIL import Image import stepic import sys import os from moviepy.editor import * import moviepy.editor as mpy from moviepy.editor import VideoFileClip os.chdir("videos") def encrypt_video(filename, userinfo): # Orignal Video original = VideoFileClip(filename+".mp4") t0 = 56 first_half = Vid...
02ef2f1cb4e1e0bf3696ea68b73d0d9c3b9c8657
events/views.py
events/views.py
from datetime import date from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) return render_to_response('events/event_archive_month.html', {'month': month})
from datetime import date, timedelta from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) previous = month - timedelta(days=15) next = month + timedelta(days=45) return render_to_response('events/event_archive_month.html', { 'month': mont...
Add links to previous and next month
Add links to previous and next month
Python
agpl-3.0
vcorreze/agendaEteAccoord,vcorreze/agendaEteAccoord,mlhamel/agendadulibre,vcorreze/agendaEteAccoord,mlhamel/agendadulibre,mlhamel/agendadulibre
from datetime import date from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) return render_to_response('events/event_archive_month.html', {'month': month}) Add links to previous and next month
from datetime import date, timedelta from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) previous = month - timedelta(days=15) next = month + timedelta(days=45) return render_to_response('events/event_archive_month.html', { 'month': mont...
<commit_before>from datetime import date from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) return render_to_response('events/event_archive_month.html', {'month': month}) <commit_msg>Add links to previous and next month<commit_after>
from datetime import date, timedelta from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) previous = month - timedelta(days=15) next = month + timedelta(days=45) return render_to_response('events/event_archive_month.html', { 'month': mont...
from datetime import date from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) return render_to_response('events/event_archive_month.html', {'month': month}) Add links to previous and next monthfrom datetime import date, timedelta from django.sho...
<commit_before>from datetime import date from django.shortcuts import render_to_response def month (request, year, month): month = date(int(year), int(month), 1) return render_to_response('events/event_archive_month.html', {'month': month}) <commit_msg>Add links to previous and next month<commit_after>from dateti...
bf1f62cb7d91458e768ac31c26deb9ff67ff3a1e
rcamp/rcamp/settings/auth.py
rcamp/rcamp/settings/auth.py
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' }
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' }
Change PAM stack back to login
Change PAM stack back to login
Python
mit
ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' } Change PAM stack back to login
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' }
<commit_before>AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' } <commit_msg>Change PAM stack back to login<commit_after>
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' }
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' } Change PAM stack back to loginAUTHENTICATION_BACKENDS = ( 'django.contri...
<commit_before>AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' } <commit_msg>Change PAM stack back to login<commit_after>AUTHE...
a18f948a6b11522425aace5a591b5f622a5534d3
payments/forms.py
payments/forms.py
from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")])
from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): # pylint: disable=R0924 plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")])
Disable R0924 check on PlanForm
Disable R0924 check on PlanForm This check fails on Django 1.4 but not Django 1.5
Python
mit
crehana/django-stripe-payments,aibon/django-stripe-payments,jawed123/django-stripe-payments,aibon/django-stripe-payments,alexhayes/django-stripe-payments,adi-li/django-stripe-payments,alexhayes/django-stripe-payments,adi-li/django-stripe-payments,ZeevG/django-stripe-payments,jawed123/django-stripe-payments,grue/django-...
from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")]) Disable R0924 check on PlanForm This check fails on Django 1.4 but not Django 1.5
from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): # pylint: disable=R0924 plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")])
<commit_before>from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")]) <commit_msg>Disable R0924 check on PlanForm This check fails on Django 1.4 but not Django 1.5<commit_after>
from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): # pylint: disable=R0924 plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")])
from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")]) Disable R0924 check on PlanForm This check fails on Django 1.4 but not Django 1.5from django import forms from payments.settings import PLAN_CH...
<commit_before>from django import forms from payments.settings import PLAN_CHOICES class PlanForm(forms.Form): plan = forms.ChoiceField(choices=PLAN_CHOICES + [("", "-------")]) <commit_msg>Disable R0924 check on PlanForm This check fails on Django 1.4 but not Django 1.5<commit_after>from django import for...
b19330abc312c8bdfa66d46b8ed9f8541a371b6b
fbmsgbot/bot.py
fbmsgbot/bot.py
from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient() def send_message(self, message, completion): def _completion(response, error): print error ...
from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient(token) def send_message(self, message, completion): def _completion(response, error): print error ...
Fix errors in set_welcome and update for http_client
Fix errors in set_welcome and update for http_client
Python
mit
ben-cunningham/pybot,ben-cunningham/python-messenger-bot
from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient() def send_message(self, message, completion): def _completion(response, error): print error ...
from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient(token) def send_message(self, message, completion): def _completion(response, error): print error ...
<commit_before>from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient() def send_message(self, message, completion): def _completion(response, error): pri...
from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient(token) def send_message(self, message, completion): def _completion(response, error): print error ...
from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient() def send_message(self, message, completion): def _completion(response, error): print error ...
<commit_before>from http_client import HttpClient class Bot(): """ @brief Facebook messenger bot """ def __init__(self, token): self.api_token = token self.client = HttpClient() def send_message(self, message, completion): def _completion(response, error): pri...
3ede075c812b116629c5f514596669b16c4784df
fulltext/backends/__json.py
fulltext/backends/__json.py
import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): for item in obj: ...
import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): for item in obj: ...
Use format string. Readability. ValueError.
Use format string. Readability. ValueError.
Python
mit
btimby/fulltext,btimby/fulltext
import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): for item in obj: ...
import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): for item in obj: ...
<commit_before>import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): fo...
import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): for item in obj: ...
import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): for item in obj: ...
<commit_before>import json from six import StringIO from six import string_types from six import integer_types def _to_text(text, obj): if isinstance(obj, dict): for key in sorted(obj.keys()): _to_text(text, key) _to_text(text, obj[key]) elif isinstance(obj, list): fo...
8ba775d863e269e30ad60e0f449650575e3ff855
dthm4kaiako/config/__init__.py
dthm4kaiako/config/__init__.py
"""Configuration for Django system.""" __version__ = "0.16.0" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.16.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
Increment version number to 0.16.1
Increment version number to 0.16.1
Python
mit
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
"""Configuration for Django system.""" __version__ = "0.16.0" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.16.1
"""Configuration for Django system.""" __version__ = "0.16.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
<commit_before>"""Configuration for Django system.""" __version__ = "0.16.0" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.16.1<commit_after>
"""Configuration for Django system.""" __version__ = "0.16.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.16.0" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.16.1"""Configuration for Django system.""" __version__ = "0.16.1" __version_info...
<commit_before>"""Configuration for Django system.""" __version__ = "0.16.0" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.16.1<commit_after>"""Configuration for Django system."...
b6c8921b7281f24f5e8353cd0542d7ca1d18cf37
pymemcache/test/test_serde.py
pymemcache/test/test_serde.py
from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value) deserialized = python_memcache_dese...
from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) import pytest import six @pytest.mark.unit() class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value...
Use byte strings after serializing with serde
Use byte strings after serializing with serde The pymemcache client will return a byte string, so we'll do the same to test that the deserializer works as expected. This currently fails with Python 3.
Python
apache-2.0
sontek/pymemcache,ewdurbin/pymemcache,sontek/pymemcache,bwalks/pymemcache,pinterest/pymemcache,pinterest/pymemcache
from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value) deserialized = python_memcache_dese...
from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) import pytest import six @pytest.mark.unit() class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value...
<commit_before>from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value) deserialized = pytho...
from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) import pytest import six @pytest.mark.unit() class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value...
from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value) deserialized = python_memcache_dese...
<commit_before>from unittest import TestCase from pymemcache.serde import (python_memcache_serializer, python_memcache_deserializer) class TestSerde(TestCase): def check(self, value): serialized, flags = python_memcache_serializer(b'key', value) deserialized = pytho...
6e583085ac056b7df2b29a94cd6743493c151684
subjectivity_clues/clues.py
subjectivity_clues/clues.py
import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' def __init__(self, filename=DEFAULT_FILENAME): lines = self.read_all(filename) self.lexicons = self.parse_clues(lines) @staticmethod def read_a...
import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' PRIORPOLARITY = { 'positive': 1, 'negative': -1, 'both': 0, 'neutral': 0 } TYPE = { 'strongsubj': 2, 'weaksubj'...
Add calculation to the lexicon
Add calculation to the lexicon
Python
apache-2.0
chuajiesheng/twitter-sentiment-analysis
import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' def __init__(self, filename=DEFAULT_FILENAME): lines = self.read_all(filename) self.lexicons = self.parse_clues(lines) @staticmethod def read_a...
import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' PRIORPOLARITY = { 'positive': 1, 'negative': -1, 'both': 0, 'neutral': 0 } TYPE = { 'strongsubj': 2, 'weaksubj'...
<commit_before>import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' def __init__(self, filename=DEFAULT_FILENAME): lines = self.read_all(filename) self.lexicons = self.parse_clues(lines) @staticmethod...
import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' PRIORPOLARITY = { 'positive': 1, 'negative': -1, 'both': 0, 'neutral': 0 } TYPE = { 'strongsubj': 2, 'weaksubj'...
import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' def __init__(self, filename=DEFAULT_FILENAME): lines = self.read_all(filename) self.lexicons = self.parse_clues(lines) @staticmethod def read_a...
<commit_before>import os import shlex class Clues: DEFAULT_FILENAME = os.getcwd() + os.sep + 'subjectivity_clues' + os.sep + 'subjclueslen1-HLTEMNLP05.tff' def __init__(self, filename=DEFAULT_FILENAME): lines = self.read_all(filename) self.lexicons = self.parse_clues(lines) @staticmethod...
13d0dfd957c1159c7fe6377637b10996ef91afcd
imhotep/shas.py
imhotep/shas.py
from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self): retur...
from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self): retur...
Use github's `clone_url` instead of mandating ssh.
Use github's `clone_url` instead of mandating ssh.
Python
mit
richtier/imhotep,justinabrahms/imhotep,justinabrahms/imhotep
from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self): retur...
from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self): retur...
<commit_before>from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self)...
from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self): retur...
from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self): retur...
<commit_before>from collections import namedtuple Remote = namedtuple('Remote', ('name', 'url')) CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo', 'ref')) class PRInfo(object): def __init__(self, json): self.json = json @property def base_sha(self)...
0db4d0f3df3b9541aaf6301c11f83376debb41ff
lib/get_version.py
lib/get_version.py
#!/usr/bin/env python """ Extracts the version of the khmer project. """ import sys import pkg_resources try: print pkg_resources.get_distribution( # pylint: disable=E1103 'khmer').version except pkg_resources.DistributionNotFound: print 'To build the khmer library, the distribution information' ...
import sys sys.path.insert(0, '../') import versioneer versioneer.VCS = 'git' versioneer.versionfile_source = '../khmer/_version.py' versioneer.versionfile_build = '../khmer/_version.py' versioneer.tag_prefix = 'v' # tags are like v1.2.0 versioneer.parentdir_prefix = '..' print versioneer.get_version()
Use versioneer for ./lib version
Use versioneer for ./lib version - Allows the version to be obtained without khmer being installed.
Python
bsd-3-clause
Winterflower/khmer,kdmurray91/khmer,souravsingh/khmer,souravsingh/khmer,Winterflower/khmer,jas14/khmer,ged-lab/khmer,ged-lab/khmer,Winterflower/khmer,F1000Research/khmer,F1000Research/khmer,jas14/khmer,kdmurray91/khmer,souravsingh/khmer,ged-lab/khmer,kdmurray91/khmer,F1000Research/khmer,jas14/khmer
#!/usr/bin/env python """ Extracts the version of the khmer project. """ import sys import pkg_resources try: print pkg_resources.get_distribution( # pylint: disable=E1103 'khmer').version except pkg_resources.DistributionNotFound: print 'To build the khmer library, the distribution information' ...
import sys sys.path.insert(0, '../') import versioneer versioneer.VCS = 'git' versioneer.versionfile_source = '../khmer/_version.py' versioneer.versionfile_build = '../khmer/_version.py' versioneer.tag_prefix = 'v' # tags are like v1.2.0 versioneer.parentdir_prefix = '..' print versioneer.get_version()
<commit_before>#!/usr/bin/env python """ Extracts the version of the khmer project. """ import sys import pkg_resources try: print pkg_resources.get_distribution( # pylint: disable=E1103 'khmer').version except pkg_resources.DistributionNotFound: print 'To build the khmer library, the distribution in...
import sys sys.path.insert(0, '../') import versioneer versioneer.VCS = 'git' versioneer.versionfile_source = '../khmer/_version.py' versioneer.versionfile_build = '../khmer/_version.py' versioneer.tag_prefix = 'v' # tags are like v1.2.0 versioneer.parentdir_prefix = '..' print versioneer.get_version()
#!/usr/bin/env python """ Extracts the version of the khmer project. """ import sys import pkg_resources try: print pkg_resources.get_distribution( # pylint: disable=E1103 'khmer').version except pkg_resources.DistributionNotFound: print 'To build the khmer library, the distribution information' ...
<commit_before>#!/usr/bin/env python """ Extracts the version of the khmer project. """ import sys import pkg_resources try: print pkg_resources.get_distribution( # pylint: disable=E1103 'khmer').version except pkg_resources.DistributionNotFound: print 'To build the khmer library, the distribution in...
c07f9d2b455ec312d22a5aa07f9d724ee4cd1e42
grab/tools/logs.py
grab/tools/logs.py
import logging def default_logging(grab_log='/tmp/grab.log'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=logging.DEBUG) glog = logging.getLogger('grab') glog.propagate = False ...
import logging def default_logging(grab_log='/tmp/grab.log', level=logging.DEBUG, mode='a'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=level) glog = logging.getLogger('grab') g...
Create additional options for default_logging function
Create additional options for default_logging function
Python
mit
SpaceAppsXploration/grab,maurobaraldi/grab,giserh/grab,lorien/grab,SpaceAppsXploration/grab,subeax/grab,huiyi1990/grab,raybuhr/grab,DDShadoww/grab,codevlabs/grab,pombredanne/grab-1,liorvh/grab,lorien/grab,DDShadoww/grab,huiyi1990/grab,codevlabs/grab,alihalabyah/grab,liorvh/grab,maurobaraldi/grab,subeax/grab,istinspring...
import logging def default_logging(grab_log='/tmp/grab.log'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=logging.DEBUG) glog = logging.getLogger('grab') glog.propagate = False ...
import logging def default_logging(grab_log='/tmp/grab.log', level=logging.DEBUG, mode='a'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=level) glog = logging.getLogger('grab') g...
<commit_before>import logging def default_logging(grab_log='/tmp/grab.log'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=logging.DEBUG) glog = logging.getLogger('grab') glog.prop...
import logging def default_logging(grab_log='/tmp/grab.log', level=logging.DEBUG, mode='a'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=level) glog = logging.getLogger('grab') g...
import logging def default_logging(grab_log='/tmp/grab.log'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=logging.DEBUG) glog = logging.getLogger('grab') glog.propagate = False ...
<commit_before>import logging def default_logging(grab_log='/tmp/grab.log'): """ Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file. """ logging.basicConfig(level=logging.DEBUG) glog = logging.getLogger('grab') glog.prop...
e046bbd4027275a94888bd70138000cdb2da67f3
pages/search_indexes.py
pages/search_indexes.py
"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True...
"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True...
Add a title attribute to the SearchIndex for pages.
Add a title attribute to the SearchIndex for pages. This is useful when displaying a list of search results because we can display the title of the result without hitting the database to actually pull the page.
Python
bsd-3-clause
batiste/django-page-cms,remik/django-page-cms,remik/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,akaihola/django-page-cms,pombredanne/django-page-cms-1,akaihola/django-page-cms,remik/django-page-cms,oliciv/django-page-cms,oliciv/django-page-cms,pombredanne/django-page-cms-1,akaihola/django-page-cms,bati...
"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True...
"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True...
<commit_before>"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, us...
"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True...
"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, use_template=True...
<commit_before>"""Django haystack `SearchIndex` module.""" from pages.models import Page, Content from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site import datetime class PageIndex(SearchIndex): """Search index for pages content.""" text = CharField(document=True, us...
227244ae21c98b52a460beb942a8200ab66c0633
grappa/__init__.py
grappa/__init__.py
# -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: from grappa ...
# -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: from grappa ...
Bump version: 0.1.8 → 0.1.9
Bump version: 0.1.8 → 0.1.9
Python
mit
grappa-py/grappa
# -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: from grappa ...
# -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: from grappa ...
<commit_before># -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: ...
# -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: from grappa ...
# -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: from grappa ...
<commit_before># -*- coding: utf-8 -* """ `grappa` provides two different testing styles: `should` and `expect`. should ------ Example using ``should`` style:: from grappa import should should('foo').be.equal.to('foo') 'foo' | should.be.equal.to('foo') expect ------ Example using ``expect`` style:: ...
4ca82986828514f26d06270477a2d243ebd91294
tests/hummus/test_document.py
tests/hummus/test_document.py
# -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a normal cycle. ...
# -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a normal cycle. ...
Update tests for new API.
Update tests for new API.
Python
mit
concordusapps/python-hummus,concordusapps/python-hummus
# -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a normal cycle. ...
# -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a normal cycle. ...
<commit_before># -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a no...
# -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a normal cycle. ...
# -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a normal cycle. ...
<commit_before># -*- coding: utf-8 -*- import hummus from tempfile import NamedTemporaryFile import os def assert_pdf(filename): with open(filename, 'rb') as stream: assert stream.read(4) == b'%PDF' def test_document_file(): with NamedTemporaryFile(delete=False) as stream: # Run through a no...
58eede75663fda02a7323fa6579a6ca8ac83f2fd
belogging/defaults.py
belogging/defaults.py
DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handlers': { '...
DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handlers': { '...
Replace %(module)s with %(pathname)s in DEFAULT_KVP_FORMAT
Replace %(module)s with %(pathname)s in DEFAULT_KVP_FORMAT The pathname gives more context in large projects that contains repeated module names (eg models, base, etc).
Python
mit
georgeyk/belogging
DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handlers': { '...
DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handlers': { '...
<commit_before> DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handler...
DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handlers': { '...
DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handlers': { '...
<commit_before> DEFAULT_LOGGING_CONF = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': {'format': '%(asctime)s %(module)s %(message)s'}, }, 'filters': { 'logger_filter': { '()': 'belogging.filters.LoggerFilter', }, }, 'handler...
273dd930836345fccc42e8f1a6720f04b29a46f1
pytui/settings.py
pytui/settings.py
from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b'
from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b0'
Repair version, beta needs a number.
Repair version, beta needs a number.
Python
mit
martinsmid/pytest-ui
from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b' Repair version, beta needs a number.
from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b0'
<commit_before>from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b' <commit_msg>Repair version, beta needs a number.<commit_after>
from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b0'
from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b' Repair version, beta needs a number.from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b0'
<commit_before>from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b' <commit_msg>Repair version, beta needs a number.<commit_after>from __future__ import unicode_literals DEBUG_MODULES = [ # 'pytui', ] VERSION = '0.3.1b0'
dcc5c7be6f8463f41e1d1697bdba7fd576382259
master/rc_force.py
master/rc_force.py
# Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm"], reason=FixedParameter(name="reason", default=""), bra...
# Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm", "package_tarballppc64le"], reason=FixedParameter(name="rea...
Add ppc64le tarball rc force builder
Add ppc64le tarball rc force builder
Python
mit
staticfloat/julia-buildbot,staticfloat/julia-buildbot
# Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm"], reason=FixedParameter(name="reason", default=""), bra...
# Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm", "package_tarballppc64le"], reason=FixedParameter(name="rea...
<commit_before># Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm"], reason=FixedParameter(name="reason", defau...
# Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm", "package_tarballppc64le"], reason=FixedParameter(name="rea...
# Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm"], reason=FixedParameter(name="reason", default=""), bra...
<commit_before># Add a manual scheduler for building release candidates rc_scheduler = ForceScheduler( name="rc build", builderNames=["package_osx10.9-x64", "package_win6.2-x64", "package_win6.2-x86", "package_tarball64", "package_tarball32", "package_tarballarm"], reason=FixedParameter(name="reason", defau...
f4be8fd80b1aad9babdfbc56dec331af635f5554
migrations/versions/0165_another_letter_org.py
migrations/versions/0165_another_letter_org.py
"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORGANISATIONS = [ ...
"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORGANISATIONS = [ ...
Add East Riding of Yorkshire Council to migration
Add East Riding of Yorkshire Council to migration
Python
mit
alphagov/notifications-api,alphagov/notifications-api
"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORGANISATIONS = [ ...
"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORGANISATIONS = [ ...
<commit_before>"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORG...
"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORGANISATIONS = [ ...
"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORGANISATIONS = [ ...
<commit_before>"""empty message Revision ID: 0165_another_letter_org Revises: 0164_add_organisation_to_service Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0165_another_letter_org' down_revision = '0164_add_organisation_to_service' from alembic import op NEW_ORG...
73dd57a0d27b08089f91f303d3d36e428b108618
CI/syntaxCheck.py
CI/syntaxCheck.py
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
Revert "Fix the location path of OpenIPSL"
Revert "Fix the location path of OpenIPSL" This reverts commit 5b3af4a6c1c77c651867ee2b5f5cef5100944ba6.
Python
bsd-3-clause
SmarTS-Lab/OpenIPSL,OpenIPSL/OpenIPSL,SmarTS-Lab/OpenIPSL,tinrabuzin/OpenIPSL
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
<commit_before>import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.m...
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.mo", #"IEEE14":"...
<commit_before>import sys from CITests import CITests # Libs in Application Examples appExamples = { #"KundurSMIB":"/ApplicationExamples/KundurSMIB/package.mo", #"TwoAreas":"/ApplicationExamples/TwoAreas/package.mo", #"SevenBus":"/ApplicationExamples/SevenBus/package.mo", #"IEEE9":"/ApplicationExamples/IEEE9/package.m...
dc0dfd4a763dceef655d62e8364b92a8073b7751
chrome/chromehost.py
chrome/chromehost.py
#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes = sys.stdin.rea...
#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes = sys.stdin.rea...
Change chromhost to use normal sockets
Change chromhost to use normal sockets
Python
mit
CacheBrowser/cachebrowser,NewBie1993/cachebrowser
#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes = sys.stdin.rea...
#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes = sys.stdin.rea...
<commit_before>#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes ...
#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes = sys.stdin.rea...
#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes = sys.stdin.rea...
<commit_before>#!/usr/bin/env python import socket import struct import sys def send_to_chrome(message): # Write message size. sys.stdout.write(struct.pack('I', len(message))) # Write the message itself. sys.stdout.write(message) sys.stdout.flush() def read_from_chrome(): text_length_bytes ...
78ca616d611a6c9b8364cf25a21affd80e261ff8
cutplanner/planner.py
cutplanner/planner.py
import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = ...
import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = ...
Set up list of needed pieces on init
Set up list of needed pieces on init
Python
mit
alanc10n/py-cutplanner
import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = ...
import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = ...
<commit_before>import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.p...
import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = ...
import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.pieces_needed = ...
<commit_before>import collections from stock import Stock # simple structure to keep track of a specific piece Piece = collections.namedtuple('Piece', 'id, length') class Planner(object): def __init__(self, sizes, needed, loss=0.25): self.stock = [] self.stock_sizes = sorted(sizes) self.p...
131f0d3a67bc6ba995d1f45dd8c85594d8d8e79c
tests/run_tests.py
tests/run_tests.py
"""Python script to run all tests""" import pytest if __name__ == '__main__': pytest.main()
"""Python script to run all tests""" import sys import pytest if __name__ == '__main__': sys.exit(pytest.main())
Allow Jenkins to actually report build failures
Allow Jenkins to actually report build failures
Python
mit
gatkin/declxml
"""Python script to run all tests""" import pytest if __name__ == '__main__': pytest.main() Allow Jenkins to actually report build failures
"""Python script to run all tests""" import sys import pytest if __name__ == '__main__': sys.exit(pytest.main())
<commit_before>"""Python script to run all tests""" import pytest if __name__ == '__main__': pytest.main() <commit_msg>Allow Jenkins to actually report build failures<commit_after>
"""Python script to run all tests""" import sys import pytest if __name__ == '__main__': sys.exit(pytest.main())
"""Python script to run all tests""" import pytest if __name__ == '__main__': pytest.main() Allow Jenkins to actually report build failures"""Python script to run all tests""" import sys import pytest if __name__ == '__main__': sys.exit(pytest.main())
<commit_before>"""Python script to run all tests""" import pytest if __name__ == '__main__': pytest.main() <commit_msg>Allow Jenkins to actually report build failures<commit_after>"""Python script to run all tests""" import sys import pytest if __name__ == '__main__': sys.exit(pytest.main())
2d8ddb4ab59bc7198b637bcc9e51914379ff408b
tests/test_i18n.py
tests/test_i18n.py
import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секунды назад" humanize.i18n.deactivate() assert hum...
import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" assert humanize.ordinal(5) == "5th" try: humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секу...
Add i18n test for humanize.ordinal
Add i18n test for humanize.ordinal
Python
mit
jmoiron/humanize,jmoiron/humanize
import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секунды назад" humanize.i18n.deactivate() assert hum...
import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" assert humanize.ordinal(5) == "5th" try: humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секу...
<commit_before>import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секунды назад" humanize.i18n.deactivate()...
import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" assert humanize.ordinal(5) == "5th" try: humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секу...
import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секунды назад" humanize.i18n.deactivate() assert hum...
<commit_before>import datetime as dt import humanize def test_i18n(): three_seconds = dt.timedelta(seconds=3) assert humanize.naturaltime(three_seconds) == "3 seconds ago" humanize.i18n.activate("ru_RU") assert humanize.naturaltime(three_seconds) == "3 секунды назад" humanize.i18n.deactivate()...
7cde727c5a1a5de652e6b1c3d207c5b51fe719cf
mission.py
mission.py
# coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau(x, y) # D...
# coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau(x, y) # D...
Fix to deal with invalid commands.
Fix to deal with invalid commands.
Python
mit
rodrigobraga/Mars-Rover-Challenge
# coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau(x, y) # D...
# coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau(x, y) # D...
<commit_before># coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau...
# coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau(x, y) # D...
# coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau(x, y) # D...
<commit_before># coding: utf-8 """ Mission simulation. """ from rover import Plateau, Rover, Heading, Command if __name__ == '__main__': instructions = open('instructions.txt', 'r') # Prepare the plateau to landings. data = instructions.readline().split() x, y = map(int, data) plateau = Plateau...
8e26fa46ffdb9442254712b4083a973ab9ce6577
Python/tangshi.py
Python/tangshi.py
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: line = line.rs...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: line = line.rs...
Print the character without Rhyme if it is not on the Rhyme Dictionary
Print the character without Rhyme if it is not on the Rhyme Dictionary
Python
apache-2.0
jmworsley/TangShi
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: line = line.rs...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: line = line.rs...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: ...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: line = line.rs...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: line = line.rs...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import sys import re import codecs ping = re.compile(u'.平') shang = re.compile(u'上聲') ru = re.compile(u'入') qu = re.compile(u'去') mydict = { } # f = open("../Data/TangRhymesMap.csv") f = codecs.open("../Data/TangRhymesMap.csv", "r", "utf-8") for line in f: ...