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
65e6c8466482464333e77a2892fd0ac33ab5c3cb
q_and_a/apps/token_auth/views.py
q_and_a/apps/token_auth/views.py
from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate, login from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, RedirectView): d...
from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, RedirectView): def get_...
Fix indent, PEP-8 style and remove dup import.
Fix indent, PEP-8 style and remove dup import.
Python
bsd-3-clause
DemocracyClub/candidate_questions,DemocracyClub/candidate_questions,DemocracyClub/candidate_questions
from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate, login from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, RedirectView): d...
from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, RedirectView): def get_...
<commit_before>from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate, login from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, Redire...
from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, RedirectView): def get_...
from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate, login from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, RedirectView): d...
<commit_before>from django.views.generic import RedirectView from django.views.generic.detail import SingleObjectMixin from django.contrib.auth import login, authenticate, login from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse class BaseAuthView(SingleObjectMixin, Redire...
1405dac9cbd7cebdc34d9cba0ca585b494f30a71
plugins/Views/WireframeView/__init__.py
plugins/Views/WireframeView/__init__.py
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_catalog.i18nc("@lab...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_catalog.i18nc("@lab...
Add period at end of plug-in description
Add period at end of plug-in description This is consistent with other plug-in descriptions. Contributes to issue CURA-1190.
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_catalog.i18nc("@lab...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_catalog.i18nc("@lab...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_cata...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_catalog.i18nc("@lab...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_catalog.i18nc("@lab...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import WireframeView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "type": "view", "plugin": { "name": i18n_cata...
a03fe14d4dba7b9a54efdebeb768551bda53e3c1
admin/common_auth/models.py
admin/common_auth/models.py
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custom permissions f...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) def __unicode__(self): return self....
Fix the display name of admin profile in the admin admin
Fix the display name of admin profile in the admin admin
Python
apache-2.0
HalcyonChimera/osf.io,sloria/osf.io,CenterForOpenScience/osf.io,hmoco/osf.io,sloria/osf.io,chrisseto/osf.io,caneruguz/osf.io,monikagrabowska/osf.io,CenterForOpenScience/osf.io,icereval/osf.io,icereval/osf.io,TomBaxter/osf.io,brianjgeiger/osf.io,aaxelb/osf.io,cslzchen/osf.io,felliott/osf.io,chennan47/osf.io,binoculars/o...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custom permissions f...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) def __unicode__(self): return self....
<commit_before>from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custo...
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) def __unicode__(self): return self....
from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custom permissions f...
<commit_before>from django.db import models class AdminProfile(models.Model): user = models.OneToOneField('osf.OSFUser', related_name='admin_profile') desk_token = models.CharField(max_length=45, blank=True) desk_token_secret = models.CharField(max_length=45, blank=True) class Meta: # custo...
88426415053f44202596e8bd573ca2ca6c056e04
schwifty/registry.py
schwifty/registry.py
import json from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) return _registry[name] def save(na...
import json from collections import defaultdict from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) ...
Allow index to be accumulate values with same key
Allow index to be accumulate values with same key
Python
mit
figo-connect/schwifty
import json from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) return _registry[name] def save(na...
import json from collections import defaultdict from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) ...
<commit_before>import json from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) return _registry[name...
import json from collections import defaultdict from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) ...
import json from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) return _registry[name] def save(na...
<commit_before>import json from pkg_resources import resource_filename _registry = {} def has(name): return name in _registry def get(name): if not has(name): with open(resource_filename(__name__, name + '-registry.json'), 'r') as fp: save(name, json.load(fp)) return _registry[name...
23978f4959684153bfcaccb7f6d2fadf04836449
proselint/checks/leonard/exclamation.py
proselint/checks/leonard/exclamation.py
# -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check the text.""" ...
# -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check the text.""" ...
Fix bug in counting words
Fix bug in counting words Before, this broke with 1-word documents.
Python
bsd-3-clause
amperser/proselint,amperser/proselint,jstewmon/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint
# -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check the text.""" ...
# -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check the text.""" ...
<commit_before># -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check ...
# -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check the text.""" ...
# -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check the text.""" ...
<commit_before># -*- coding: utf-8 -*- """Too much yelling. --- layout: post source: ??? source_url: ??? title: yelling date: 2014-06-10 12:31:19 categories: writing --- Too much yelling. """ from tools import existence_check, memoize @memoize def check_repeated_exclamations(text): """Check ...
cdbf1da3d784df57ffbd2529f4bad2f5fd8abdf1
brainx/__init__.py
brainx/__init__.py
"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_nodes() != 2: ...
"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_nodes() != 2: ...
Update watts-strogatz call to match new NetworkX API
Update watts-strogatz call to match new NetworkX API
Python
bsd-3-clause
nipy/brainx,stefanv/brainx,whitergh/brainx,jrcohen02/brainx_archive2
"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_nodes() != 2: ...
"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_nodes() != 2: ...
<commit_before>"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_n...
"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_nodes() != 2: ...
"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_nodes() != 2: ...
<commit_before>"""Top-level init file for brainx package. """ def patch_nx(): """Temporary fix for NX's watts_strogatz routine, which has a bug in versions 1.1-1.3 """ import networkx as nx # Quick test to see if we get the broken version g = nx.watts_strogatz_graph(2, 0, 0) if g.number_of_n...
1642bf91ab9042fddb3fcdeb7d2d8d010979c978
disasm.py
disasm.py
import MOS6502 import instructions def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): currInst = instructions.instructions[memory[index]] if address > 0: line = format(address+index, '04x') + ": " else: line ...
import MOS6502 import instructions import code def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): opcode = memory[index] if opcode not in instructions.instructions.keys(): print "Undefined opcode: " + hex(opcode) code.interac...
Add catch for undefined opcodes
Add catch for undefined opcodes
Python
bsd-2-clause
pusscat/refNes
import MOS6502 import instructions def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): currInst = instructions.instructions[memory[index]] if address > 0: line = format(address+index, '04x') + ": " else: line ...
import MOS6502 import instructions import code def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): opcode = memory[index] if opcode not in instructions.instructions.keys(): print "Undefined opcode: " + hex(opcode) code.interac...
<commit_before>import MOS6502 import instructions def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): currInst = instructions.instructions[memory[index]] if address > 0: line = format(address+index, '04x') + ": " else: ...
import MOS6502 import instructions import code def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): opcode = memory[index] if opcode not in instructions.instructions.keys(): print "Undefined opcode: " + hex(opcode) code.interac...
import MOS6502 import instructions def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): currInst = instructions.instructions[memory[index]] if address > 0: line = format(address+index, '04x') + ": " else: line ...
<commit_before>import MOS6502 import instructions def disasm(memory, maxLines=0, address=-1): index = 0 lines = [] while index < len(memory): currInst = instructions.instructions[memory[index]] if address > 0: line = format(address+index, '04x') + ": " else: ...
bb5d6d94d555a91b2f9da1258aee90146ccd9998
openstack/common/messaging/_executors/impl_eventlet.py
openstack/common/messaging/_executors/impl_eventlet.py
# Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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-...
# Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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-...
Add forgotten piece of eventlet executor
Add forgotten piece of eventlet executor
Python
apache-2.0
hkumarmk/oslo.messaging,dims/oslo.messaging,dukhlov/oslo.messaging,hkumarmk/oslo.messaging,ozamiatin/oslo.messaging,redhat-openstack/oslo.messaging,dukhlov/oslo.messaging,zhurongze/oslo.messaging,isyippee/oslo.messaging,viggates/oslo.messaging,markmc/oslo.messaging,apporc/oslo.messaging,apporc/oslo.messaging,stevei101/...
# Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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-...
# Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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-...
<commit_before># Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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/li...
# Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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-...
# Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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-...
<commit_before># Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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/li...
fd98c81f315bf8c1699aed0b7eb46a7c1add73dd
eccodes/highlevel/message.py
eccodes/highlevel/message.py
import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): eccodes.codes_release(self.handle) def copy(self): return Message(eccodes.codes_clone(self.handle)) def __copy__(self): return self.copy() def get(self, ...
import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): try: eccodes.codes_release(self.handle) except Exception: pass def copy(self): return Message(eccodes.codes_clone(self.handle)) def __...
Make Message.__del__ immune to teardown errors
Make Message.__del__ immune to teardown errors
Python
apache-2.0
ecmwf/eccodes-python,ecmwf/eccodes-python
import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): eccodes.codes_release(self.handle) def copy(self): return Message(eccodes.codes_clone(self.handle)) def __copy__(self): return self.copy() def get(self, ...
import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): try: eccodes.codes_release(self.handle) except Exception: pass def copy(self): return Message(eccodes.codes_clone(self.handle)) def __...
<commit_before> import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): eccodes.codes_release(self.handle) def copy(self): return Message(eccodes.codes_clone(self.handle)) def __copy__(self): return self.copy() ...
import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): try: eccodes.codes_release(self.handle) except Exception: pass def copy(self): return Message(eccodes.codes_clone(self.handle)) def __...
import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): eccodes.codes_release(self.handle) def copy(self): return Message(eccodes.codes_clone(self.handle)) def __copy__(self): return self.copy() def get(self, ...
<commit_before> import io import eccodes class Message: def __init__(self, handle): self.handle = handle def __del__(self): eccodes.codes_release(self.handle) def copy(self): return Message(eccodes.codes_clone(self.handle)) def __copy__(self): return self.copy() ...
bc401d0073ddf9d693bd182317738d4be4f4ec70
benchexec/tools/witnesslint.py
benchexec/tools/witnesslint.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
Add version and distinguish linter error from faulty witness.
Add version and distinguish linter error from faulty witness.
Python
apache-2.0
ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,dbeyer/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,dbeyer/benchexec,ultimate-pa/benchexec
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
<commit_before># This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class T...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class Tool(benchexec.t...
<commit_before># This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.tools.template class T...
ad0151eee0027237c8cdd433ef2f24bfa47af5df
pyreaclib/nucdata/tests/test_binding.py
pyreaclib/nucdata/tests/test_binding.py
# unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cls): """...
# unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cls): """...
Add some more binding energy table tests.
Add some more binding energy table tests.
Python
bsd-3-clause
pyreaclib/pyreaclib
# unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cls): """...
# unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cls): """...
<commit_before># unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cl...
# unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cls): """...
# unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cls): """...
<commit_before># unit tests for Binding Energy database taken from AME 2016. import os from pyreaclib.nucdata import BindingTable class TestAME(object): @classmethod def setup_class(cls): """ this is run once for each class before any tests """ pass @classmethod def teardown_class(cl...
a37f67d6dfbcbadfcce3fe05891e525e3d3f5033
catalog/project.py
catalog/project.py
# Skeleton Flask Project from flask import Flask app = Flask(__name__) # Pass in default file name as parameter # Decorators for methods to execute based on route(s) @app.route('/') @app.route('/hello') def HelloWorld(): return "Hello World." # __main__ is the default name given to the application run by the Py...
from flask import Flask from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Base, Restaurant, MenuItem def createDBSession(): """Connect to database and return session""" engine = create_engine('sqlite:///restaurantmenu.db', echo=True) Base.metadata.bind...
Add database imports and restaurant routes
feat: Add database imports and restaurant routes
Python
mit
rupert-ong/python-flask-crud,rupert-ong/python-flask-crud,rupert-ong/python-flask-crud
# Skeleton Flask Project from flask import Flask app = Flask(__name__) # Pass in default file name as parameter # Decorators for methods to execute based on route(s) @app.route('/') @app.route('/hello') def HelloWorld(): return "Hello World." # __main__ is the default name given to the application run by the Py...
from flask import Flask from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Base, Restaurant, MenuItem def createDBSession(): """Connect to database and return session""" engine = create_engine('sqlite:///restaurantmenu.db', echo=True) Base.metadata.bind...
<commit_before># Skeleton Flask Project from flask import Flask app = Flask(__name__) # Pass in default file name as parameter # Decorators for methods to execute based on route(s) @app.route('/') @app.route('/hello') def HelloWorld(): return "Hello World." # __main__ is the default name given to the applicatio...
from flask import Flask from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Base, Restaurant, MenuItem def createDBSession(): """Connect to database and return session""" engine = create_engine('sqlite:///restaurantmenu.db', echo=True) Base.metadata.bind...
# Skeleton Flask Project from flask import Flask app = Flask(__name__) # Pass in default file name as parameter # Decorators for methods to execute based on route(s) @app.route('/') @app.route('/hello') def HelloWorld(): return "Hello World." # __main__ is the default name given to the application run by the Py...
<commit_before># Skeleton Flask Project from flask import Flask app = Flask(__name__) # Pass in default file name as parameter # Decorators for methods to execute based on route(s) @app.route('/') @app.route('/hello') def HelloWorld(): return "Hello World." # __main__ is the default name given to the applicatio...
3d4a2ec91d6d13f19ea7ec0370a9fb3504c4633e
pywikibot/families/wikivoyage_family.py
pywikibot/families/wikivoyage_family.py
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'en'...
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'en'...
Add lang 'zh' to family 'wikivoyage' , update from compat
Add lang 'zh' to family 'wikivoyage' , update from compat Change-Id: Ic6c64f356511d1f92eefe9e813c9564786b2b5a5
Python
mit
darthbhyrava/pywikibot-local,happy5214/pywikibot-core,xZise/pywikibot-core,TridevGuha/pywikibot-core,Darkdadaah/pywikibot-core,npdoty/pywikibot,hasteur/g13bot_tools_new,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,PersianWikipedia/pywikibot-core,valhallasw/pywikibot-core,icyflame/batman,haste...
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'en'...
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'en'...
<commit_before># -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ ...
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'en'...
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'en'...
<commit_before># -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ ...
629fab227cb5d564d6cb7d9469c76915eb6c72ac
backend/breach/helpers/network.py
backend/breach/helpers/network.py
import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1]
import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] def get_local_IP(): def_gw_device = get_interface() return netifaces.ifaddresses(def_gw_device)[netifaces.AF_INET][0]['addr']
Add function to get the machine's local IP
Add function to get the machine's local IP
Python
mit
esarafianou/rupture,dimriou/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture...
import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] Add function to get the machine's local IP
import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] def get_local_IP(): def_gw_device = get_interface() return netifaces.ifaddresses(def_gw_device)[netifaces.AF_INET][0]['addr']
<commit_before>import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] <commit_msg>Add function to get the machine's local IP<commit_after>
import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] def get_local_IP(): def_gw_device = get_interface() return netifaces.ifaddresses(def_gw_device)[netifaces.AF_INET][0]['addr']
import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] Add function to get the machine's local IPimport netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] def get_local_IP(): def_gw_device = get_interface() return...
<commit_before>import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] <commit_msg>Add function to get the machine's local IP<commit_after>import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] def get_local_IP(): d...
9dce07895a773998469aeed8c1cfb8476d4264eb
application.py
application.py
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) if __name__ == '__main__': manager.run()
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) manager.add_command("runserver", Server(port=5001)) if __name__ == '__main__': manager.run()
Update to run on port 5001
Update to run on port 5001 For development we will want to run multiple apps, so they should each bind to a different port number.
Python
mit
RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,RichardKnop/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) if __name__ == '__main__': manager.run() Update to run on port 5001 For development we will want to run multiple app...
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) manager.add_command("runserver", Server(port=5001)) if __name__ == '__main__': manager.run()
<commit_before>#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) if __name__ == '__main__': manager.run() <commit_msg>Update to run on port 5001 For development we wi...
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) manager.add_command("runserver", Server(port=5001)) if __name__ == '__main__': manager.run()
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) if __name__ == '__main__': manager.run() Update to run on port 5001 For development we will want to run multiple app...
<commit_before>#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager application = create_app(os.getenv('FLASH_CONFIG') or 'development') manager = Manager(application) if __name__ == '__main__': manager.run() <commit_msg>Update to run on port 5001 For development we wi...
384eab108578d372c9755cf1a1a22738f7cd3dea
app/utils/__init__.py
app/utils/__init__.py
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
Create function to test hidden files/dirs.
Create function to test hidden files/dirs. Change-Id: I67e8d69fc85dfe58e4f127007c73f6888deff3e0
Python
agpl-3.0
joyxu/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
74bfe9bf1501d5c31e2ab6d8dc174467e47e200e
app/dao/magazines_dao.py
app/dao/magazines_dao.py
from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_old_id(old_id): return Magazine.query.filter_by(old_id=old_id).first()
from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_id(id): return Magazine.query.filter_by(id=id).one() def dao_get_magazine_by_old_id(old_id): ...
Add get magazine by id to magazine dao
Add get magazine by id to magazine dao
Python
mit
NewAcropolis/api,NewAcropolis/api,NewAcropolis/api
from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_old_id(old_id): return Magazine.query.filter_by(old_id=old_id).first() Add get magazine by id to m...
from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_id(id): return Magazine.query.filter_by(id=id).one() def dao_get_magazine_by_old_id(old_id): ...
<commit_before>from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_old_id(old_id): return Magazine.query.filter_by(old_id=old_id).first() <commit_msg>...
from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_id(id): return Magazine.query.filter_by(id=id).one() def dao_get_magazine_by_old_id(old_id): ...
from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_old_id(old_id): return Magazine.query.filter_by(old_id=old_id).first() Add get magazine by id to m...
<commit_before>from app import db from app.dao.decorators import transactional from app.models import Magazine def dao_get_magazines(): return Magazine.query.order_by(Magazine.created_at.desc()).all() def dao_get_magazine_by_old_id(old_id): return Magazine.query.filter_by(old_id=old_id).first() <commit_msg>...
065dd5aef4925e1c9519b083db26b36ab0cfe06c
scripts/master/factory/dart/channels.py
scripts/master/factory/dart/channels.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
Update stable builders to pull from 1.4 branch
Update stable builders to pull from 1.4 branch Review URL: https://codereview.chromium.org/295923003 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@271609 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_pos...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_pos...
e9fe831427d59e2a5889d0e6744a6c9809b4ffd2
cellular.py
cellular.py
import random class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] n_rules = (2*self.radius + 1) * (self.n_st...
import random from PIL import Image, ImageDraw class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] self.co...
Add visualization of CA using Pillow
Add visualization of CA using Pillow
Python
unlicense
joseph346/cellular
import random class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] n_rules = (2*self.radius + 1) * (self.n_st...
import random from PIL import Image, ImageDraw class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] self.co...
<commit_before>import random class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] n_rules = (2*self.radius + ...
import random from PIL import Image, ImageDraw class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] self.co...
import random class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] n_rules = (2*self.radius + 1) * (self.n_st...
<commit_before>import random class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] n_rules = (2*self.radius + ...
22f9fc8a56882f0595d051cb8c5d20fd97091e8c
custom/opm/tests/test_snapshot.py
custom/opm/tests/test_snapshot.py
from datetime import date from unittest import TestCase from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCaseRow, MockDataProvider class TestGetReportUtil(TestCase): def get_...
from datetime import date from unittest import TestCase from mock import patch from corehq.apps.users.models import CommCareUser from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCas...
Fix for test (add mock for CommCareUser)
Fix for test (add mock for CommCareUser)
Python
bsd-3-clause
puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from datetime import date from unittest import TestCase from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCaseRow, MockDataProvider class TestGetReportUtil(TestCase): def get_...
from datetime import date from unittest import TestCase from mock import patch from corehq.apps.users.models import CommCareUser from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCas...
<commit_before>from datetime import date from unittest import TestCase from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCaseRow, MockDataProvider class TestGetReportUtil(TestCase...
from datetime import date from unittest import TestCase from mock import patch from corehq.apps.users.models import CommCareUser from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCas...
from datetime import date from unittest import TestCase from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCaseRow, MockDataProvider class TestGetReportUtil(TestCase): def get_...
<commit_before>from datetime import date from unittest import TestCase from couchforms.models import XFormInstance from ..constants import * from ..reports import get_report, BeneficiaryPaymentReport, MetReport from .case_reports import Report, OPMCase, MockCaseRow, MockDataProvider class TestGetReportUtil(TestCase...
171849e3e3e12293b80ac80dde6fd12ba5476141
pysswords/db/credential.py
pysswords/db/credential.py
from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return os.path.join(pat...
from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return os.path.join(pat...
Fix fullname syntax to handle login with (at) signs
Fix fullname syntax to handle login with (at) signs
Python
mit
marcwebbie/passpie,marcwebbie/passpie,scorphus/passpie,eiginn/passpie,scorphus/passpie,marcwebbie/pysswords,eiginn/passpie
from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return os.path.join(pat...
from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return os.path.join(pat...
<commit_before>from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return o...
from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return os.path.join(pat...
from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return os.path.join(pat...
<commit_before>from collections import namedtuple import os import re import shutil import yaml Credential = namedtuple("Credential", "name login password comment") class CredentialExistsError(Exception): pass class CredentialNotFoundError(Exception): pass def expandpath(path, name, login): return o...
5e03af4b0f920e97507b3ada6b4b925136ddbf07
froide/upload/serializers.py
froide/upload/serializers.py
from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['guid'].required = True
from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): ''' Add required marker, so OpenAPI schema generator can remove it again ...
Add some documentation for weird init
Add some documentation for weird init
Python
mit
fin/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide
from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['guid'].required = True Add ...
from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): ''' Add required marker, so OpenAPI schema generator can remove it again ...
<commit_before>from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['guid'].requi...
from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): ''' Add required marker, so OpenAPI schema generator can remove it again ...
from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['guid'].required = True Add ...
<commit_before>from rest_framework import serializers from .models import Upload class UploadSerializer(serializers.ModelSerializer): class Meta: model = Upload fields = '__all__' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['guid'].requi...
5cb497d0741f6dbd29a6e41fa9f1cb3374e8f062
jsontosql.py
jsontosql.py
import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): self.data = loads(json.read()) self.db = VendCrawlerDB(user, password, database) ...
import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): data = loads(json.read()) db = VendCrawlerDB(user, password, database) table = '...
Fix json to sql converter.
Fix json to sql converter.
Python
mit
josetaas/vendcrawler,josetaas/vendcrawler,josetaas/vendcrawler
import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): self.data = loads(json.read()) self.db = VendCrawlerDB(user, password, database) ...
import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): data = loads(json.read()) db = VendCrawlerDB(user, password, database) table = '...
<commit_before>import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): self.data = loads(json.read()) self.db = VendCrawlerDB(user, password, database) ...
import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): data = loads(json.read()) db = VendCrawlerDB(user, password, database) table = '...
import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): self.data = loads(json.read()) self.db = VendCrawlerDB(user, password, database) ...
<commit_before>import os import os.path from json import loads import click from vendcrawler.scripts.vendcrawlerdb import VendCrawlerDB class JSONToSQL(object): def __init__(self, json, user, password, database): self.data = loads(json.read()) self.db = VendCrawlerDB(user, password, database) ...
4217f587606c4e326b4df97681ae4f5187b6e6d9
falmer/content/serializers.py
falmer/content/serializers.py
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
Remove wagtail_image from image resources
Remove wagtail_image from image resources
Python
mit
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
<commit_before>from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generat...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
<commit_before>from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generat...
20c7905ea062fb6e83ddf641b0a12619044c39e3
blog/models.py
blog/models.py
from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_length=450) slu...
from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_length=450) slu...
Add sort by publish date.
Add sort by publish date.
Python
bsd-3-clause
divisible-by-hero/dbh-blog
from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_length=450) slu...
from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_length=450) slu...
<commit_before>from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_leng...
from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_length=450) slu...
from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_length=450) slu...
<commit_before>from django.db import models from django.contrib.auth.models import User from hadrian.utils import slugs from ckeditor.fields import RichTextField from taggit.managers import TaggableManager from .managers import PostManager class Post(models.Model): title = models.CharField(blank=False, max_leng...
b452e9a42d507c000bf6d3068af425d9c0eda8fd
validation/validate_poi.py
validation/validate_poi.py
#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format import feature...
#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format import feature...
Improve instructions for Lesson 13 mini-project.
Improve instructions for Lesson 13 mini-project.
Python
mit
selva86/python-machine-learning,ncfausti/udacity-machine-learning
#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format import feature...
#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format import feature...
<commit_before>#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format...
#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format import feature...
#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format import feature...
<commit_before>#!/usr/bin/python """ starter code for the validation mini-project the first step toward building your POI identifier! start by loading/formatting the data after that, it's not our code anymore--it's yours! """ import pickle import sys sys.path.append("../tools/") from feature_format...
bfe779aa65abaff7430b1870a1023b0d5b2e02f8
lib/pyfrc/tests/__init__.py
lib/pyfrc/tests/__init__.py
''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # import common test typ...
''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # Other test types from ...
Remove docstring tests from default tests
Remove docstring tests from default tests
Python
mit
robotpy/pyfrc
''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # import common test typ...
''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # Other test types from ...
<commit_before>''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # import ...
''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # Other test types from ...
''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # import common test typ...
<commit_before>''' These generic test modules can be applied to :class:`wpilib.iterativerobot.IterativeRobot` and :class:`wpilib.samplerobot.SampleRobot` based robots. ''' # import basic tests from .basic import ( test_autonomous, test_disabled, test_operator_control, test_practice ) # import ...
fc09e847a5435581738a32f8aa158e7d03491b94
calico_containers/tests/st/test_container_to_host.py
calico_containers/tests/st/test_container_to_host.py
from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. (Without using the docker network driver, since i...
from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. This function is important for Mesos, since the c...
Clarify test_containers_to_host not using libnetwork
Clarify test_containers_to_host not using libnetwork Former-commit-id: fbd7c3b5627ba288ac400944ee242f3369143291
Python
apache-2.0
plwhite/libcalico,TrimBiggs/libcalico,caseydavenport/libcalico,alexhersh/libcalico,insequent/libcalico,tomdee/libnetwork-plugin,projectcalico/libcalico,TrimBiggs/libnetwork-plugin,djosborne/libcalico,TrimBiggs/libnetwork-plugin,tomdee/libcalico,L-MA/libcalico,robbrockbank/libcalico,Symmetric/libcalico,projectcalico/lib...
from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. (Without using the docker network driver, since i...
from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. This function is important for Mesos, since the c...
<commit_before>from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. (Without using the docker network ...
from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. This function is important for Mesos, since the c...
from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. (Without using the docker network driver, since i...
<commit_before>from subprocess import CalledProcessError from test_base import TestBase from tests.st.utils.docker_host import DockerHost class TestContainerToHost(TestBase): def test_container_to_host(self): """ Test that a container can ping the host. (Without using the docker network ...
37337298d881280a45dad7f0f47ad719feb4baa6
addons/bestja_configuration_fpbz/__openerp__.py
addons/bestja_configuration_fpbz/__openerp__.py
# -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
# -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
Add bestja_project_hierarchy to the list of FPBZ's modules
Add bestja_project_hierarchy to the list of FPBZ's modules
Python
agpl-3.0
ludwiktrammer/bestja,KamilWo/bestja,EE/bestja,KamilWo/bestja,ludwiktrammer/bestja,KrzysiekJ/bestja,EE/bestja,KrzysiekJ/bestja,KamilWo/bestja,ludwiktrammer/bestja,EE/bestja,KrzysiekJ/bestja
# -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
# -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
<commit_before># -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'categ...
# -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
# -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'category': 'Specific...
<commit_before># -*- coding: utf-8 -*- { 'name': "Bestja: FBŻ", 'summary': "Installation configuration for FPBŻ", 'description': "Installation configuration for Federacja Polskich Banków Żywności", 'author': "Laboratorium EE", 'website': "http://www.laboratorium.ee", 'version': '0.1', 'categ...
b28a7e50bc90dc0292efefd7665a00d62245311a
app.py
app.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def speakers(): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def speakers(): ...
Fix error with generate URL
Fix error with generate URL
Python
bsd-3-clause
philipbl/SpeakerCast,philipbl/talk_feed
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def speakers(): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def speakers(): ...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def s...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def speakers(): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def speakers(): ...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, json from flask.ext.cors import CORS import database import rsser # Update data before application is allowed to start database.update_database() app = Flask(__name__) CORS(app) @app.route('/speakercast/speakers') def s...
1c2fda3afffd998035bbb9912779ce7d4f918b64
app.py
app.py
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import re from flask import Flask, render_template from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] terms = load_glossary('...
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- from flask import Flask, render_template import os import re from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] p = os.path.j...
Fix glossary file location to relative
Fix glossary file location to relative
Python
apache-2.0
teampopong/popong.com-glossary,teampopong/popong.com-glossary,teampopong/popong.com-glossary
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import re from flask import Flask, render_template from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] terms = load_glossary('...
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- from flask import Flask, render_template import os import re from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] p = os.path.j...
<commit_before>#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import re from flask import Flask, render_template from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] terms = ...
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- from flask import Flask, render_template import os import re from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] p = os.path.j...
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import re from flask import Flask, render_template from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] terms = load_glossary('...
<commit_before>#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import re from flask import Flask, render_template from settings import BABEL_SETTINGS, SERVER_SETTINGS from utils.i18n import PopongBabel from utils.glossary import load as load_glossary app = Flask(__name__) app.debug = SERVER_SETTINGS['debug'] terms = ...
f9a1ac08fdffc464010c7c493c43a475342c821b
bot.py
bot.py
import zirc, ssl, socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zirc", ...
import zirc import ssl import socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zirc",...
Move imports to their own line
Move imports to their own line
Python
mit
wolfy1339/Python-IRC-Bot
import zirc, ssl, socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zirc", ...
import zirc import ssl import socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zirc",...
<commit_before>import zirc, ssl, socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zir...
import zirc import ssl import socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zirc",...
import zirc, ssl, socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zirc", ...
<commit_before>import zirc, ssl, socket class Bot(zirc.Client): def __init__(self): self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) self.config = zirc.IRCConfig(host="irc.freenode.net", port=6697, nickname="wolfyzIRCBot", ident="zir...
292f78cfe2700ebcfdc83bfbd53717aec3d98d47
bowser/main.py
bowser/main.py
from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: bot.loop.run_until_complete(bot.close()) raise ex def init(): if __name__ == '__main__': main() init()
from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: raise ex finally: bot.loop.run_until_complete(bot.close()) def init(): if __name__ == '__main__': main() ini...
Remove one of the unclosed client session warnings
test: Remove one of the unclosed client session warnings
Python
mit
kevinkjt2000/discord-minecraft-server-status
from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: bot.loop.run_until_complete(bot.close()) raise ex def init(): if __name__ == '__main__': main() init() test: Rem...
from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: raise ex finally: bot.loop.run_until_complete(bot.close()) def init(): if __name__ == '__main__': main() ini...
<commit_before>from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: bot.loop.run_until_complete(bot.close()) raise ex def init(): if __name__ == '__main__': main() i...
from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: raise ex finally: bot.loop.run_until_complete(bot.close()) def init(): if __name__ == '__main__': main() ini...
from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: bot.loop.run_until_complete(bot.close()) raise ex def init(): if __name__ == '__main__': main() init() test: Rem...
<commit_before>from bowser.Bot import Bot def main(): bot = Bot() try: token = open('token.txt').read().replace('\n', '') bot.run(token) except Exception as ex: bot.loop.run_until_complete(bot.close()) raise ex def init(): if __name__ == '__main__': main() i...
03d10411b11133a8f371fb94b4dc4476373190a8
IPython/core/magics/display.py
IPython/core/magics/display.py
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
Clarify that the MathJax comment is Notebook specific.
Clarify that the MathJax comment is Notebook specific.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
<commit_before>"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this ...
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
<commit_before>"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this ...
978106fb47ef5d9974678bc1ac2c71ce6e95a311
plugins/notes_plugin.py
plugins/notes_plugin.py
# -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channel text, sender ...
# -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channel text, sender ...
Change note trigger to tell, and make it reply
Change note trigger to tell, and make it reply
Python
mit
jrspruitt/jkent-pybot,jkent/jkent-pybot
# -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channel text, sender ...
# -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channel text, sender ...
<commit_before># -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channe...
# -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channel text, sender ...
# -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channel text, sender ...
<commit_before># -*- coding: utf-8 -*- # vim: set ts=4 et import sqlite3 from plugin import * class Plugin(BasePlugin): def on_load(self, reloading): self.db = sqlite3.connect('data/notes.db') c = self.db.cursor() c.execute('''CREATE TABLE IF NOT EXISTS notes (channe...
dab7eaadbc6fc0dd867358b096a846ec39bc0440
pnnl/models/__init__.py
pnnl/models/__init__.py
import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: model_type ...
import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: model_type ...
Add return statement to Model.get_q
Add return statement to Model.get_q
Python
bsd-3-clause
VOLTTRON/volttron-applications,VOLTTRON/volttron-applications,VOLTTRON/volttron-applications,VOLTTRON/volttron-applications,VOLTTRON/volttron-applications
import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: model_type ...
import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: model_type ...
<commit_before>import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: ...
import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: model_type ...
import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: model_type ...
<commit_before>import importlib import logging from volttron.platform.agent import utils _log = logging.getLogger(__name__) utils.setup_logging() __version__ = "0.1" __all__ = ['Model'] class Model(object): def __init__(self, config, **kwargs): base_module = "volttron.pnnl.models." try: ...
c5279db4e24499d6ee49f1b444087be50f74ed90
test_spec.py
test_spec.py
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): class MustacheTestCase(unittest.TestCase): """A si...
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): json_path = '%s.json' % json_path class MustacheTestCa...
Make unittests easier to deal with.
Make unittests easier to deal with. - Test everything ./test_spec.py - Test suite ./test_spec.py inverted - Test unit ./test_spec.py inverted.test_7
Python
mit
noahmorrison/chevron,noahmorrison/chevron
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): class MustacheTestCase(unittest.TestCase): """A si...
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): json_path = '%s.json' % json_path class MustacheTestCa...
<commit_before>#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): class MustacheTestCase(unittest.TestCase): ...
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): json_path = '%s.json' % json_path class MustacheTestCa...
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): class MustacheTestCase(unittest.TestCase): """A si...
<commit_before>#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): class MustacheTestCase(unittest.TestCase): ...
1b58fed32fe583863812613604383eb9d8821ee1
tools/sci.py
tools/sci.py
#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(t, y) :para...
#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t, **kwargs): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(t, y)...
Correct complex integrator for scalar equations
Correct complex integrator for scalar equations
Python
unlicense
dseuss/pythonlibs
#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(t, y) :para...
#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t, **kwargs): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(t, y)...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(...
#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t, **kwargs): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(t, y)...
#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(t, y) :para...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from __future__ import division, print_function import numpy as np from scipy.integrate import ode def zodeint(func, y0, t): """Simple wraper around scipy.integrate.ode for complex valued problems. :param func: Right hand side of the equation dy/dt = f(...
2facb0c8794c9529ccb17631a90b0ee181c4eb5b
xml_json_import/__init__.py
xml_json_import/__init__.py
from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): raise XmlJsonImp...
from django.conf import settings from os import path, listdir from lxml import etree class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_...
Add exception handling for invalid XSLT files
Add exception handling for invalid XSLT files
Python
mit
lev-veshnyakov/django-import-data,lev-veshnyakov/django-import-data
from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): raise XmlJsonImp...
from django.conf import settings from os import path, listdir from lxml import etree class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_...
<commit_before>from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): r...
from django.conf import settings from os import path, listdir from lxml import etree class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_...
from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): raise XmlJsonImp...
<commit_before>from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): r...
0a38c3f83174042ca4967bff925036af2339808f
job-logs/python/check_log.py
job-logs/python/check_log.py
import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file =- open(filename, 'r') c...
#!/usr/bin/env python import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file = ope...
Write bad lines to file for examination
Write bad lines to file for examination
Python
apache-2.0
DHTC-Tools/logstash-confs,DHTC-Tools/logstash-confs,DHTC-Tools/logstash-confs
import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file =- open(filename, 'r') c...
#!/usr/bin/env python import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file = ope...
<commit_before>import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file =- open(filen...
#!/usr/bin/env python import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file = ope...
import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file =- open(filename, 'r') c...
<commit_before>import sys import argparse import csv def examine_log(filename, save_raw=False): """ Download job log files from Amazon EC2 machines parameters: filename - beginning date to start downloading from work_directory - directory to download files to """ input_file =- open(filen...
ee8acd5a476b0dcce9b79f70e4c70186ea4d5dc0
miniutils.py
miniutils.py
import __builtin__ def any(it): for obj in it: if obj: return True def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) return value r...
import __builtin__ def any(it): for obj in it: if obj: return True return False def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) r...
Return an actual bool from any()
Return an actual bool from any()
Python
bsd-2-clause
markflorisson/minivect,markflorisson/minivect
import __builtin__ def any(it): for obj in it: if obj: return True def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) return value r...
import __builtin__ def any(it): for obj in it: if obj: return True return False def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) r...
<commit_before>import __builtin__ def any(it): for obj in it: if obj: return True def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) ret...
import __builtin__ def any(it): for obj in it: if obj: return True return False def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) r...
import __builtin__ def any(it): for obj in it: if obj: return True def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) return value r...
<commit_before>import __builtin__ def any(it): for obj in it: if obj: return True def all(it): for obj in it: if not obj: return False return True def max(it, key=None): if key is not None: k, value = max((key(value), value) for value in it) ret...
e5803617b27144cb88563b3533b66f0b96482143
guv/green/time.py
guv/green/time.py
__time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__time)) from ..greenthread import sleep sleep # silence pyflakes
"""Greenified :mod:`time` module The only thing that needs to be patched from :mod:`time` is :func:`time.sleep` to yield instead of block the thread. """ __time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__tim...
Declare sleep as a global instead of relying on import
Declare sleep as a global instead of relying on import This is a nicer way to define it in the greenified module. Unused imports may accidentally disappear after using your IDE's "optimize imports" function.
Python
mit
veegee/guv,veegee/guv
__time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__time)) from ..greenthread import sleep sleep # silence pyflakes Declare sleep as a global instead of relying on import This is a nicer way to define it in ...
"""Greenified :mod:`time` module The only thing that needs to be patched from :mod:`time` is :func:`time.sleep` to yield instead of block the thread. """ __time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__tim...
<commit_before>__time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__time)) from ..greenthread import sleep sleep # silence pyflakes <commit_msg>Declare sleep as a global instead of relying on import This is a...
"""Greenified :mod:`time` module The only thing that needs to be patched from :mod:`time` is :func:`time.sleep` to yield instead of block the thread. """ __time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__tim...
__time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__time)) from ..greenthread import sleep sleep # silence pyflakes Declare sleep as a global instead of relying on import This is a nicer way to define it in ...
<commit_before>__time = __import__('time') from ..patcher import slurp_properties __patched__ = ['sleep'] slurp_properties(__time, globals(), ignore=__patched__, srckeys=dir(__time)) from ..greenthread import sleep sleep # silence pyflakes <commit_msg>Declare sleep as a global instead of relying on import This is a...
3a0b65b6698eea40c949a11e733a7f0337fe6e11
kolibri/plugins/app/utils.py
kolibri/plugins/app/utils.py
from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabilities = {} def __contains__(self, capability...
from django.core.urlresolvers import reverse from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabiliti...
Add method to get initialize url.
Add method to get initialize url.
Python
mit
indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri
from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabilities = {} def __contains__(self, capability...
from django.core.urlresolvers import reverse from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabiliti...
<commit_before>from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabilities = {} def __contains__(s...
from django.core.urlresolvers import reverse from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabiliti...
from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabilities = {} def __contains__(self, capability...
<commit_before>from kolibri.plugins.app.kolibri_plugin import App from kolibri.plugins.registry import registered_plugins SHARE_FILE = "share_file" CAPABILITES = (SHARE_FILE,) class AppInterface(object): __slot__ = "_capabilities" def __init__(self): self._capabilities = {} def __contains__(s...
c269debb2819db246483551d512c33b784bbfd22
test.py
test.py
print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "----- lua.execute(\"xxx = {1,2,3,foo={4,5}}\") -----" lua.execute("xxx ...
print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "lg:", lg print "lg._G:", lg._G print "lg['_G']:", lg['_G'] print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "-----...
Test Lua's globals() and require() from Python
Test Lua's globals() and require() from Python
Python
lgpl-2.1
albanD/lunatic-python,bastibe/lunatic-python,bastibe/lunatic-python,greatwolf/lunatic-python,alexsilva/lunatic-python,greatwolf/lunatic-python,hughperkins/lunatic-python,alexsilva/lunatic-python,hughperkins/lunatic-python,alexsilva/lunatic-python,albanD/lunatic-python
print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "----- lua.execute(\"xxx = {1,2,3,foo={4,5}}\") -----" lua.execute("xxx ...
print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "lg:", lg print "lg._G:", lg._G print "lg['_G']:", lg['_G'] print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "-----...
<commit_before>print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "----- lua.execute(\"xxx = {1,2,3,foo={4,5}}\") -----" lu...
print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "lg:", lg print "lg._G:", lg._G print "lg['_G']:", lg['_G'] print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "-----...
print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "----- lua.execute(\"xxx = {1,2,3,foo={4,5}}\") -----" lua.execute("xxx ...
<commit_before>print "----- import lua -----" import lua print "----- lg = lua.globals() -----" lg = lua.globals() print "----- lg.foo = \"bar\" -----" lg.foo = 'bar' print "----- lg.tmp = [] -----" lg.tmp = [] print "----- print lg.tmp -----" print lg.tmp print "----- lua.execute(\"xxx = {1,2,3,foo={4,5}}\") -----" lu...
33e1b3e5fd5e9985f57cf83545c0b9053f8b9e4d
trex/urls.py
trex/urls.py
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView) urlpat...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView) urlpat...
Use standard view name for project details
Use standard view name for project details restframework by default user <modelname>-detail as view name for detail model api views.
Python
mit
bjoernricks/trex,bjoernricks/trex
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView) urlpat...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView) urlpat...
<commit_before># -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAP...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView) urlpat...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView) urlpat...
<commit_before># -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <[email protected]> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAP...
551325699aa1554b589b008f6bebdf2dfd1e1405
test/expression_command/radar_9531204/TestPrintfAfterUp.py
test/expression_command/radar_9531204/TestPrintfAfterUp.py
""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 @unittest2.expectedFailure def...
""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 def test_expr_commands(self): ...
Remove the expectedFailure decorator. The test has been passing for some time now.
Remove the expectedFailure decorator. The test has been passing for some time now. git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@138452 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb
""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 @unittest2.expectedFailure def...
""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 def test_expr_commands(self): ...
<commit_before>""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 @unittest2.expected...
""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 def test_expr_commands(self): ...
""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 @unittest2.expectedFailure def...
<commit_before>""" The evaluating printf(...) after break stop and then up a stack frame. """ import os, time import unittest2 import lldb from lldbtest import * class Radar9531204TestCase(TestBase): mydir = os.path.join("expression_command", "radar_9531204") # rdar://problem/9531204 @unittest2.expected...
e14a92e26fe3a8fd14617a57dbf3d4630ba1e50b
impala_udt.py
impala_udt.py
""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import udf, IntVal, FunctionContext @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntVal.null return IntVal(arg1.val + arg2.val) # Simply print the ...
""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import (udf, IntVal, FunctionContext, BooleanVal, DoubleVal, TinyIntVal) @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntV...
Add simple test to exercise DoubleVal, TinyIntVal and BooleanVal
Add simple test to exercise DoubleVal, TinyIntVal and BooleanVal
Python
bsd-2-clause
cpcloud/numba,GaZ3ll3/numba,sklam/numba,seibert/numba,stuartarchibald/numba,IntelLabs/numba,stefanseefeld/numba,GaZ3ll3/numba,gdementen/numba,jriehl/numba,gmarkall/numba,ssarangi/numba,seibert/numba,pitrou/numba,ssarangi/numba,stonebig/numba,stuartarchibald/numba,numba/numba,numba/numba,cpcloud/numba,sklam/numba,stefan...
""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import udf, IntVal, FunctionContext @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntVal.null return IntVal(arg1.val + arg2.val) # Simply print the ...
""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import (udf, IntVal, FunctionContext, BooleanVal, DoubleVal, TinyIntVal) @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntV...
<commit_before>""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import udf, IntVal, FunctionContext @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntVal.null return IntVal(arg1.val + arg2.val) # Si...
""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import (udf, IntVal, FunctionContext, BooleanVal, DoubleVal, TinyIntVal) @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntV...
""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import udf, IntVal, FunctionContext @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntVal.null return IntVal(arg1.val + arg2.val) # Simply print the ...
<commit_before>""" A simple demonstration of Impala UDF generation. """ from numba.ext.impala import udf, IntVal, FunctionContext @udf(IntVal(FunctionContext, IntVal, IntVal)) def add_udf(context, arg1, arg2): if arg1.is_null or arg2.is_null: return IntVal.null return IntVal(arg1.val + arg2.val) # Si...
d61540551943df57aa0dece5e44e130309dcafec
requests/packages/__init__.py
requests/packages/__init__.py
from __future__ import absolute_import from . import urllib3
""" pip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip._vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import import sys class VendorAlias(object): def __in...
Copy pip's import machinery wholesale
Copy pip's import machinery wholesale
Python
apache-2.0
psf/requests
from __future__ import absolute_import from . import urllib3 Copy pip's import machinery wholesale
""" pip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip._vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import import sys class VendorAlias(object): def __in...
<commit_before>from __future__ import absolute_import from . import urllib3 <commit_msg>Copy pip's import machinery wholesale<commit_after>
""" pip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip._vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import import sys class VendorAlias(object): def __in...
from __future__ import absolute_import from . import urllib3 Copy pip's import machinery wholesale""" pip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip._vendor should be considered immutable and should only be updated to versions from upstream...
<commit_before>from __future__ import absolute_import from . import urllib3 <commit_msg>Copy pip's import machinery wholesale<commit_after>""" pip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip._vendor should be considered immutable and should ...
c90c851391a32472d9937930543698d09ee017e9
distarray/tests/test_client.py
distarray/tests/test_client.py
import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we create a plain van...
import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we create a plain van...
Add failing test for DistArrayProxy.__setitem__
Add failing test for DistArrayProxy.__setitem__
Python
bsd-3-clause
enthought/distarray,RaoUmer/distarray,RaoUmer/distarray,enthought/distarray
import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we create a plain van...
import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we create a plain van...
<commit_before>import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we cre...
import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we create a plain van...
import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we create a plain van...
<commit_before>import unittest import numpy as np from IPython.parallel import Client from distarray.client import DistArrayContext class TestDistArrayContext(unittest.TestCase): def setUp(self): self.client = Client() self.dv = self.client[:] def test_create_DAC(self): '''Can we cre...
b7047bd09a6bda21dfd1c69cc4cdd08ae328a03b
autotests/tests/sample_false_assert.py
autotests/tests/sample_false_assert.py
import time from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEquals(1, 2)
from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEqual(1, 2)
Fix deprecated use of function on sample test
Fix deprecated use of function on sample test
Python
mit
jfelipefilho/test-manager,jfelipefilho/test-manager,jfelipefilho/test-manager
import time from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEquals(1, 2) Fix deprecated use of function on sample test
from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEqual(1, 2)
<commit_before>import time from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEquals(1, 2) <commit_msg>Fix deprecated use of function on sample test<commit_after>
from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEqual(1, 2)
import time from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEquals(1, 2) Fix deprecated use of function on sample testfrom unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeou...
<commit_before>import time from unittest import TestCase class Sample(TestCase): def test_sameple_with_big_timeout(self): print("Testing false assert") self.assertEquals(1, 2) <commit_msg>Fix deprecated use of function on sample test<commit_after>from unittest import TestCase class Sample(TestCa...
6d8b6cfe9e2de860b4b39a1e0f0bb8fa45e6b96f
manage.py
manage.py
#-*- coding: utf-8 -*- from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from db_create import ( init_db, drop_db, init_admin_user, init_entry, init_category, init_tag ) from flask.ext.migrate import MigrateCommand from logpot.app import app import os if os.path.exists('.e...
#-*- coding: utf-8 -*- import os if os.path.exists('.env'): print('Importing environment from .env...') for line in open('.env'): var = line.strip().split('=') if len(var) == 2: os.environ[var[0]] = var[1] from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from ...
Fix import location of environment variables
Fix import location of environment variables
Python
mit
moremorefor/Logpot,moremorefor/Logpot,moremorefor/Logpot
#-*- coding: utf-8 -*- from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from db_create import ( init_db, drop_db, init_admin_user, init_entry, init_category, init_tag ) from flask.ext.migrate import MigrateCommand from logpot.app import app import os if os.path.exists('.e...
#-*- coding: utf-8 -*- import os if os.path.exists('.env'): print('Importing environment from .env...') for line in open('.env'): var = line.strip().split('=') if len(var) == 2: os.environ[var[0]] = var[1] from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from ...
<commit_before>#-*- coding: utf-8 -*- from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from db_create import ( init_db, drop_db, init_admin_user, init_entry, init_category, init_tag ) from flask.ext.migrate import MigrateCommand from logpot.app import app import os if os....
#-*- coding: utf-8 -*- import os if os.path.exists('.env'): print('Importing environment from .env...') for line in open('.env'): var = line.strip().split('=') if len(var) == 2: os.environ[var[0]] = var[1] from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from ...
#-*- coding: utf-8 -*- from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from db_create import ( init_db, drop_db, init_admin_user, init_entry, init_category, init_tag ) from flask.ext.migrate import MigrateCommand from logpot.app import app import os if os.path.exists('.e...
<commit_before>#-*- coding: utf-8 -*- from flask.ext.script import Manager, prompt, prompt_bool, prompt_pass from db_create import ( init_db, drop_db, init_admin_user, init_entry, init_category, init_tag ) from flask.ext.migrate import MigrateCommand from logpot.app import app import os if os....
d76b9a46515825bdea114efdf9cedf52e2033cc6
16/016_power_digit_sum.py
16/016_power_digit_sum.py
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
Remove redundant empty line at end of file
Remove redundant empty line at end of file There is no need to have multiple empty lines in the end.
Python
mit
the-gigi/project-euler,the-gigi/project-euler,the-gigi/project-euler
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 Remove redundant empty line at end of file There is no need to have multiple empty lines in the end.
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
<commit_before>"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 <commit_msg>Remove redundant empty line at end of file There is no need to have multiple empty lines in the en...
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 Remove redundant empty line at end of file There is no need to have multiple empty lines in the end."""Power Digit Sum 2^15 ...
<commit_before>"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 <commit_msg>Remove redundant empty line at end of file There is no need to have multiple empty lines in the en...
52f1c57c2aebd6d371ce95d35442c5eb6f59ea0b
zerver/migrations/0127_disallow_chars_in_stream_and_user_name.py
zerver/migrations/0127_disallow_chars_in_stream_and_user_name.py
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment # and was backed out. This ...
# -*- coding: utf-8 -*- from typing import Any, List from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment ...
Fix mypy error in placeholder migration.
migrations: Fix mypy error in placeholder migration.
Python
apache-2.0
eeshangarg/zulip,timabbott/zulip,brainwane/zulip,tommyip/zulip,zulip/zulip,rishig/zulip,punchagan/zulip,eeshangarg/zulip,hackerkid/zulip,punchagan/zulip,shubhamdhama/zulip,brainwane/zulip,rishig/zulip,punchagan/zulip,hackerkid/zulip,showell/zulip,andersk/zulip,jackrzhang/zulip,tommyip/zulip,synicalsyntax/zulip,timabbot...
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment # and was backed out. This ...
# -*- coding: utf-8 -*- from typing import Any, List from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment ...
<commit_before># -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment # and was bac...
# -*- coding: utf-8 -*- from typing import Any, List from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment ...
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment # and was backed out. This ...
<commit_before># -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0126_prereg_remove_users_without_realm'), ] operations = [ # There was a migration here, which wasn't ready for wide deployment # and was bac...
4649ea618a4f41f5a2f54eb73806d3e1b98e5e00
Python/number-complement.py
Python/number-complement.py
# Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the integer’s binar...
# Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the integer’s binar...
Add another solution for 'Number complement' problem
Add another solution for 'Number complement' problem
Python
mit
kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015
# Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the integer’s binar...
# Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the integer’s binar...
<commit_before># Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the ...
# Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the integer’s binar...
# Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the integer’s binar...
<commit_before># Time: O(1) # Space: O(1) # Given a positive integer, output its complement number. # The complement strategy is to flip the bits of its binary representation. # # Note: # The given integer is guaranteed to fit within the range of a 32-bit signed integer. # You could assume no leading zero bit in the ...
a4b3c62660f394bb6205f5a4bd915782752ddb8d
byceps/announce/discord/connections.py
byceps/announce/discord/connections.py
""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.board import BoardPostingCreated, BoardTopicCreated from ...events....
""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.base import _BaseEvent from ...events.board import BoardPostingCrea...
Compress Discord event connectors into single function
Compress Discord event connectors into single function
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.board import BoardPostingCreated, BoardTopicCreated from ...events....
""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.base import _BaseEvent from ...events.board import BoardPostingCrea...
<commit_before>""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.board import BoardPostingCreated, BoardTopicCreated ...
""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.base import _BaseEvent from ...events.board import BoardPostingCrea...
""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.board import BoardPostingCreated, BoardTopicCreated from ...events....
<commit_before>""" byceps.announce.discord.connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Announce events on Discord. :Copyright: 2006-2020 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from ...events.board import BoardPostingCreated, BoardTopicCreated ...
acccb727054d919a2a36854d8bac502274ed3bdd
mp3-formatter/rename_mp3.py
mp3-formatter/rename_mp3.py
#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist tracklist = read_tracklist() mp3_extension = ".mp3" files_all = os.listdir('.') files = [] for f in files_all: # Prune directories if n...
#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist def match_length(files, tracklist): if len(files) != len(tracklist): raise RuntimeError( str(len(tracklist)) + ...
Move files/tracklist count check to function
MP3: Move files/tracklist count check to function
Python
mit
jleung51/scripts,jleung51/scripts,jleung51/scripts
#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist tracklist = read_tracklist() mp3_extension = ".mp3" files_all = os.listdir('.') files = [] for f in files_all: # Prune directories if n...
#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist def match_length(files, tracklist): if len(files) != len(tracklist): raise RuntimeError( str(len(tracklist)) + ...
<commit_before>#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist tracklist = read_tracklist() mp3_extension = ".mp3" files_all = os.listdir('.') files = [] for f in files_all: # Prune direc...
#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist def match_length(files, tracklist): if len(files) != len(tracklist): raise RuntimeError( str(len(tracklist)) + ...
#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist tracklist = read_tracklist() mp3_extension = ".mp3" files_all = os.listdir('.') files = [] for f in files_all: # Prune directories if n...
<commit_before>#!/usr/bin/python3 import ID3 import os import sys def read_tracklist(): tracklist = [] for line in sys.stdin: tracklist.append(line) return tracklist tracklist = read_tracklist() mp3_extension = ".mp3" files_all = os.listdir('.') files = [] for f in files_all: # Prune direc...
86dbcaee58bbd529984f36a14aba777ac336ca34
myfedora/lib/app_globals.py
myfedora/lib/app_globals.py
"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application initializat...
"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application initializat...
Comment out the Shove object, as we are not using it yet
Comment out the Shove object, as we are not using it yet
Python
agpl-3.0
Fale/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages
"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application initializat...
"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application initializat...
<commit_before>"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application ...
"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application initializat...
"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application initializat...
<commit_before>"""The application's Globals object""" from app_factory import AppFactoryDict class Globals(object): """Globals acts as a container for objects available throughout the life of the application """ def __init__(self): """One instance of Globals is created during application ...
fc2b587d792c19afe00caf129057afa686bdc684
web_utils.py
web_utils.py
"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import json_response def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict output of an HTTP handler into JSON response. Decorat...
"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import ( json_response, HTTPError, HTTPSuccessful, HTTPRedirection ) def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict ou...
Handle HTTP errors raised within web handlers
Handle HTTP errors raised within web handlers
Python
mit
open-craft-guild/aio-feature-flags
"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import json_response def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict output of an HTTP handler into JSON response. Decorat...
"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import ( json_response, HTTPError, HTTPSuccessful, HTTPRedirection ) def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict ou...
<commit_before>"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import json_response def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict output of an HTTP handler into JSON respons...
"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import ( json_response, HTTPError, HTTPSuccessful, HTTPRedirection ) def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict ou...
"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import json_response def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict output of an HTTP handler into JSON response. Decorat...
<commit_before>"""Collection of HTTP helpers.""" from functools import partial, wraps from inspect import iscoroutine from aiohttp.web import json_response def async_json_out(orig_method=None, *, status=200, content_type='application/json', **dec_kwargs): """Turn dict output of an HTTP handler into JSON respons...
73f4c29d47e23b26483733ab25ea33367657f758
test/selenium/src/lib/page/modal/create_new_object.py
test/selenium/src/lib/page/modal/create_new_object.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal import base cla...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal import base cla...
Add modals for creating objects
Add modals for creating objects
Python
apache-2.0
plamut/ggrc-core,edofic/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,josthkko/ggrc-core,j0gurt/ggrc-core,Al...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal import base cla...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal import base cla...
<commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal im...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal import base cla...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal import base cla...
<commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Modals for creating new objects""" from lib.page.modal im...
53309f9c85739a57388902804e875d67404957b2
modules/add_random.py
modules/add_random.py
def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self.confman.get_val...
def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self.confman.get_val...
Fix random module's help message
Fix random module's help message
Python
agpl-3.0
Flat/JiyuuBot,Zaexu/JiyuuBot
def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self.confman.get_val...
def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self.confman.get_val...
<commit_before>def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self....
def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self.confman.get_val...
def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self.confman.get_val...
<commit_before>def add_random(self, command): import random global selected_songs filelist = [] for root, dirs, files in os.walk(MUSIC_PATH): for name in files: root = root.replace(MUSIC_PATH + os.sep, "") filelist.append(os.path.join(root, name)) numsongs = int(self....
440593615adca029b11575e604d251c7b68942b4
api/licenses/serializers.py
api/licenses/serializers.py
from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) non_anonymized_...
from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) non_anonymized_...
Add url to the license api serializer
Add url to the license api serializer
Python
apache-2.0
felliott/osf.io,baylee-d/osf.io,sloria/osf.io,baylee-d/osf.io,HalcyonChimera/osf.io,adlius/osf.io,HalcyonChimera/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,felliott/osf.io,mfraezz/osf.io,cslzchen/osf.io,icereval/osf.io,felliott/osf.io,adlius/osf.io,Johnetordoff/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf....
from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) non_anonymized_...
from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) non_anonymized_...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) ...
from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) non_anonymized_...
from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) non_anonymized_...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import ( JSONAPISerializer, LinksField, IDField, TypeField ) from api.base.utils import absolute_reverse class LicenseSerializer(JSONAPISerializer): filterable_fields = frozenset([ 'name', 'id', ]) ...
edcce0e44c453f459e82774efeb0996457d84306
integration_tests/tests/test_experiment_detumbling.py
integration_tests/tests/test_experiment_detumbling.py
from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __init__(self, *args...
from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __init__(self, *args...
Fix race condition in detumbling experiment test
Fix race condition in detumbling experiment test In detumbling experiment test, experiment was commanded to run for 4 hours. After that OBC time was advanced also by 4 hours, however it was not enough as during next mission loop OBC time was few milliseconds before scheduled experiment end.
Python
agpl-3.0
PW-Sat2/PWSat2OBC,PW-Sat2/PWSat2OBC,PW-Sat2/PWSat2OBC,PW-Sat2/PWSat2OBC
from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __init__(self, *args...
from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __init__(self, *args...
<commit_before>from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __ini...
from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __init__(self, *args...
from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __init__(self, *args...
<commit_before>from datetime import timedelta, datetime import telecommand from obc.experiments import ExperimentType from system import auto_power_on from tests.base import BaseTest from utils import TestEvent class TestExperimentDetumbling(BaseTest): @auto_power_on(auto_power_on=False) def __ini...
0fca8a2c694db53d214d927606e2b0fed78ae31c
knights/dj.py
knights/dj.py
from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEngine): def __init__(self, params...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
Make context a defaultdict so unknown values yield empty string
Make context a defaultdict so unknown values yield empty string
Python
mit
funkybob/knights-templater,funkybob/knights-templater
from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEngine): def __init__(self, params...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
<commit_before>from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEngine): def __init...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEngine): def __init__(self, params...
<commit_before>from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEngine): def __init...
58c8e2d04b38ea951ae01ae0930df206fd657d8a
tests/utils/test_helpers.py
tests/utils/test_helpers.py
from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestUtils(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_create(Post, title=...
from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestHelpers(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_create(Post, titl...
Rename TestUtils test case to TestHelpers
Rename TestUtils test case to TestHelpers
Python
mit
Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger
from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestUtils(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_create(Post, title=...
from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestHelpers(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_create(Post, titl...
<commit_before>from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestUtils(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_crea...
from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestHelpers(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_create(Post, titl...
from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestUtils(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_create(Post, title=...
<commit_before>from app.models import Post from app.utils.helpers import get_or_create from tests.general import AppTestCase class TestUtils(AppTestCase): def test_get_or_create(self): post1, created1 = get_or_create(Post, title='foo', body='bar') post1.save() post2, created2 = get_or_crea...
ab55f28592956cc6c9abbea31c2b0d66e13cddc1
src/pygrapes/adapter/__init__.py
src/pygrapes/adapter/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from abstract import Abstract from local import Local __all__ = ['Abstract', 'Local']
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from pygrapes.util import not_implemented from pygrapes.adapter.abstract import Abstract from pygrapes.adapter.local import Local try: from pygrapes.adapter.zeromq import Zmq except ImportError: Zmq = not_imple...
Load conditionally all available adapters in order to make them available right inside pygrapes.adapter module
Load conditionally all available adapters in order to make them available right inside pygrapes.adapter module
Python
bsd-3-clause
michalbachowski/pygrapes,michalbachowski/pygrapes,michalbachowski/pygrapes
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from abstract import Abstract from local import Local __all__ = ['Abstract', 'Local'] Load conditionally all available adapters in order to make them available right inside pygrapes.adapter module
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from pygrapes.util import not_implemented from pygrapes.adapter.abstract import Abstract from pygrapes.adapter.local import Local try: from pygrapes.adapter.zeromq import Zmq except ImportError: Zmq = not_imple...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from abstract import Abstract from local import Local __all__ = ['Abstract', 'Local'] <commit_msg>Load conditionally all available adapters in order to make them available right inside pygrapes.adapter m...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from pygrapes.util import not_implemented from pygrapes.adapter.abstract import Abstract from pygrapes.adapter.local import Local try: from pygrapes.adapter.zeromq import Zmq except ImportError: Zmq = not_imple...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from abstract import Abstract from local import Local __all__ = ['Abstract', 'Local'] Load conditionally all available adapters in order to make them available right inside pygrapes.adapter module#!/usr/bin/env python ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "mib" __date__ = "$2011-01-22 12:02:41$" from abstract import Abstract from local import Local __all__ = ['Abstract', 'Local'] <commit_msg>Load conditionally all available adapters in order to make them available right inside pygrapes.adapter m...
464c52d5ffd3ea4262bf826e11e6b890976bf589
cherrypy/wsgiserver/__init__.py
cherrypy/wsgiserver/__init__.py
__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGateway', 'WSGIGate...
__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGateway', 'WSGIGate...
Use uniform syntax for wsgiserver imports
Use uniform syntax for wsgiserver imports
Python
bsd-3-clause
cherrypy/cherrypy,cherrypy/cheroot,Safihre/cherrypy,cherrypy/cherrypy,Safihre/cherrypy
__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGateway', 'WSGIGate...
__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGateway', 'WSGIGate...
<commit_before>__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGate...
__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGateway', 'WSGIGate...
__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGateway', 'WSGIGate...
<commit_before>__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGate...
3b5ac5f7e0b10b06be042037278634fc42bd9b35
tmc/models/document_type.py
tmc/models/document_type.py
# -*- coding: utf-8 -*- from odoo import models, fields, _ class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=3, required=True ) model = fields.Char( required=True ...
# -*- coding: utf-8 -*- from odoo import _, fields, models class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=4, required=True ) model = fields.Char( required=True ...
Increase size for abbreviation field
[FIX] Increase size for abbreviation field
Python
agpl-3.0
tmcrosario/odoo-tmc
# -*- coding: utf-8 -*- from odoo import models, fields, _ class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=3, required=True ) model = fields.Char( required=True ...
# -*- coding: utf-8 -*- from odoo import _, fields, models class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=4, required=True ) model = fields.Char( required=True ...
<commit_before># -*- coding: utf-8 -*- from odoo import models, fields, _ class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=3, required=True ) model = fields.Char( re...
# -*- coding: utf-8 -*- from odoo import _, fields, models class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=4, required=True ) model = fields.Char( required=True ...
# -*- coding: utf-8 -*- from odoo import models, fields, _ class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=3, required=True ) model = fields.Char( required=True ...
<commit_before># -*- coding: utf-8 -*- from odoo import models, fields, _ class Document_Type(models.Model): _name = 'tmc.document_type' name = fields.Char( string='Document Type' ) abbreviation = fields.Char( size=3, required=True ) model = fields.Char( re...
b3f7b677edb0a87abff2ef64dadb64547d757d6b
elasticsearch_django/migrations/0004_auto_20161129_1135.py
elasticsearch_django/migrations/0004_auto_20161129_1135.py
# Generated by Django 1.9 on 2016-11-29 11:35 from django.db import migrations from ..db.fields import JSONField class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_name="searchquery", ...
# Generated by Django 1.9 on 2016-11-29 11:35 from django.contrib.postgres.fields import JSONField from django.db import migrations class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_nam...
Update migration to use native JSONField
Update migration to use native JSONField
Python
mit
yunojuno/elasticsearch-django
# Generated by Django 1.9 on 2016-11-29 11:35 from django.db import migrations from ..db.fields import JSONField class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_name="searchquery", ...
# Generated by Django 1.9 on 2016-11-29 11:35 from django.contrib.postgres.fields import JSONField from django.db import migrations class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_nam...
<commit_before># Generated by Django 1.9 on 2016-11-29 11:35 from django.db import migrations from ..db.fields import JSONField class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_name="...
# Generated by Django 1.9 on 2016-11-29 11:35 from django.contrib.postgres.fields import JSONField from django.db import migrations class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_nam...
# Generated by Django 1.9 on 2016-11-29 11:35 from django.db import migrations from ..db.fields import JSONField class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_name="searchquery", ...
<commit_before># Generated by Django 1.9 on 2016-11-29 11:35 from django.db import migrations from ..db.fields import JSONField class Migration(migrations.Migration): dependencies = [("elasticsearch_django", "0003_auto_20160926_2021")] operations = [ migrations.AlterField( model_name="...
529c98ec0a7c5a3fefa4da6cdf2f6a58b5487ebc
openquake/__init__.py
openquake/__init__.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Make the openquake namespace compatible with old setuptools
Make the openquake namespace compatible with old setuptools Former-commit-id: e5f4dc01e94694bf9bfcae3ecd6eca34a33a24eb
Python
agpl-3.0
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
<commit_before># -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
<commit_before># -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version...
a9848a6af66b672845b876f3b2e1e7c3a8805e0c
wagtailstartproject/legacy_project_template/project_name/wsgi.py
wagtailstartproject/legacy_project_template/project_name/wsgi.py
""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals import os fr...
""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals import os fr...
Adjust DJANGO_SETTINGS_MODULE to point to settings module
Adjust DJANGO_SETTINGS_MODULE to point to settings module
Python
mit
leukeleu/wagtail-startproject,leukeleu/wagtail-startproject
""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals import os fr...
""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals import os fr...
<commit_before>""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals...
""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals import os fr...
""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals import os fr...
<commit_before>""" WSGI config for {{ project_name }} project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ """ from __future__ import absolute_import, unicode_literals...
0c8e67f51ac6271ea4fed1f524144cfccbf6e215
form_designer/contrib/cms_plugins/form_designer_form/migrations/0001_initial.py
form_designer/contrib/cms_plugins/form_designer_form/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ('form_designer', '0001_initial'), ] operations = [ migrations.CreateModel( name=...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import cms from django.db import migrations, models from pkg_resources import parse_version as V # Django CMS 3.3.1 is oldest release where the change affects. # Refs https://github.com/divio/django-cms/commit/871a164 if V(cms.__version__) >= V('3.3.1'):...
Add related name for cmsplugin ptr
Add related name for cmsplugin ptr Add the related name for the cmsplugin_ptr field if the Django CMS version is 3.3.1 or newer. The related name is added to the base model in Django CMS see: https://github.com/divio/django-cms/commit/871a16433f713249ee20b52574803f51941ac20c
Python
bsd-3-clause
andersinno/django-form-designer,kcsry/django-form-designer,andersinno/django-form-designer-ai,andersinno/django-form-designer,andersinno/django-form-designer-ai,kcsry/django-form-designer
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ('form_designer', '0001_initial'), ] operations = [ migrations.CreateModel( name=...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import cms from django.db import migrations, models from pkg_resources import parse_version as V # Django CMS 3.3.1 is oldest release where the change affects. # Refs https://github.com/divio/django-cms/commit/871a164 if V(cms.__version__) >= V('3.3.1'):...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ('form_designer', '0001_initial'), ] operations = [ migrations.CreateModel( ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import cms from django.db import migrations, models from pkg_resources import parse_version as V # Django CMS 3.3.1 is oldest release where the change affects. # Refs https://github.com/divio/django-cms/commit/871a164 if V(cms.__version__) >= V('3.3.1'):...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ('form_designer', '0001_initial'), ] operations = [ migrations.CreateModel( name=...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ('form_designer', '0001_initial'), ] operations = [ migrations.CreateModel( ...
4bbfdfc63cdfa0a6f54b09683033f23a71115547
src/pyws/protocols/rest.py
src/pyws/protocols/rest.py
from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json from pyws.protocols.base import Protocol __all__ = ('RestProtocol', 'JsonProtocol', ) create_response = partial(Response, content_type='a...
from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json class encoder( json.JSONEncoder ): # JSON Serializer with datetime support def default(self,obj): if isinstance(obj, dateti...
Add custom JSON serialize for Python datetime
Add custom JSON serialize for Python datetime This adds a custom JSON serializer class which stringifies Python datetime objects in to ISO 8601. JSON does not specify a date/time format, and many parsers break trying to parse a Date() javascript object. 8601 seems a resonable compromise.
Python
mit
stepank/pyws,stepank/pyws,stepank/pyws,stepank/pyws,stepank/pyws
from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json from pyws.protocols.base import Protocol __all__ = ('RestProtocol', 'JsonProtocol', ) create_response = partial(Response, content_type='a...
from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json class encoder( json.JSONEncoder ): # JSON Serializer with datetime support def default(self,obj): if isinstance(obj, dateti...
<commit_before>from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json from pyws.protocols.base import Protocol __all__ = ('RestProtocol', 'JsonProtocol', ) create_response = partial(Response, ...
from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json class encoder( json.JSONEncoder ): # JSON Serializer with datetime support def default(self,obj): if isinstance(obj, dateti...
from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json from pyws.protocols.base import Protocol __all__ = ('RestProtocol', 'JsonProtocol', ) create_response = partial(Response, content_type='a...
<commit_before>from functools import partial from pyws.errors import BadRequest from pyws.functions.args.types.complex import List from pyws.response import Response from pyws.utils import json from pyws.protocols.base import Protocol __all__ = ('RestProtocol', 'JsonProtocol', ) create_response = partial(Response, ...
b0aad0ba83557fc529e803547f93a54d272f5817
fmn/lib/tests/example_rules.py
fmn/lib/tests/example_rules.py
""" Some example rules for the test suite. """ def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah'
""" Some example rules for the test suite. """ import fmn.lib.hinting def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah' @fmn.lib.hinting.hint(categories=['whatever']) def hint_masked_rule(config, message, argument1): """ ...
Add example rule for test.
Add example rule for test.
Python
lgpl-2.1
jeremycline/fmn,jeremycline/fmn,jeremycline/fmn
""" Some example rules for the test suite. """ def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah' Add example rule for test.
""" Some example rules for the test suite. """ import fmn.lib.hinting def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah' @fmn.lib.hinting.hint(categories=['whatever']) def hint_masked_rule(config, message, argument1): """ ...
<commit_before>""" Some example rules for the test suite. """ def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah' <commit_msg>Add example rule for test.<commit_after>
""" Some example rules for the test suite. """ import fmn.lib.hinting def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah' @fmn.lib.hinting.hint(categories=['whatever']) def hint_masked_rule(config, message, argument1): """ ...
""" Some example rules for the test suite. """ def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah' Add example rule for test.""" Some example rules for the test suite. """ import fmn.lib.hinting def wat_rule(config, message): ...
<commit_before>""" Some example rules for the test suite. """ def wat_rule(config, message): return message['wat'] == 'blah' def not_wat_rule(config, message): return message['wat'] != 'blah' <commit_msg>Add example rule for test.<commit_after>""" Some example rules for the test suite. """ import fmn.lib.h...
d145d2fe8666d4dbbc104bb563fc43415bd8802c
downloaders/downloader_factory.py
downloaders/downloader_factory.py
import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" class Download...
import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" class Download...
Add valitation for reddit domains when in URL mode
Add valitation for reddit domains when in URL mode
Python
apache-2.0
CharlieCorner/pymage_downloader
import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" class Download...
import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" class Download...
<commit_before>import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" ...
import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" class Download...
import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" class Download...
<commit_before>import logging from argparse import Namespace from downloaders import downloader from downloaders.downloader import Downloader from downloaders.reddit_downloader import RedditDownloader LOGGER = logging.getLogger(__name__) FOURCHAN_FILE_PATTERN = "4chan*_%s.*" IMGUR_SITE_FILE_PATTERN = "imgur*_%s.*" ...
7aa7eb3b27ddf4d27f62fb7e201f1cbf9b4a04e7
detectem/ws.py
detectem/ws.py
import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(url, format='js...
import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(url, format='js...
Update webservice to listen at any interface
Update webservice to listen at any interface
Python
mit
spectresearch/detectem
import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(url, format='js...
import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(url, format='js...
<commit_before>import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(...
import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(url, format='js...
import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(url, format='js...
<commit_before>import sys try: from bottle import run, post, request except ImportError: print("Install bottle to use the web service ..") sys.exit(0) from detectem.cli import get_detection_results @post('/detect') def do_detection(): url = request.forms.get('url') return get_detection_results(...
9adb2bd399e2c438dc65884ece14445c8b8e970a
cisco_olt_http/client.py
cisco_olt_http/client.py
import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented before each operatio...
import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented before each operatio...
Change token atrribute to property
Change token atrribute to property
Python
mit
Vnet-as/cisco-olt-http-client,beezz/cisco-olt-http-client
import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented before each operatio...
import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented before each operatio...
<commit_before>import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented befor...
import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented before each operatio...
import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented before each operatio...
<commit_before>import logging import requests import xmltodict from urllib.parse import urljoin LOGGER = logging.getLogger('cisco_olt_http.client') class Client(object): def __init__(self, base_url): self.base_url = base_url self.session = requests.Session() # token is incremented befor...
24e3c89f0093bafd9618dd5c3eb5ad147be0f4c3
project/apps/api/filters.py
project/apps/api/filters.py
import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filters.FilterSet): ...
import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filters.FilterSet): ...
Add season to Convention filter
Add season to Convention filter
Python
bsd-2-clause
barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore,dbinetti/barberscore-django,dbinetti/barberscore-django,barberscore/barberscore-api
import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filters.FilterSet): ...
import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filters.FilterSet): ...
<commit_before>import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filte...
import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filters.FilterSet): ...
import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filters.FilterSet): ...
<commit_before>import rest_framework_filters as filters from .models import ( Chart, Convention, Group, Person, Venue, ) class ChartFilter(filters.FilterSet): class Meta: model = Chart fields = { 'name': filters.ALL_LOOKUPS, } class ConventionFilter(filte...
43732458a09c136cc64b0c1c46584c9ba1ed5300
exploratory_analysis/time_scan.py
exploratory_analysis/time_scan.py
import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) for tweet in tweets: print '{}, {}'.format(tweet.verb(), tweet.timestamp())
import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) eng_tweets = filter(lambda t: t.language() == 'en', tweets) for tweet in tweets: pr...
Return only english tweet and print the body of the tweet for analysis via other tools
Return only english tweet and print the body of the tweet for analysis via other tools
Python
apache-2.0
chuajiesheng/twitter-sentiment-analysis
import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) for tweet in tweets: print '{}, {}'.format(tweet.verb(), tweet.timestamp()) Return only en...
import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) eng_tweets = filter(lambda t: t.language() == 'en', tweets) for tweet in tweets: pr...
<commit_before>import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) for tweet in tweets: print '{}, {}'.format(tweet.verb(), tweet.timestamp()) ...
import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) eng_tweets = filter(lambda t: t.language() == 'en', tweets) for tweet in tweets: pr...
import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) for tweet in tweets: print '{}, {}'.format(tweet.verb(), tweet.timestamp()) Return only en...
<commit_before>import os from utils import Reader if __name__ == '__main__': working_directory = os.getcwd() files = Reader.read_directory(working_directory) for f in files: tweets = Reader.read_file(f) for tweet in tweets: print '{}, {}'.format(tweet.verb(), tweet.timestamp()) ...
9808f1933d83102ee7aa1a5f176433740975af88
pytest-devpi-server/tests/integration/test_devpi_server.py
pytest-devpi-server/tests/integration/test_devpi_server.py
import json NEW_INDEX = { 'result': { 'acl_toxresult_upload': [':ANONYMOUS:'], 'acl_upload': ['testuser'], 'bases': [], 'mirror_whitelist': [], 'projects': [], 'pypi_whitelist': [], 'type': 'stage', 'volatile': True }, 'type': 'indexco...
import json NEW_INDEX = { u"result": { u"acl_toxresult_upload": [u":ANONYMOUS:"], u"acl_upload": [u"testuser"], u"bases": [], u"mirror_whitelist": [], u"projects": [], u"type": u"stage", u"volatile": True, }, u"type": u"indexconfig", } def test_ser...
Update devpi server index lookup result to fix integration test
Update devpi server index lookup result to fix integration test
Python
mit
manahl/pytest-plugins,manahl/pytest-plugins
import json NEW_INDEX = { 'result': { 'acl_toxresult_upload': [':ANONYMOUS:'], 'acl_upload': ['testuser'], 'bases': [], 'mirror_whitelist': [], 'projects': [], 'pypi_whitelist': [], 'type': 'stage', 'volatile': True }, 'type': 'indexco...
import json NEW_INDEX = { u"result": { u"acl_toxresult_upload": [u":ANONYMOUS:"], u"acl_upload": [u"testuser"], u"bases": [], u"mirror_whitelist": [], u"projects": [], u"type": u"stage", u"volatile": True, }, u"type": u"indexconfig", } def test_ser...
<commit_before>import json NEW_INDEX = { 'result': { 'acl_toxresult_upload': [':ANONYMOUS:'], 'acl_upload': ['testuser'], 'bases': [], 'mirror_whitelist': [], 'projects': [], 'pypi_whitelist': [], 'type': 'stage', 'volatile': True }, '...
import json NEW_INDEX = { u"result": { u"acl_toxresult_upload": [u":ANONYMOUS:"], u"acl_upload": [u"testuser"], u"bases": [], u"mirror_whitelist": [], u"projects": [], u"type": u"stage", u"volatile": True, }, u"type": u"indexconfig", } def test_ser...
import json NEW_INDEX = { 'result': { 'acl_toxresult_upload': [':ANONYMOUS:'], 'acl_upload': ['testuser'], 'bases': [], 'mirror_whitelist': [], 'projects': [], 'pypi_whitelist': [], 'type': 'stage', 'volatile': True }, 'type': 'indexco...
<commit_before>import json NEW_INDEX = { 'result': { 'acl_toxresult_upload': [':ANONYMOUS:'], 'acl_upload': ['testuser'], 'bases': [], 'mirror_whitelist': [], 'projects': [], 'pypi_whitelist': [], 'type': 'stage', 'volatile': True }, '...
e3f1531ff0583f5710d7067b3f31a2ae65f8a747
stackviz_deployer/db/database.py
stackviz_deployer/db/database.py
# Copyright 2016 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
# Copyright 2016 Hewlett-Packard Development Company, L.P. # # 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...
Allow environment variable overrides for DB connection.
Allow environment variable overrides for DB connection. This allows docker-style environment variables to override the default database connection info.
Python
apache-2.0
timothyb89/stackviz-deployer,timothyb89/stackviz-deployer,timothyb89/stackviz-deployer
# Copyright 2016 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
# Copyright 2016 Hewlett-Packard Development Company, L.P. # # 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...
<commit_before># Copyright 2016 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
# Copyright 2016 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
# Copyright 2016 Hewlett-Packard Development Company, L.P. # # 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...
<commit_before># Copyright 2016 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
fa1d67d3fc10f1c5a2c253b3c3609db4be9c599c
src/foremast/pipeline/create_pipeline_manual.py
src/foremast/pipeline/create_pipeline_manual.py
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
Use filename for Pipeline name
fix: Use filename for Pipeline name See also: #72
Python
apache-2.0
gogoair/foremast,gogoair/foremast
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
<commit_before># Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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 # # ...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
<commit_before># Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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 # # ...
8c982822009cb414411bc4488591e35c8d4a8bcb
migrations/0007_make_ds_name_unique.py
migrations/0007_make_ds_name_unique.py
from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql("""UPDATE data_sources SET name = name || ' ' || id;""") # Add unique constraint on data_sources.name. ...
from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql(""" UPDATE data_sources SET name = new_names.name FROM ( SELECT id, name || ' ' || ...
Rename only data sources with duplicates
Rename only data sources with duplicates
Python
bsd-2-clause
stefanseifert/redash,akariv/redash,M32Media/redash,EverlyWell/redash,imsally/redash,ninneko/redash,crowdworks/redash,alexanderlz/redash,akariv/redash,easytaxibr/redash,pubnative/redash,stefanseifert/redash,denisov-vlad/redash,alexanderlz/redash,pubnative/redash,jmvasquez/redashtest,easytaxibr/redash,EverlyWell/redash,a...
from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql("""UPDATE data_sources SET name = name || ' ' || id;""") # Add unique constraint on data_sources.name. ...
from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql(""" UPDATE data_sources SET name = new_names.name FROM ( SELECT id, name || ' ' || ...
<commit_before>from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql("""UPDATE data_sources SET name = name || ' ' || id;""") # Add unique constraint on data_sources...
from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql(""" UPDATE data_sources SET name = new_names.name FROM ( SELECT id, name || ' ' || ...
from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql("""UPDATE data_sources SET name = name || ' ' || id;""") # Add unique constraint on data_sources.name. ...
<commit_before>from redash.models import db if __name__ == '__main__': db.connect_db() with db.database.transaction(): # Make sure all data sources names are unique. db.database.execute_sql("""UPDATE data_sources SET name = name || ' ' || id;""") # Add unique constraint on data_sources...
db0be000a99e0dac7c9d37817cfd5000b7121ef3
stream/rest/views.py
stream/rest/views.py
# Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.org/tutorial/1-s...
# Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.org/tutorial/1-s...
Add multiple objects returned error.
Add multiple objects returned error.
Python
apache-2.0
CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project
# Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.org/tutorial/1-s...
# Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.org/tutorial/1-s...
<commit_before># Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.o...
# Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.org/tutorial/1-s...
# Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.org/tutorial/1-s...
<commit_before># Author: Braedy Kuzma from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer import uuid from dash.models import Post from .serializers import PostSerializer # Initially taken from # http://www.django-rest-framework.o...
902e4ce0848cc2c3afa7192a85d413ed2919c798
csunplugged/tests/plugging_it_in/models/test_testcase.py
csunplugged/tests/plugging_it_in/models/test_testcase.py
from plugging_it_in.models import TestCase from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_data = Top...
from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_data = TopicsTestDataGenerator() def create_testc...
Fix models unit test for plugging it in
Fix models unit test for plugging it in
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
from plugging_it_in.models import TestCase from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_data = Top...
from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_data = TopicsTestDataGenerator() def create_testc...
<commit_before>from plugging_it_in.models import TestCase from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self....
from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_data = TopicsTestDataGenerator() def create_testc...
from plugging_it_in.models import TestCase from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_data = Top...
<commit_before>from plugging_it_in.models import TestCase from tests.BaseTestWithDB import BaseTestWithDB from tests.topics.TopicsTestDataGenerator import TopicsTestDataGenerator class TestCaseModelTest(BaseTestWithDB): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self....
ae655d0979816892f4cb0a4f8a9b3cbe910d7248
stock_request_direction/models/stock_request_order.py
stock_request_direction/models/stock_request_order.py
# Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("inbound", "Inboun...
# Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("inbound", "Inboun...
Add warehouse_id to existing onchange.
[IMP] Add warehouse_id to existing onchange.
Python
agpl-3.0
OCA/stock-logistics-warehouse,OCA/stock-logistics-warehouse,OCA/stock-logistics-warehouse,OCA/stock-logistics-warehouse
# Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("inbound", "Inboun...
# Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("inbound", "Inboun...
<commit_before># Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("in...
# Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("inbound", "Inboun...
# Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("inbound", "Inboun...
<commit_before># Copyright (c) 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = "stock.request.order" direction = fields.Selection( [("outbound", "Outbound"), ("in...
010d3501afce9ae9ae79a01d5c2e6118a9009df2
tests/cupy_tests/random_tests/test_sample.py
tests/cupy_tests/random_tests/test_sample.py
import unittest from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True
import mock import unittest import numpy from cupy import random from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True def setUp(self): random.random_sample = mock.Mock() def test_rand(self): random.rand(1, 2, 3, dtype=numpy.float32...
Add unittest for rand and randn
Add unittest for rand and randn
Python
mit
delta2323/chainer,okuta/chainer,kiyukuta/chainer,cupy/cupy,sinhrks/chainer,kashif/chainer,tscohen/chainer,ktnyt/chainer,hvy/chainer,cemoody/chainer,niboshi/chainer,kikusu/chainer,jnishi/chainer,okuta/chainer,niboshi/chainer,ronekko/chainer,benob/chainer,truongdq/chainer,cupy/cupy,aonotas/chainer,ktnyt/chainer,benob/cha...
import unittest from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True Add unittest for rand and randn
import mock import unittest import numpy from cupy import random from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True def setUp(self): random.random_sample = mock.Mock() def test_rand(self): random.rand(1, 2, 3, dtype=numpy.float32...
<commit_before>import unittest from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True <commit_msg>Add unittest for rand and randn<commit_after>
import mock import unittest import numpy from cupy import random from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True def setUp(self): random.random_sample = mock.Mock() def test_rand(self): random.rand(1, 2, 3, dtype=numpy.float32...
import unittest from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True Add unittest for rand and randnimport mock import unittest import numpy from cupy import random from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multipro...
<commit_before>import unittest from cupy import testing @testing.gpu class TestSample(unittest.TestCase): _multiprocess_can_split_ = True <commit_msg>Add unittest for rand and randn<commit_after>import mock import unittest import numpy from cupy import random from cupy import testing @testing.gpu class Test...
baf65a0c73a21e5080006a2f5e6be71abdc1feff
tests/test_class_to_config.py
tests/test_class_to_config.py
from __future__ import absolute_import, division, print_function import os import attr import pytest import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_environ() asse...
from __future__ import absolute_import, division, print_function import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_environ() assert cfg.host == "127.0.0.1" assert...
Fix formatting, remove unused vars
Fix formatting, remove unused vars
Python
apache-2.0
hynek/environ_config
from __future__ import absolute_import, division, print_function import os import attr import pytest import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_environ() asse...
from __future__ import absolute_import, division, print_function import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_environ() assert cfg.host == "127.0.0.1" assert...
<commit_before>from __future__ import absolute_import, division, print_function import os import attr import pytest import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_env...
from __future__ import absolute_import, division, print_function import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_environ() assert cfg.host == "127.0.0.1" assert...
from __future__ import absolute_import, division, print_function import os import attr import pytest import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_environ() asse...
<commit_before>from __future__ import absolute_import, division, print_function import os import attr import pytest import environ @environ.config(prefix="APP") class AppConfig(object): host = environ.var("127.0.0.1") port = environ.var(5000, converter=int) def test_default(): cfg = AppConfig.from_env...
884071638140d4f351fde68e81117ce95f418557
tetrahydra/tests/test_core.py
tetrahydra/tests/test_core.py
"""Test core functions.""" import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert output == pytest...
"""Test core functions.""" import pytest import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert ou...
Revert prev commit in this file.
Revert prev commit in this file.
Python
bsd-3-clause
ofgulban/tetrahydra
"""Test core functions.""" import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert output == pytest...
"""Test core functions.""" import pytest import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert ou...
<commit_before>"""Test core functions.""" import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert o...
"""Test core functions.""" import pytest import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert ou...
"""Test core functions.""" import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert output == pytest...
<commit_before>"""Test core functions.""" import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" # Given data = np.random.random([2, 3]) expected = np.ones(2) # When output = np.sum(closure(data), axis=1) # Then assert o...
b0e39088d326557192486a24c87df3b68bf617ce
api/models.py
api/models.py
from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, related_name='children') body = models.TextField(blank=True, defau...
from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, blank=True, related_name='children') body = models.TextField(blank...
Mark Page's parent field as 'blank'
Mark Page's parent field as 'blank'
Python
mit
MatteoNardi/dyanote-server,MatteoNardi/dyanote-server
from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, related_name='children') body = models.TextField(blank=True, defau...
from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, blank=True, related_name='children') body = models.TextField(blank...
<commit_before>from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, related_name='children') body = models.TextField(bl...
from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, blank=True, related_name='children') body = models.TextField(blank...
from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, related_name='children') body = models.TextField(blank=True, defau...
<commit_before>from django.db import models class Page(models.Model): """A Page in Dyanote.""" created = models.DateTimeField(auto_now_add=True) title = models.CharField(max_length=100, default='') parent = models.ForeignKey('api.Page', null=True, related_name='children') body = models.TextField(bl...
1231c5e2c9fd4edc033e6021372950ca9b89c2f1
ansible/module_utils/dcos.py
ansible/module_utils/dcos.py
import requests def dcos_api(method, endpoint, body=None, params=None): url = "{url}acs/api/v1{endpoint}".format( url=params['dcos_credentials']['url'], endpoint=endpoint) headers = { 'Content-Type': 'application/json', 'Authorization': "t...
import requests import urlparse def dcos_api(method, endpoint, body=None, params=None): result = urlparse.urlsplit(params['dcos_credentials']['url']) netloc = result.netloc.split('@')[-1] result = result._replace(netloc=netloc) path = "acs/api/v1{endpoint}".format(endpoint=endpoint) result = result...
Fix for urls with user/pass
Fix for urls with user/pass
Python
mit
TerryHowe/ansible-modules-dcos,TerryHowe/ansible-modules-dcos
import requests def dcos_api(method, endpoint, body=None, params=None): url = "{url}acs/api/v1{endpoint}".format( url=params['dcos_credentials']['url'], endpoint=endpoint) headers = { 'Content-Type': 'application/json', 'Authorization': "t...
import requests import urlparse def dcos_api(method, endpoint, body=None, params=None): result = urlparse.urlsplit(params['dcos_credentials']['url']) netloc = result.netloc.split('@')[-1] result = result._replace(netloc=netloc) path = "acs/api/v1{endpoint}".format(endpoint=endpoint) result = result...
<commit_before>import requests def dcos_api(method, endpoint, body=None, params=None): url = "{url}acs/api/v1{endpoint}".format( url=params['dcos_credentials']['url'], endpoint=endpoint) headers = { 'Content-Type': 'application/json', 'Aut...
import requests import urlparse def dcos_api(method, endpoint, body=None, params=None): result = urlparse.urlsplit(params['dcos_credentials']['url']) netloc = result.netloc.split('@')[-1] result = result._replace(netloc=netloc) path = "acs/api/v1{endpoint}".format(endpoint=endpoint) result = result...
import requests def dcos_api(method, endpoint, body=None, params=None): url = "{url}acs/api/v1{endpoint}".format( url=params['dcos_credentials']['url'], endpoint=endpoint) headers = { 'Content-Type': 'application/json', 'Authorization': "t...
<commit_before>import requests def dcos_api(method, endpoint, body=None, params=None): url = "{url}acs/api/v1{endpoint}".format( url=params['dcos_credentials']['url'], endpoint=endpoint) headers = { 'Content-Type': 'application/json', 'Aut...
027c7ba3036540f678ea757fa20dcb46edb079dc
mozillians/users/migrations/0038_auto_20180815_0108.py
mozillians/users/migrations/0038_auto_20180815_0108.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpProfile = apps.get...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings from django.utils.timezone import now def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'U...
Fix datamigration definition, model methods not available when migrating.
Fix datamigration definition, model methods not available when migrating.
Python
bsd-3-clause
akatsoulas/mozillians,mozilla/mozillians,akatsoulas/mozillians,mozilla/mozillians,akatsoulas/mozillians,mozilla/mozillians,akatsoulas/mozillians,mozilla/mozillians
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpProfile = apps.get...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings from django.utils.timezone import now def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'U...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpPro...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings from django.utils.timezone import now def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'U...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpProfile = apps.get...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-08-15 08:08 from __future__ import unicode_literals from django.db import migrations from django.conf import settings def add_missing_employee_vouches(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpPro...
81768b4a3ae0afc71ab7e07f0d3c45eaf0d1b5a7
Importacions_F1_Q1/Fact_impF1_eliminar_Ja_existeix.py
Importacions_F1_Q1/Fact_impF1_eliminar_Ja_existeix.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like','Ja existeix una factura')]) imp_del_ids += imp_obj.search([('state','=','erroni')...
#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like',"Aquest fitxer XML ja s'ha processat en els següents IDs")]) #imp_del_ids += imp_obj.search(...
Refactor to new F1 erro's message
Refactor to new F1 erro's message
Python
agpl-3.0
Som-Energia/invoice-janitor
#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like','Ja existeix una factura')]) imp_del_ids += imp_obj.search([('state','=','erroni')...
#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like',"Aquest fitxer XML ja s'ha processat en els següents IDs")]) #imp_del_ids += imp_obj.search(...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like','Ja existeix una factura')]) imp_del_ids += imp_obj.search([('state...
#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like',"Aquest fitxer XML ja s'ha processat en els següents IDs")]) #imp_del_ids += imp_obj.search(...
#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like','Ja existeix una factura')]) imp_del_ids += imp_obj.search([('state','=','erroni')...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','like','Ja existeix una factura')]) imp_del_ids += imp_obj.search([('state...
0974a39c758a4ff3282e5441568befa79e50ead4
plugins/twilio/twilio_sms.py
plugins/twilio/twilio_sms.py
from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' TWILIO_AUTH_TOKEN = '' TWILIO_TO_NUMBER = '' TWILIO_FROM_NUMBER = '' class SendSMSMessage(PluginBase): def pre_receive(self, al...
import os from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = os.environ.get('TWILIO_ACCOUNT_SID') TWILIO_AUTH_TOKEN = os.environ.get('TWILIO_AUTH_TOKEN') TWILIO_TO_NUMBER = os.environ.get('TWILIO_TO_NUMBER') TWILIO_FROM_N...
Use env vars to config twilio sms plugin
Use env vars to config twilio sms plugin
Python
mit
alerta/alerta-contrib,alerta/alerta-contrib,msupino/alerta-contrib,alerta/alerta-contrib,msupino/alerta-contrib
from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' TWILIO_AUTH_TOKEN = '' TWILIO_TO_NUMBER = '' TWILIO_FROM_NUMBER = '' class SendSMSMessage(PluginBase): def pre_receive(self, al...
import os from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = os.environ.get('TWILIO_ACCOUNT_SID') TWILIO_AUTH_TOKEN = os.environ.get('TWILIO_AUTH_TOKEN') TWILIO_TO_NUMBER = os.environ.get('TWILIO_TO_NUMBER') TWILIO_FROM_N...
<commit_before> from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' TWILIO_AUTH_TOKEN = '' TWILIO_TO_NUMBER = '' TWILIO_FROM_NUMBER = '' class SendSMSMessage(PluginBase): def pre_r...
import os from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = os.environ.get('TWILIO_ACCOUNT_SID') TWILIO_AUTH_TOKEN = os.environ.get('TWILIO_AUTH_TOKEN') TWILIO_TO_NUMBER = os.environ.get('TWILIO_TO_NUMBER') TWILIO_FROM_N...
from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' TWILIO_AUTH_TOKEN = '' TWILIO_TO_NUMBER = '' TWILIO_FROM_NUMBER = '' class SendSMSMessage(PluginBase): def pre_receive(self, al...
<commit_before> from twilio.rest import TwilioRestClient from alerta.app import app from alerta.plugins import PluginBase LOG = app.logger TWILIO_ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' TWILIO_AUTH_TOKEN = '' TWILIO_TO_NUMBER = '' TWILIO_FROM_NUMBER = '' class SendSMSMessage(PluginBase): def pre_r...
a4cffc0e74f9dd972357eb9dc49a57e10f1fe944
core/forms.py
core/forms.py
from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Document"), U...
from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Document"), U...
Check names of files for spaces
Check names of files for spaces
Python
bsd-3-clause
ahernp/DMCM,ahernp/DMCM,ahernp/DMCM
from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Document"), U...
from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Document"), U...
<commit_before>from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Do...
from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Document"), U...
from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Document"), U...
<commit_before>from collections import namedtuple from django import forms IMAGE = "img" UploadType = namedtuple("UploadType", ["directory", "label"]) FILE_TYPE_CHOICES = ( UploadType(directory=IMAGE, label="Image"), UploadType(directory="thumb", label="Thumbnail"), UploadType(directory="doc", label="Do...
63ef169253dbf4f9673880bccc29d97e62fdf19d
astropy/tests/image_tests.py
astropy/tests/image_tests.py
import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='astropy.github.io/astropy-data', mpl_version=MPL_VERSION[:3] +...
import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSION[:3] + '.x') def i...
Fix reference URL for images
Fix reference URL for images
Python
bsd-3-clause
pllim/astropy,larrybradley/astropy,bsipocz/astropy,StuartLittlefair/astropy,pllim/astropy,larrybradley/astropy,dhomeier/astropy,DougBurke/astropy,mhvk/astropy,saimn/astropy,larrybradley/astropy,dhomeier/astropy,lpsinger/astropy,MSeifert04/astropy,lpsinger/astropy,funbaker/astropy,DougBurke/astropy,saimn/astropy,StuartL...
import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='astropy.github.io/astropy-data', mpl_version=MPL_VERSION[:3] +...
import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSION[:3] + '.x') def i...
<commit_before>import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='astropy.github.io/astropy-data', mpl_version=MP...
import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSION[:3] + '.x') def i...
import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='astropy.github.io/astropy-data', mpl_version=MPL_VERSION[:3] +...
<commit_before>import matplotlib from matplotlib import pyplot as plt from ..utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-02-01T23:31:45.013149/{mpl_version}/" IMAGE_REFERENCE_DIR = ROOT.format(server='astropy.github.io/astropy-data', mpl_version=MP...
35fde537a48e4abbc98b065924fad784533cd4ee
jsonconfigparser/test/__init__.py
jsonconfigparser/test/__init__.py
import unittest from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n' + \ ...
import unittest import tempfile from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n...
Add basic test for read_file method
Add basic test for read_file method
Python
bsd-3-clause
bwhmather/json-config-parser
import unittest from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n' + \ ...
import unittest import tempfile from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n...
<commit_before>import unittest from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n'...
import unittest import tempfile from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n...
import unittest from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n' + \ ...
<commit_before>import unittest from jsonconfigparser import JSONConfigParser class JSONConfigTestCase(unittest.TestCase): def test_init(self): JSONConfigParser() def test_read_string(self): string = '[section]\n' + \ '# comment comment\n' + \ 'foo = "bar"\n'...
15ad87b055e4974ed1f57383b432274652511fb8
tests/pytests/unit/test_crypt.py
tests/pytests/unit/test_crypt.py
""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path = tmp_path / "k...
""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path = str(tmp_path ...
Fix test on older pythons
Fix test on older pythons
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path = tmp_path / "k...
""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path = str(tmp_path ...
<commit_before>""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path ...
""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path = str(tmp_path ...
""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path = tmp_path / "k...
<commit_before>""" tests.pytests.unit.test_crypt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unit tests for salt's crypt module """ import pytest import salt.crypt import salt.utils.files def test_get_rsa_pub_key_bad_key(tmp_path): """ get_rsa_pub_key raises InvalidKeyError when encoutering a bad key """ key_path ...
e50aee5973a2593546d1308b5ba77cd0905dd2be
app/models.py
app/models.py
# Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in the database.""...
# Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in the database.""...
Fix excessive fields in conversion
Fix excessive fields in conversion
Python
agpl-3.0
rschiang/ntu-weather,rschiang/ntu-weather
# Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in the database.""...
# Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in the database.""...
<commit_before># Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in ...
# Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in the database.""...
# Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in the database.""...
<commit_before># Data Models # (C) Poren Chiang 2020 import dataclasses from ntuweather import Weather from sqlalchemy import Table, Column, DateTime, Integer, Float from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class WeatherData(Base): """Represents a weather record saved in ...
281d3c43cc393059ce43fa32e3563883649fda08
global_mod.py
global_mod.py
#!/usr/bin/env python version = "v0.0.23" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit']
#!/usr/bin/env python version = "v0.1.0-dev" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit']
Change version number to indicate development version
Change version number to indicate development version
Python
mit
esotericnonsense/bitcoind-ncurses,azeteki/bitcoind-ncurses
#!/usr/bin/env python version = "v0.0.23" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit'] Change version number to indicate development version
#!/usr/bin/env python version = "v0.1.0-dev" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit']
<commit_before>#!/usr/bin/env python version = "v0.0.23" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit'] <commit_msg>Change version number to indicate development version<commit_after>
#!/usr/bin/env python version = "v0.1.0-dev" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit']
#!/usr/bin/env python version = "v0.0.23" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit'] Change version number to indicate development version#!/usr/bin/env python version = "v0.1.0-dev" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit']
<commit_before>#!/usr/bin/env python version = "v0.0.23" modes = ['monitor', 'wallet', 'peers', 'block', 'tx', 'console', 'net', 'forks', 'quit'] <commit_msg>Change version number to indicate development version<commit_after>#!/usr/bin/env python version = "v0.1.0-dev" modes = ['monitor', 'wallet', 'peers', 'block', ...
338c904eb9efc01e9c84c8ec91d810227582e1e3
tests/test_postgres_processor.py
tests/test_postgres_processor.py
import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument # Need to force cassandra to ignore set keyspace from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_db = PostgresPr...
import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_db = PostgresProcessor() engine = create_engine('postgresql://lo...
Remove test db setup from postgres processor
Remove test db setup from postgres processor
Python
apache-2.0
CenterForOpenScience/scrapi,mehanig/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,mehanig/scrapi,fabianvf/scrapi,felliott/scrapi,felliott/scrapi,fabianvf/scrapi
import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument # Need to force cassandra to ignore set keyspace from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_db = PostgresPr...
import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_db = PostgresProcessor() engine = create_engine('postgresql://lo...
<commit_before>import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument # Need to force cassandra to ignore set keyspace from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_...
import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_db = PostgresProcessor() engine = create_engine('postgresql://lo...
import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument # Need to force cassandra to ignore set keyspace from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_db = PostgresPr...
<commit_before>import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from scrapi.linter.document import NormalizedDocument, RawDocument # Need to force cassandra to ignore set keyspace from scrapi.processing.postgres import PostgresProcessor, Document from . import utils test_...