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
2775c7f39c0e26b728fe6fb31168328ba4caeab2
opps/api/models.py
opps/api/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class ApiKey(models.Mod...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class ApiKey(models.Mod...
Fix signal create api key on post save User
Fix signal create api key on post save User
Python
mit
williamroot/opps,opps/opps,jeanmask/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps,YACOWS/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class ApiKey(models.Mod...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class ApiKey(models.Mod...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class Ap...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class ApiKey(models.Mod...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class ApiKey(models.Mod...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class Ap...
9e77d9a40ae13cff09051c9975361dca9259b426
gala/__init__.py
gala/__init__.py
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
Update email in module init
Update email in module init
Python
bsd-3-clause
jni/gala,janelia-flyem/gala
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
<commit_before>""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __aut...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __author__ = 'Juan N...
<commit_before>""" Gala === Gala is a Python package for nD image segmentation. """ from __future__ import absolute_import import sys, logging if sys.version_info[:2] < (2,6): logging.warning('Gala has not been tested on Python versions prior to 2.6'+ ' (%d.%d detected).'%sys.version_info[:2]) __aut...
b4d43bfbcc03b93826c194fb98a52b411dc6304b
turbustat/tests/test_wrapper.py
turbustat/tests/test_wrapper.py
# Licensed under an MIT open source license - see LICENSE from ..statistics import stats_wrapper from ._testing_data import \ dataset1, dataset2 def test_wrapper(): run_wrapper = stats_wrapper(dataset1, dataset2)
# Licensed under an MIT open source license - see LICENSE import pytest import numpy as np from ..statistics import stats_wrapper, statistics_list from ._testing_data import \ dataset1, dataset2 spacers = np.arange(2, len(statistics_list) + 1, 2) # Split these into smaller tests to avoid timeout errors on Trav...
Split wrapper tests into smaller chunks
Split wrapper tests into smaller chunks
Python
mit
Astroua/TurbuStat,e-koch/TurbuStat
# Licensed under an MIT open source license - see LICENSE from ..statistics import stats_wrapper from ._testing_data import \ dataset1, dataset2 def test_wrapper(): run_wrapper = stats_wrapper(dataset1, dataset2) Split wrapper tests into smaller chunks
# Licensed under an MIT open source license - see LICENSE import pytest import numpy as np from ..statistics import stats_wrapper, statistics_list from ._testing_data import \ dataset1, dataset2 spacers = np.arange(2, len(statistics_list) + 1, 2) # Split these into smaller tests to avoid timeout errors on Trav...
<commit_before># Licensed under an MIT open source license - see LICENSE from ..statistics import stats_wrapper from ._testing_data import \ dataset1, dataset2 def test_wrapper(): run_wrapper = stats_wrapper(dataset1, dataset2) <commit_msg>Split wrapper tests into smaller chunks<commit_after>
# Licensed under an MIT open source license - see LICENSE import pytest import numpy as np from ..statistics import stats_wrapper, statistics_list from ._testing_data import \ dataset1, dataset2 spacers = np.arange(2, len(statistics_list) + 1, 2) # Split these into smaller tests to avoid timeout errors on Trav...
# Licensed under an MIT open source license - see LICENSE from ..statistics import stats_wrapper from ._testing_data import \ dataset1, dataset2 def test_wrapper(): run_wrapper = stats_wrapper(dataset1, dataset2) Split wrapper tests into smaller chunks# Licensed under an MIT open source license - see LICENS...
<commit_before># Licensed under an MIT open source license - see LICENSE from ..statistics import stats_wrapper from ._testing_data import \ dataset1, dataset2 def test_wrapper(): run_wrapper = stats_wrapper(dataset1, dataset2) <commit_msg>Split wrapper tests into smaller chunks<commit_after># Licensed unde...
f798066d20116d2cfd35cae0bf0771799677f6c2
py509/bin/verify.py
py509/bin/verify.py
#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): trust_store = [] with open(certifi.where()...
#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): parser = argparse.ArgumentParser(description...
Allow --ca parameter to specify trust store
Allow --ca parameter to specify trust store
Python
apache-2.0
sholsapp/py509
#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): trust_store = [] with open(certifi.where()...
#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): parser = argparse.ArgumentParser(description...
<commit_before>#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): trust_store = [] with open(...
#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): parser = argparse.ArgumentParser(description...
#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): trust_store = [] with open(certifi.where()...
<commit_before>#!/usr/bin/env python """Verify a certificate.""" import argparse import logging import sys import certifi from OpenSSL import crypto from py509.x509 import load_x509_certificates logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def main(): trust_store = [] with open(...
3131f282d6ad1a703939c91c0d7dc0b3e4e54046
iati/versions.py
iati/versions.py
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number.""" if...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. Args...
Document the current state of the Version class.
Document the current state of the Version class.
Python
mit
IATI/iati.core,IATI/iati.core
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number.""" if...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. Args...
<commit_before>"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number. Args...
"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number.""" if...
<commit_before>"""A module containing components that describe the IATI Standard itself (rather than the parts it is made up of).""" import iati.constants class Version(object): """Representation of an IATI Standard Version Number.""" def __init__(self, version_string): """Initialise a Version Number...
ff336e34ab2996c0e01378945b10e4f3bc870a2e
simplekv/_compat.py
simplekv/_compat.py
# -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY3 = sys.version_info[0] == 3 if PY3: import configparser as ConfigParser else: import ConfigParser if PY3: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if PY3: from urll...
# -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: import configparser as ConfigParser else: import ConfigParser if not PY2: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if not PY2: ...
Use PY2 check instead of PY3 check.
Use PY2 check instead of PY3 check. See http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/ for details.
Python
mit
fmarczin/simplekv,fmarczin/simplekv,karteek/simplekv,mbr/simplekv,karteek/simplekv,mbr/simplekv
# -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY3 = sys.version_info[0] == 3 if PY3: import configparser as ConfigParser else: import ConfigParser if PY3: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if PY3: from urll...
# -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: import configparser as ConfigParser else: import ConfigParser if not PY2: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if not PY2: ...
<commit_before># -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY3 = sys.version_info[0] == 3 if PY3: import configparser as ConfigParser else: import ConfigParser if PY3: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if PY3...
# -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: import configparser as ConfigParser else: import ConfigParser if not PY2: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if not PY2: ...
# -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY3 = sys.version_info[0] == 3 if PY3: import configparser as ConfigParser else: import ConfigParser if PY3: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if PY3: from urll...
<commit_before># -*- coding: utf-8 -*- """Helpers for python 2/3 compatibility""" import sys PY3 = sys.version_info[0] == 3 if PY3: import configparser as ConfigParser else: import ConfigParser if PY3: from urllib.parse import quote as url_quote else: from urllib import quote as url_quote if PY3...
eeb284b86e4f6bf535afe0bb7bb009344ff7ec0f
simplekv/_compat.py
simplekv/_compat.py
"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import quote_plus, unq...
"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import quote_plus, unq...
Use basestring to check for key validity in Python 2
Use basestring to check for key validity in Python 2
Python
mit
karteek/simplekv,karteek/simplekv
"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import quote_plus, unq...
"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import quote_plus, unq...
<commit_before>"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import ...
"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import quote_plus, unq...
"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import quote_plus, unq...
<commit_before>"""Helpers for python 2/3 compatibility""" import sys PY2 = sys.version_info[0] == 2 if not PY2: from configparser import ConfigParser else: from ConfigParser import ConfigParser if not PY2: from urllib.parse import quote as url_quote, unquote as url_unquote from urllib.parse import ...
a96ed550bd0c67b7a9ec0b9f636f71c530441e5f
graphene/types/abstracttype.py
graphene/types/abstracttype.py
from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instead.\n" ...
from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instead.\n" ...
Fix deprecations url in DeprecationWarning message.
Fix deprecations url in DeprecationWarning message.
Python
mit
graphql-python/graphene,graphql-python/graphene
from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instead.\n" ...
from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instead.\n" ...
<commit_before>from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instea...
from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instead.\n" ...
from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instead.\n" ...
<commit_before>from ..utils.subclass_with_meta import SubclassWithMeta from ..utils.deprecated import warn_deprecation class AbstractType(SubclassWithMeta): def __init_subclass__(cls, *args, **kwargs): warn_deprecation( "Abstract type is deprecated, please use normal object inheritance instea...
ec176eaf054a9bad83573cc8942b9de402e02143
syncplayServer.py
syncplayServer.py
#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(args.port, SyncFactory(args.password, args.isolate_rooms)) r...
#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(int(args.port), SyncFactory(args.password, args.isolate_room...
Fix on choosing ports for server
Fix on choosing ports for server
Python
apache-2.0
NeverDecaf/syncplay,NeverDecaf/syncplay,alby128/syncplay,alby128/syncplay,Syncplay/syncplay,Syncplay/syncplay
#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(args.port, SyncFactory(args.password, args.isolate_rooms)) r...
#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(int(args.port), SyncFactory(args.password, args.isolate_room...
<commit_before>#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(args.port, SyncFactory(args.password, args.is...
#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(int(args.port), SyncFactory(args.password, args.isolate_room...
#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(args.port, SyncFactory(args.password, args.isolate_rooms)) r...
<commit_before>#coding:utf8 from twisted.internet import reactor from syncplay.server import SyncFactory from syncplay.ui.ConfigurationGetter import ServerConfigurationGetter argsGetter = ServerConfigurationGetter() args = argsGetter.getConfiguration() reactor.listenTCP(args.port, SyncFactory(args.password, args.is...
6654c3741f314e6617d53de6468f739b4304c5eb
tequila/deploy.py
tequila/deploy.py
import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila roles were expected...
import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila roles were expected...
Add support for encrypted secrets
Add support for encrypted secrets
Python
bsd-3-clause
caktus/tequila-django
import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila roles were expected...
import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila roles were expected...
<commit_before>import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila role...
import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila roles were expected...
import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila roles were expected...
<commit_before>import argparse import os from subprocess import check_call import tequila def main(): tequila_dir = os.path.dirname(tequila.__file__) tequila_roles_dir = os.path.join(tequila_dir, 'roles') if not os.path.exists(tequila_roles_dir): raise Exception("Something is wrong, tequila role...
666a21cb17e65b7c3d6911fa1916029cedfd55e4
timmy/env.py
timmy/env.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
Bump version to test Travis pip publishing
Bump version to test Travis pip publishing
Python
apache-2.0
adobdin/timmy,adobdin/timmy
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
<commit_before>#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
<commit_before>#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
ea90ef7193aa779bf6286ef59dc42229ed23c953
csat/collectors/pygit/__init__.py
csat/collectors/pygit/__init__.py
from csat.acquisition import base __version__ = '0.1.0' class GitPythonCollector(base.FactoryBase): name = 'Git + Python dependencies analyzer' key = 'pygit' version = __version__ def build_parser(self, base): parser = super(GitPythonCollector, self).build_parser(base) parser.add_a...
try: import git except ImportError: import warnings with warnings.catch_warnings(): warnings.simplefilter('always') warnings.warn('No git module found, the pygit collector will not be ' 'available', ImportWarning) git = None from csat.acquisition import base __ve...
Disable collector and only produce a warning if the git module is not installed
Disable collector and only produce a warning if the git module is not installed
Python
mit
GaretJax/csat,GaretJax/csat,GaretJax/csat,GaretJax/csat
from csat.acquisition import base __version__ = '0.1.0' class GitPythonCollector(base.FactoryBase): name = 'Git + Python dependencies analyzer' key = 'pygit' version = __version__ def build_parser(self, base): parser = super(GitPythonCollector, self).build_parser(base) parser.add_a...
try: import git except ImportError: import warnings with warnings.catch_warnings(): warnings.simplefilter('always') warnings.warn('No git module found, the pygit collector will not be ' 'available', ImportWarning) git = None from csat.acquisition import base __ve...
<commit_before>from csat.acquisition import base __version__ = '0.1.0' class GitPythonCollector(base.FactoryBase): name = 'Git + Python dependencies analyzer' key = 'pygit' version = __version__ def build_parser(self, base): parser = super(GitPythonCollector, self).build_parser(base) ...
try: import git except ImportError: import warnings with warnings.catch_warnings(): warnings.simplefilter('always') warnings.warn('No git module found, the pygit collector will not be ' 'available', ImportWarning) git = None from csat.acquisition import base __ve...
from csat.acquisition import base __version__ = '0.1.0' class GitPythonCollector(base.FactoryBase): name = 'Git + Python dependencies analyzer' key = 'pygit' version = __version__ def build_parser(self, base): parser = super(GitPythonCollector, self).build_parser(base) parser.add_a...
<commit_before>from csat.acquisition import base __version__ = '0.1.0' class GitPythonCollector(base.FactoryBase): name = 'Git + Python dependencies analyzer' key = 'pygit' version = __version__ def build_parser(self, base): parser = super(GitPythonCollector, self).build_parser(base) ...
4a2b7b775d65aa95f160e1b1f16b7101fbd1e949
jellyblog/models.py
jellyblog/models.py
from django.db import models class Category(models.Model): category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class Document(models.Model): document_id = models.AutoField(primary_key=True) category_id = models.For...
import datetime from django.db import models from django.utils import timezone class Category(models.Model): def __str__(self): return self.category_name category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class...
Document 모델의 category 칼럼명 수정
Document 모델의 category 칼럼명 수정
Python
apache-2.0
kyunooh/JellyBlog,kyunooh/JellyBlog,kyunooh/JellyBlog
from django.db import models class Category(models.Model): category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class Document(models.Model): document_id = models.AutoField(primary_key=True) category_id = models.For...
import datetime from django.db import models from django.utils import timezone class Category(models.Model): def __str__(self): return self.category_name category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class...
<commit_before>from django.db import models class Category(models.Model): category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class Document(models.Model): document_id = models.AutoField(primary_key=True) category_...
import datetime from django.db import models from django.utils import timezone class Category(models.Model): def __str__(self): return self.category_name category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class...
from django.db import models class Category(models.Model): category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class Document(models.Model): document_id = models.AutoField(primary_key=True) category_id = models.For...
<commit_before>from django.db import models class Category(models.Model): category_id = models.AutoField(primary_key=True) category_parent_id = models.IntegerField(null=True) category_name = models.CharField(max_length=20) class Document(models.Model): document_id = models.AutoField(primary_key=True) category_...
98dce0d4c7eb62edb599aafeb97e2291c01e4dc8
tests/serial_0.py
tests/serial_0.py
#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def convert(hexVal): ...
#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def convert(hexVal): ...
Complete the data print interface.
Complete the data print interface.
Python
mit
EchoFUN/raspi
#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def convert(hexVal): ...
#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def convert(hexVal): ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def con...
#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def convert(hexVal): ...
#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def convert(hexVal): ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -* # # @author XU Kai([email protected]) # @date 2016-12-04 星期日 # # # #fileOverview 树莓派串口操作事件,用来输入和输出陀螺仪数据信息 # # # import os import sys import math import codecs import serial sensor = serial.Serial(port='/dev/ttyAMA0', baudrate='9600', timeout=1) def con...
9753fe661ee59640363cd8e65c834204c1d4849c
ktbs_bench/utils/decorators.py
ktbs_bench/utils/decorators.py
from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop() res...
from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop() res...
Fix bench decorator to return a dict instead of a list
Fix bench decorator to return a dict instead of a list
Python
mit
ktbs/ktbs-bench,ktbs/ktbs-bench
from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop() res...
from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop() res...
<commit_before>from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop...
from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop() res...
from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop() res...
<commit_before>from functools import wraps from inspect import getcallargs from timer import Timer def bench(f): """Times a function given specific arguments.""" timer = Timer(tick_now=False) @wraps(f) def wrapped(*args, **kwargs): timer.start() f(*args, **kwargs) timer.stop...
b344d63ad3ff7abff0772a744e951d5d5c8438f3
carepoint/models/address_mixin.py
carepoint/models/address_mixin.py
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ) class AddressMixin(object): """ This is a mixin for Address Many2Many bin...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ForeignKey ) class AddressMixin(object): """ This i...
Add ForeignKey on addr_id in carepoint cph address model
Add ForeignKey on addr_id in carepoint cph address model
Python
mit
laslabs/Python-Carepoint
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ) class AddressMixin(object): """ This is a mixin for Address Many2Many bin...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ForeignKey ) class AddressMixin(object): """ This i...
<commit_before># -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ) class AddressMixin(object): """ This is a mixin for Addres...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ForeignKey ) class AddressMixin(object): """ This i...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ) class AddressMixin(object): """ This is a mixin for Address Many2Many bin...
<commit_before># -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from sqlalchemy import (Column, Integer, DateTime, ) class AddressMixin(object): """ This is a mixin for Addres...
4a07f271db4d1aa0b375914093479b3157c4496b
scheduler/listen.py
scheduler/listen.py
import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.openstack.org', ...
import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.openstack.org', ...
Make is so we run performance against merged patches
Make is so we run performance against merged patches
Python
apache-2.0
lbragstad/keystone-performance,lbragstad/keystone-performance,lbragstad/keystone-performance
import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.openstack.org', ...
import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.openstack.org', ...
<commit_before>import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.o...
import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.openstack.org', ...
import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.openstack.org', ...
<commit_before>import ConfigParser import json import time from pygerrit import client from pygerrit import events class Listener(object): def __init__(self, gerrit_user): self.gerrit_user = gerrit_user def start_listening(self): self.gerrit = client.GerritClient( host='review.o...
3cd07d2e1ee88d131066878bc21d8046b665b587
indico/core/signals/category.py
indico/core/signals/category.py
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', """ Called when ...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', """ Called when ...
Fix typo in signal name
Fix typo in signal name
Python
mit
indico/indico,DirkHoffmann/indico,indico/indico,indico/indico,pferreir/indico,DirkHoffmann/indico,indico/indico,DirkHoffmann/indico,DirkHoffmann/indico,pferreir/indico,pferreir/indico,pferreir/indico,ThiefMaster/indico,ThiefMaster/indico,ThiefMaster/indico,ThiefMaster/indico
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', """ Called when ...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', """ Called when ...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', "...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', """ Called when ...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', """ Called when ...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from blinker import Namespace _signals = Namespace() moved = _signals.signal('moved', "...
6959458a8de9d0536ae859fca2a7fa62bb4bf169
greatbigcrane/project/forms.py
greatbigcrane/project/forms.py
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
Add a crappy form that will hopefully inspire me to write something else. Tired of staring into space.
Add a crappy form that will hopefully inspire me to write something else. Tired of staring into space.
Python
apache-2.0
pnomolos/greatbigcrane,pnomolos/greatbigcrane
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
<commit_before>""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm 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 applica...
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
<commit_before>""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm 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 applica...
d565aa0b3fa3239c3ed699c9d37f30b910d15a05
lbrynet/__init__.py
lbrynet/__init__.py
import logging __version__ = "0.21.0rc9" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
import logging __version__ = "0.21.0rc10" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
Bump version 0.21.0rc9 --> 0.21.0rc10
Bump version 0.21.0rc9 --> 0.21.0rc10 Signed-off-by: Jack Robison <[email protected]>
Python
mit
lbryio/lbry,lbryio/lbry,lbryio/lbry
import logging __version__ = "0.21.0rc9" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) Bump version 0.21.0rc9 --> 0.21.0rc10 Signed-off-by: Jack Robison <[email protected]>
import logging __version__ = "0.21.0rc10" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
<commit_before>import logging __version__ = "0.21.0rc9" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Bump version 0.21.0rc9 --> 0.21.0rc10 Signed-off-by: Jack Robison <[email protected]><commit_after>
import logging __version__ = "0.21.0rc10" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
import logging __version__ = "0.21.0rc9" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) Bump version 0.21.0rc9 --> 0.21.0rc10 Signed-off-by: Jack Robison <[email protected]>import logging __version__ = "0.21.0rc10" version = tuple...
<commit_before>import logging __version__ = "0.21.0rc9" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Bump version 0.21.0rc9 --> 0.21.0rc10 Signed-off-by: Jack Robison <[email protected]><commit_after>import logging _...
42320a1baa7b4e69170b881090e17a25080bf45c
lib/assemblers/none.py
lib/assemblers/none.py
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_c...
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_c...
Change file name for output for no assembler given
Change file name for output for no assembler given
Python
bsd-3-clause
juliema/aTRAM
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_c...
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_c...
<commit_before>"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__in...
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_c...
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_c...
<commit_before>"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__in...
daceec30fc422ea035163e80c826423a806d0b85
django/wwwhisper_auth/backend.py
django/wwwhisper_auth/backend.py
"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully.""" pass clas...
"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully.""" pass clas...
Correct check if assertion verification failed.
Correct check if assertion verification failed.
Python
mit
wrr/wwwhisper,wrr/wwwhisper,wrr/wwwhisper,wrr/wwwhisper
"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully.""" pass clas...
"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully.""" pass clas...
<commit_before>"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully."""...
"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully.""" pass clas...
"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully.""" pass clas...
<commit_before>"""Authentication backend used by wwwhisper_auth.""" from django.contrib.auth.backends import ModelBackend from django_browserid.base import verify from wwwhisper_auth import models class AssertionVerificationException(Exception): """Raised when BrowserId assertion was not verified successfully."""...
aee0c96593343b3b1064d38579bec666bd51c9fa
python/atemctrl.py
python/atemctrl.py
# Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while run_cmd == 1: ...
# Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while run_cmd == 1: ...
Fix script ending. Set value to show program in aux output.
Fix script ending. Set value to show program in aux output.
Python
mit
qrila/khvidcontrol,qrila/khvidcontrol
# Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while run_cmd == 1: ...
# Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while run_cmd == 1: ...
<commit_before># Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while...
# Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while run_cmd == 1: ...
# Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while run_cmd == 1: ...
<commit_before># Input format: # python atemctrl.py <ip> <program input> <preview input> import sys import time import ATEM def main(argv): run_cmd = 1 atem_ip = argv[0].split(".") ATEM.begin(int(atem_ip[0]), int(atem_ip[1]), int(atem_ip[2]), int(atem_ip[3])) time_set = time.time() + 0.500 while...
3c0d52aa0a936b3ae138ddfba66e7ba9dcc5f934
sympy/plotting/proxy_pyglet.py
sympy/plotting/proxy_pyglet.py
from warnings import warn from sympy.core.compatibility import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change in future versi...
from warnings import warn from sympy.utilities.exceptions import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change in future ver...
Change the import location of DeprecationWarning used by plotting module
Change the import location of DeprecationWarning used by plotting module The SympyDeprecationWarning was moved from its original location. The change was done in the master branch. The same change must be mirrored in this development branch.
Python
bsd-3-clause
pbrady/sympy,grevutiu-gabriel/sympy,rahuldan/sympy,atsao72/sympy,kmacinnis/sympy,yashsharan/sympy,drufat/sympy,iamutkarshtiwari/sympy,shikil/sympy,atsao72/sympy,jaimahajan1997/sympy,meghana1995/sympy,jerli/sympy,oliverlee/sympy,ahhda/sympy,garvitr/sympy,sahmed95/sympy,abloomston/sympy,kaushik94/sympy,jbbskinny/sympy,cs...
from warnings import warn from sympy.core.compatibility import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change in future versi...
from warnings import warn from sympy.utilities.exceptions import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change in future ver...
<commit_before>from warnings import warn from sympy.core.compatibility import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change ...
from warnings import warn from sympy.utilities.exceptions import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change in future ver...
from warnings import warn from sympy.core.compatibility import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change in future versi...
<commit_before>from warnings import warn from sympy.core.compatibility import SymPyDeprecationWarning from pygletplot import PygletPlot def Plot(*args, **kwargs): """ A temporary proxy for an interface under deprecation. This proxy is the one imported by `from sympy import *`. The Plot class will change ...
e507abe78dee3ae4a4261d8bde645f3df7d8b842
tests/atest/run_tests.py
tests/atest/run_tests.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from robot import run_cli run_cli(sys.argv[1:] + [os.path.dirname(__file__)])
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from pathlib import Path from robot import run_cli if __name__ == '__main__': curdir = Path(__file__).parent srcdir = curdir / '..' / '..' / 'src' run_cli(sys.argv[1:] + ['-P', srcdir.resolve(), curdir])
Fix test runner for acceptance tests
Fix test runner for acceptance tests
Python
mit
Eficode/robotframework-imagehorizonlibrary
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from robot import run_cli run_cli(sys.argv[1:] + [os.path.dirname(__file__)]) Fix test runner for acceptance tests
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from pathlib import Path from robot import run_cli if __name__ == '__main__': curdir = Path(__file__).parent srcdir = curdir / '..' / '..' / 'src' run_cli(sys.argv[1:] + ['-P', srcdir.resolve(), curdir])
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from robot import run_cli run_cli(sys.argv[1:] + [os.path.dirname(__file__)]) <commit_msg>Fix test runner for acceptance tests<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from pathlib import Path from robot import run_cli if __name__ == '__main__': curdir = Path(__file__).parent srcdir = curdir / '..' / '..' / 'src' run_cli(sys.argv[1:] + ['-P', srcdir.resolve(), curdir])
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from robot import run_cli run_cli(sys.argv[1:] + [os.path.dirname(__file__)]) Fix test runner for acceptance tests#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from pathlib import Path from robot import run_cli if __name__ =...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from robot import run_cli run_cli(sys.argv[1:] + [os.path.dirname(__file__)]) <commit_msg>Fix test runner for acceptance tests<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os from pathlib import Path ...
b8421633753fae1c0ad849dcc496e1861833243f
memegen/routes/root.py
memegen/routes/root.py
from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @blueprint.route(...
from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @blueprint.route(...
Move version to the bottom of the list
Move version to the bottom of the list
Python
mit
DanLindeman/memegen,joshfriend/memegen,joshfriend/memegen,DanLindeman/memegen,joshfriend/memegen,DanLindeman/memegen,joshfriend/memegen,DanLindeman/memegen
from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @blueprint.route(...
from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @blueprint.route(...
<commit_before>from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @b...
from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @blueprint.route(...
from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @blueprint.route(...
<commit_before>from collections import OrderedDict from flask import Blueprint, current_app, render_template, Response from .. import __version__ from ._common import GITHUB_BASE, CONTRIBUTING, url_for blueprint = Blueprint('root', __name__, url_prefix="/", template_folder="../templates") @b...
6a79b7801184148dd1b329a5c41af1ae0fc3b4b9
docs/conf.py
docs/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full version, including...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..', relative_to=__file__) # The f...
Fix version detection for tests
Fix version detection for tests
Python
mit
jaraco/tempora
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full version, including...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..', relative_to=__file__) # The f...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full ver...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..', relative_to=__file__) # The f...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full version, including...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.timing' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full ver...
b9d8ac45f9cfec1fd1c3a3b0831815026e448a24
members/views.py
members/views.py
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): memb...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User from protocols.models import Protocol def homepage(request): return render(request, "index.html", {}) @json_vi...
Add view function for councili arhive
Add view function for councili arhive
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): memb...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User from protocols.models import Protocol def homepage(request): return render(request, "index.html", {}) @json_vi...
<commit_before># -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, ...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User from protocols.models import Protocol def homepage(request): return render(request, "index.html", {}) @json_vi...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): memb...
<commit_before># -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import auth from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, ...
ae4af32bf5ca21b2c7d80e2034560ed23f6a2ea7
src/main-rpython.py
src/main-rpython.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os # __________ Entry points __________ def entry_point(argv): try: main(argv...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os try: import rpython.rlib except ImportError: print("Failed to load RPython library...
Add error to make sure we have RPython when using the RPython main
Add error to make sure we have RPython when using the RPython main Signed-off-by: Stefan Marr <[email protected]>
Python
mit
SOM-st/RPySOM,smarr/PySOM,smarr/PySOM,SOM-st/PySOM,SOM-st/RPySOM,SOM-st/PySOM
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os # __________ Entry points __________ def entry_point(argv): try: main(argv...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os try: import rpython.rlib except ImportError: print("Failed to load RPython library...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os # __________ Entry points __________ def entry_point(argv): try: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os try: import rpython.rlib except ImportError: print("Failed to load RPython library...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os # __________ Entry points __________ def entry_point(argv): try: main(argv...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from som.compiler.parse_error import ParseError from som.interp_type import is_ast_interpreter, is_bytecode_interpreter from som.vm.universe import main, Exit import os # __________ Entry points __________ def entry_point(argv): try: ...
86d6b1cb8655d1734bcd5e5987e9e3df7e69c534
mkt/operators/views.py
mkt/operators/views.py
from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import RestOAuthAuthentication from mkt.developers.models import PreloadTestPlan from mkt...
from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import (RestOAuthAuthentication, RestSharedSecretAuth...
Allow shared secret auth on OperatorPermissionViewSet.
Allow shared secret auth on OperatorPermissionViewSet.
Python
bsd-3-clause
clouserw/zamboni,mozilla/zamboni,mudithkr/zamboni,mstriemer/zamboni,mozilla/zamboni,washort/zamboni,ayushagrawal288/zamboni,Jobava/zamboni,Jobava/zamboni,ayushagrawal288/zamboni,elysium001/zamboni,ingenioustechie/zamboni,eviljeff/zamboni,washort/zamboni,ddurst/zamboni,elysium001/zamboni,eviljeff/zamboni,tsl143/zamboni,...
from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import RestOAuthAuthentication from mkt.developers.models import PreloadTestPlan from mkt...
from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import (RestOAuthAuthentication, RestSharedSecretAuth...
<commit_before>from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import RestOAuthAuthentication from mkt.developers.models import PreloadTe...
from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import (RestOAuthAuthentication, RestSharedSecretAuth...
from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import RestOAuthAuthentication from mkt.developers.models import PreloadTestPlan from mkt...
<commit_before>from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import RestOAuthAuthentication from mkt.developers.models import PreloadTe...
e56fe4e39db2a6043493542664d320c6127d4741
ecmd-core/pyapi/init/__init__.py
ecmd-core/pyapi/init/__init__.py
# import the right SWIG module depending on Python version from sys import version_info import sys, os if version_info[0] >= 3: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python3")) from .python3 import * else: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python2")) from ...
# import the right SWIG module depending on Python version from sys import version_info from sys import path as sys_path from os import path as os_path if version_info[0] >= 3: sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3")) from .python3 import * else: sys_path.insert(0, os_path.join...
Rework of path insert since del line was causing issues
Rework of path insert since del line was causing issues
Python
apache-2.0
open-power/eCMD,open-power/eCMD,mklight/eCMD,mklight/eCMD,open-power/eCMD,open-power/eCMD,mklight/eCMD,open-power/eCMD,mklight/eCMD,mklight/eCMD
# import the right SWIG module depending on Python version from sys import version_info import sys, os if version_info[0] >= 3: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python3")) from .python3 import * else: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python2")) from ...
# import the right SWIG module depending on Python version from sys import version_info from sys import path as sys_path from os import path as os_path if version_info[0] >= 3: sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3")) from .python3 import * else: sys_path.insert(0, os_path.join...
<commit_before># import the right SWIG module depending on Python version from sys import version_info import sys, os if version_info[0] >= 3: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python3")) from .python3 import * else: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "pytho...
# import the right SWIG module depending on Python version from sys import version_info from sys import path as sys_path from os import path as os_path if version_info[0] >= 3: sys_path.insert(0, os_path.join(os_path.dirname(__file__), "python3")) from .python3 import * else: sys_path.insert(0, os_path.join...
# import the right SWIG module depending on Python version from sys import version_info import sys, os if version_info[0] >= 3: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python3")) from .python3 import * else: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python2")) from ...
<commit_before># import the right SWIG module depending on Python version from sys import version_info import sys, os if version_info[0] >= 3: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python3")) from .python3 import * else: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "pytho...
c04103b457040355da9dcf6a1059539bf6470092
mutt-addressbook.py
mutt-addressbook.py
#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPDIRS: wi...
#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPDIRS: wi...
Rework string concatenation with join and format
Rework string concatenation with join and format Signed-off-by: Alwed <[email protected]>
Python
isc
qsuscs/mutt-addressbook
#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPDIRS: wi...
#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPDIRS: wi...
<commit_before>#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPD...
#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPDIRS: wi...
#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPDIRS: wi...
<commit_before>#!/usr/bin/env python3 try: from sys import argv import ldap3 LDAPDIRS = [ ('ldaps://ldappv.rwth-aachen.de', 'ou=People,dc=rwth-aachen,dc=de') ] FILTER = '(mail=*)' ATTRS = ['cn', 'mail'] print('Searching … ', end='', flush=True) entries = [] for d in LDAPD...
89a8cc53f2ad373eb8ff0508dbb5f111e6ee2b6e
nashvegas/models.py
nashvegas/models.py
from django.db import models from django.utils import timezone class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=timezone.now) content = models.TextField() scm_version = models.CharField(max_length=50, null=True, blank=Tr...
from django.db import models try: from django.utils.timezone import now except ImportError: from datetime.datetime import now class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=now) content = models.TextField() sc...
Fix import error for Django 1.3.1
Fix import error for Django 1.3.1
Python
mit
paltman-archive/nashvegas,jonathanchu/nashvegas,iivvoo/nashvegas,dcramer/nashvegas,paltman/nashvegas
from django.db import models from django.utils import timezone class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=timezone.now) content = models.TextField() scm_version = models.CharField(max_length=50, null=True, blank=Tr...
from django.db import models try: from django.utils.timezone import now except ImportError: from datetime.datetime import now class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=now) content = models.TextField() sc...
<commit_before>from django.db import models from django.utils import timezone class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=timezone.now) content = models.TextField() scm_version = models.CharField(max_length=50, null...
from django.db import models try: from django.utils.timezone import now except ImportError: from datetime.datetime import now class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=now) content = models.TextField() sc...
from django.db import models from django.utils import timezone class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=timezone.now) content = models.TextField() scm_version = models.CharField(max_length=50, null=True, blank=Tr...
<commit_before>from django.db import models from django.utils import timezone class Migration(models.Model): migration_label = models.CharField(max_length=200) date_created = models.DateTimeField(default=timezone.now) content = models.TextField() scm_version = models.CharField(max_length=50, null...
292b4843fdb0efbf3cc8d7c97aaa8abd2cd22a28
optimization/simple.py
optimization/simple.py
#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) m.setObjective(x1 + 2*x2, GRB.MAXIMIZE)...
#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) #m.setObjective(x1 + 2*x2, GRB.MAXIMIZE...
Use sum function to construct objective function.
Use sum function to construct objective function.
Python
apache-2.0
MiddelkoopT/CompOpt-2014-Fall,MiddelkoopT/CompOpt-2014-Fall
#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) m.setObjective(x1 + 2*x2, GRB.MAXIMIZE)...
#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) #m.setObjective(x1 + 2*x2, GRB.MAXIMIZE...
<commit_before>#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) m.setObjective(x1 + 2*x2...
#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) #m.setObjective(x1 + 2*x2, GRB.MAXIMIZE...
#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) m.setObjective(x1 + 2*x2, GRB.MAXIMIZE)...
<commit_before>#!/usr/bin/python3 """ Maximize 1 x1 + 2 x2 Subject To C1: x1 + x2 <= 40 Nickel: 2 x1 + 1 x2 <= 60 Bounds x1 >= 0 x2 >= 0 End """ from gurobipy import * m = Model("simple") x1 = m.addVar(name="x1") x2 = m.addVar(name="x2") m.update() print("x1:%s x2:%s" % (x1,x2)) m.setObjective(x1 + 2*x2...
432a7f72c790ca7ba18f4d575706461e337da593
src/hunter/const.py
src/hunter/const.py
import os import site import stat import sys from distutils.sysconfig import get_python_lib SITE_PACKAGES_PATHS = set() if hasattr(site, 'getsitepackages'): SITE_PACKAGES_PATHS.update(site.getsitepackages()) if hasattr(site, 'getusersitepackages'): SITE_PACKAGES_PATHS.add(site.getusersitepackages()) SITE_PACKA...
import os import site import stat import sys import sysconfig SITE_PACKAGES_PATHS = set() for scheme in sysconfig.get_scheme_names(): for name in ['platlib', 'purelib']: try: SITE_PACKAGES_PATHS.add(sysconfig.get_path(name, scheme)) except KeyError: pass if hasattr(site, 'ge...
Use new method to get package paths that works without deprecations on Python 3.10
Use new method to get package paths that works without deprecations on Python 3.10
Python
bsd-2-clause
ionelmc/python-hunter
import os import site import stat import sys from distutils.sysconfig import get_python_lib SITE_PACKAGES_PATHS = set() if hasattr(site, 'getsitepackages'): SITE_PACKAGES_PATHS.update(site.getsitepackages()) if hasattr(site, 'getusersitepackages'): SITE_PACKAGES_PATHS.add(site.getusersitepackages()) SITE_PACKA...
import os import site import stat import sys import sysconfig SITE_PACKAGES_PATHS = set() for scheme in sysconfig.get_scheme_names(): for name in ['platlib', 'purelib']: try: SITE_PACKAGES_PATHS.add(sysconfig.get_path(name, scheme)) except KeyError: pass if hasattr(site, 'ge...
<commit_before>import os import site import stat import sys from distutils.sysconfig import get_python_lib SITE_PACKAGES_PATHS = set() if hasattr(site, 'getsitepackages'): SITE_PACKAGES_PATHS.update(site.getsitepackages()) if hasattr(site, 'getusersitepackages'): SITE_PACKAGES_PATHS.add(site.getusersitepackage...
import os import site import stat import sys import sysconfig SITE_PACKAGES_PATHS = set() for scheme in sysconfig.get_scheme_names(): for name in ['platlib', 'purelib']: try: SITE_PACKAGES_PATHS.add(sysconfig.get_path(name, scheme)) except KeyError: pass if hasattr(site, 'ge...
import os import site import stat import sys from distutils.sysconfig import get_python_lib SITE_PACKAGES_PATHS = set() if hasattr(site, 'getsitepackages'): SITE_PACKAGES_PATHS.update(site.getsitepackages()) if hasattr(site, 'getusersitepackages'): SITE_PACKAGES_PATHS.add(site.getusersitepackages()) SITE_PACKA...
<commit_before>import os import site import stat import sys from distutils.sysconfig import get_python_lib SITE_PACKAGES_PATHS = set() if hasattr(site, 'getsitepackages'): SITE_PACKAGES_PATHS.update(site.getsitepackages()) if hasattr(site, 'getusersitepackages'): SITE_PACKAGES_PATHS.add(site.getusersitepackage...
88734c5aaf3bdddd1e41beff3bdb70b27590490c
projects/urls.py
projects/urls.py
from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), )
from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), url(r'^archive/$', 'p...
Add url leading to the archive page
Add url leading to the archive page
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), ) Add url leading to the ...
from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), url(r'^archive/$', 'p...
<commit_before>from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), ) <commit_...
from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), url(r'^archive/$', 'p...
from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), ) Add url leading to the ...
<commit_before>from django.conf.urls import patterns, url urlpatterns = patterns('projects.views', url(r'^add/$', 'add_project', name='add_project'), url(r'^edit/(?P<project_id>.*)/$', 'edit_project', name='edit_project'), url(r'^status/(?P<project_id>.*)/$', 'edit_status', name='edit_status'), ) <commit_...
7a735bebf195f766a0db97b3fba6793a69a5731a
microcosm_elasticsearch/main.py
microcosm_elasticsearch/main.py
""" CLI entry point hook. """ from argparse import ArgumentParser def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", action="append") parser.add_argument("-D", "--drop"...
""" CLI entry point hook. """ from argparse import ArgumentParser from json import dump, loads from sys import stdout def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", act...
Add a query entry point
Add a query entry point
Python
apache-2.0
globality-corp/microcosm-elasticsearch,globality-corp/microcosm-elasticsearch
""" CLI entry point hook. """ from argparse import ArgumentParser def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", action="append") parser.add_argument("-D", "--drop"...
""" CLI entry point hook. """ from argparse import ArgumentParser from json import dump, loads from sys import stdout def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", act...
<commit_before>""" CLI entry point hook. """ from argparse import ArgumentParser def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", action="append") parser.add_argument...
""" CLI entry point hook. """ from argparse import ArgumentParser from json import dump, loads from sys import stdout def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", act...
""" CLI entry point hook. """ from argparse import ArgumentParser def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", action="append") parser.add_argument("-D", "--drop"...
<commit_before>""" CLI entry point hook. """ from argparse import ArgumentParser def createall_main(graph): """ Initialize indexes and mappings. """ parser = ArgumentParser() parser.add_argument("--only", action="append") parser.add_argument("--skip", action="append") parser.add_argument...
9cf6e843eeb865eeaf90e4023bdccd1325e74535
test_rle.py
test_rle.py
import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compressed == np.array(...
import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compressed == np.array(...
Add test for RLE decompression
Add test for RLE decompression
Python
bsd-3-clause
ziotom78/polycomp
import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compressed == np.array(...
import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compressed == np.array(...
<commit_before>import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compress...
import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compressed == np.array(...
import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compressed == np.array(...
<commit_before>import pypolycomp import numpy as np def test_compression(): for cur_type in (np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64): compressed = pypolycomp.rle_compress(np.array([1, 1, 1, 2, 3], dtype=cur_type)) assert np.all(compress...
a5e5cef7793c0692e556fc8c09e03af8ad33566a
mne/datasets/sample/__init__.py
mne/datasets/sample/__init__.py
# Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If not set. The da...
# Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If not set. The da...
FIX : in handling of sample dataset
FIX : in handling of sample dataset
Python
bsd-3-clause
aestrivex/mne-python,agramfort/mne-python,leggitta/mne-python,yousrabk/mne-python,larsoner/mne-python,teonlamont/mne-python,antiface/mne-python,cjayb/mne-python,mne-tools/mne-python,kambysese/mne-python,lorenzo-desantis/mne-python,jmontoyam/mne-python,kingjr/mne-python,dimkal/mne-python,agramfort/mne-python,nicproulx/m...
# Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If not set. The da...
# Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If not set. The da...
<commit_before># Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If ...
# Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If not set. The da...
# Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If not set. The da...
<commit_before># Author: Alexandre Gramfort <[email protected]> # License: BSD Style. import os import os.path as op def data_path(path='.'): """Get path to local copy of Sample dataset Parameters ---------- dir : string Location of where to look for the sample dataset. If ...
bea9d879d648853c5bd4c54bfa0ec3af857c7887
ModuleInterface.py
ModuleInterface.py
class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = 1 def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass def shouldTrigger(self, me...
class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = ModuleAccessLevels.ANYONE def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass de...
Revert "[Core] Okay maybe this?"
Revert "[Core] Okay maybe this?" This reverts commit 1fda217b32310c0db4e3a5e5b337071eeee376d1.
Python
mit
HubbeKing/Hubbot_Twisted
class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = 1 def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass def shouldTrigger(self, me...
class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = ModuleAccessLevels.ANYONE def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass de...
<commit_before> class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = 1 def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass def shouldT...
class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = ModuleAccessLevels.ANYONE def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass de...
class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = 1 def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass def shouldTrigger(self, me...
<commit_before> class ModuleInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' accessLevel = 1 def __init__(self, bot): self.bot = bot self.onLoad() def onLoad(self): pass def onUnload(self): pass def shouldT...
8f247a0c4564af085bf6b3c9829d2892e818e565
tools/update_manifest.py
tools/update_manifest.py
#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['ErrorCode'] != 1:...
#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['ErrorCode'] != 1:...
Add a symlink to downloaded manifest.
Add a symlink to downloaded manifest.
Python
mit
zhirsch/destinykioskstatus,zhirsch/destinykioskstatus
#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['ErrorCode'] != 1:...
#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['ErrorCode'] != 1:...
<commit_before>#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['Er...
#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['ErrorCode'] != 1:...
#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['ErrorCode'] != 1:...
<commit_before>#!/usr/bin/python import json import os import sys import tempfile import urllib2 import zipfile # Get the manifest urls. req = urllib2.Request( "https://www.bungie.net//platform/Destiny/Manifest/", headers={'X-API-Key': sys.argv[1]}, ) resp = json.loads(urllib2.urlopen(req).read()) if resp['Er...
d6bb78235b8cec2ec65a4fb67641746565f77c20
normandy/selfrepair/tests/test_views.py
normandy/selfrepair/tests/test_views.py
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
Test that self-repair endpoint does not set cookies
Test that self-repair endpoint does not set cookies
Python
mpl-2.0
mozilla/normandy,Osmose/normandy,mozilla/normandy,Osmose/normandy,Osmose/normandy,mozilla/normandy,mozilla/normandy,Osmose/normandy
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
<commit_before>from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @p...
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
<commit_before>from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @p...
78915664179c4c2b3fc974fcf54cfe253689c154
zinnia/tests/__init__.py
zinnia/tests/__init__.py
"""Unit tests for Zinnia""" from zinnia.signals import disconnect_entry_signals from zinnia.signals import disconnect_discussion_signals disconnect_entry_signals() disconnect_discussion_signals()
"""Unit tests for Zinnia"""
Remove disconnection of the signals when loading the zinnia.tests modules for compatibility
Remove disconnection of the signals when loading the zinnia.tests modules for compatibility
Python
bsd-3-clause
petecummings/django-blog-zinnia,bywbilly/django-blog-zinnia,ghachey/django-blog-zinnia,extertioner/django-blog-zinnia,1844144/django-blog-zinnia,Fantomas42/django-blog-zinnia,1844144/django-blog-zinnia,aorzh/django-blog-zinnia,extertioner/django-blog-zinnia,marctc/django-blog-zinnia,Zopieux/django-blog-zinnia,Maplecrof...
"""Unit tests for Zinnia""" from zinnia.signals import disconnect_entry_signals from zinnia.signals import disconnect_discussion_signals disconnect_entry_signals() disconnect_discussion_signals() Remove disconnection of the signals when loading the zinnia.tests modules for compatibility
"""Unit tests for Zinnia"""
<commit_before>"""Unit tests for Zinnia""" from zinnia.signals import disconnect_entry_signals from zinnia.signals import disconnect_discussion_signals disconnect_entry_signals() disconnect_discussion_signals() <commit_msg>Remove disconnection of the signals when loading the zinnia.tests modules for compatibility<comm...
"""Unit tests for Zinnia"""
"""Unit tests for Zinnia""" from zinnia.signals import disconnect_entry_signals from zinnia.signals import disconnect_discussion_signals disconnect_entry_signals() disconnect_discussion_signals() Remove disconnection of the signals when loading the zinnia.tests modules for compatibility"""Unit tests for Zinnia"""
<commit_before>"""Unit tests for Zinnia""" from zinnia.signals import disconnect_entry_signals from zinnia.signals import disconnect_discussion_signals disconnect_entry_signals() disconnect_discussion_signals() <commit_msg>Remove disconnection of the signals when loading the zinnia.tests modules for compatibility<comm...
49d7f90ef4991bddea392ce1294bc952fc0e0b93
seaworthy/stream/_timeout.py
seaworthy/stream/_timeout.py
import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param timeout: ...
import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param timeout: ...
Add a comment about closing the stream
Add a comment about closing the stream
Python
bsd-3-clause
praekeltfoundation/seaworthy
import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param timeout: ...
import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param timeout: ...
<commit_before>import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param ...
import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param timeout: ...
import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param timeout: ...
<commit_before>import threading def stream_timeout(stream, timeout, timeout_msg=None): """ Iterate over items in a streaming response from the Docker client within a timeout. :param ~docker.types.daemon.CancellableStream stream: Stream from the Docker client to consume items from. :param ...
e4a7e8dea024a51036d66e2a357e83e7c085430e
opps/channels/tests/__init__.py
opps/channels/tests/__init__.py
# -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import *
# -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * from opps.channels.tests.test_forms import *
Add channel forms test in test case
Add channel forms test in test case
Python
mit
jeanmask/opps,opps/opps,jeanmask/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,williamroot/opps
# -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * Add channel forms test in test case
# -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * from opps.channels.tests.test_forms import *
<commit_before># -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * <commit_msg>Add channel forms test in test case<commit_after>
# -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * from opps.channels.tests.test_forms import *
# -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * Add channel forms test in test case# -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * from opps.channels.tests.test...
<commit_before># -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_models import * <commit_msg>Add channel forms test in test case<commit_after># -*- coding: utf-8 -*- from opps.channels.tests.test_context_processors import * from opps.channels.tests.test_mode...
c8efd29a8a47aa9c2612d9932dde704fe9b1cd6d
us_ignite/people/urls.py
us_ignite/people/urls.py
from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>\w{1,32})/$', 'profile_detail', name='profile_detail'), )
from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>[-\w]{1,32})/$', 'profile_detail', name='profile_detail'), )
Increase user ``Profile`` slug details.
Increase user ``Profile`` slug details. The slug in the user profile accept ``-`` as well.
Python
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>\w{1,32})/$', 'profile_detail', name='profile_detail'), ) Increase user ``Profile`` slug details. The slug in the user profile accept ``-`` as well.
from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>[-\w]{1,32})/$', 'profile_detail', name='profile_detail'), )
<commit_before>from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>\w{1,32})/$', 'profile_detail', name='profile_detail'), ) <commit_msg>Increase user ``Profile`` slug details. The slug in the user pr...
from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>[-\w]{1,32})/$', 'profile_detail', name='profile_detail'), )
from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>\w{1,32})/$', 'profile_detail', name='profile_detail'), ) Increase user ``Profile`` slug details. The slug in the user profile accept ``-`` as well....
<commit_before>from django.conf.urls import patterns, url urlpatterns = patterns( 'us_ignite.people.views', url(r'^$', 'profile_list', name='profile_list'), url(r'^(?P<slug>\w{1,32})/$', 'profile_detail', name='profile_detail'), ) <commit_msg>Increase user ``Profile`` slug details. The slug in the user pr...
d8b9dec51e3d01fb662ed1bc779d06fe9f723cb5
openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py
openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py
""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps...
""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps...
Update this command for Django 1.8
Update this command for Django 1.8
Python
agpl-3.0
louyihua/edx-platform,itsjeyd/edx-platform,solashirai/edx-platform,alu042/edx-platform,procangroup/edx-platform,Edraak/edraak-platform,jjmiranda/edx-platform,raccoongang/edx-platform,TeachAtTUM/edx-platform,jolyonb/edx-platform,raccoongang/edx-platform,shabab12/edx-platform,hastexo/edx-platform,eduNEXT/edunext-platform...
""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps...
""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps...
<commit_before>""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx....
""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps...
""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps...
<commit_before>""" Command to load course overviews. """ import logging from optparse import make_option from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx....
bea572a086a9d8390a8e5fce5a275b889fa52338
pymetabiosis/test/test_numpy_convert.py
pymetabiosis/test/test_numpy_convert.py
from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): numpy = import_module("numpy") assert numpy.bool_(True) is True assert numpy.bool_(Fals...
import pytest from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): try: numpy = import_module("numpy") except ImportError: pytest...
Make sure numpy exists on the cpython side
Make sure numpy exists on the cpython side
Python
mit
prabhuramachandran/pymetabiosis,rguillebert/pymetabiosis
from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): numpy = import_module("numpy") assert numpy.bool_(True) is True assert numpy.bool_(Fals...
import pytest from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): try: numpy = import_module("numpy") except ImportError: pytest...
<commit_before>from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): numpy = import_module("numpy") assert numpy.bool_(True) is True assert n...
import pytest from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): try: numpy = import_module("numpy") except ImportError: pytest...
from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): numpy = import_module("numpy") assert numpy.bool_(True) is True assert numpy.bool_(Fals...
<commit_before>from pymetabiosis.module import import_module from pymetabiosis.numpy_convert import \ register_cpy_numpy_to_pypy_builtin_converters register_cpy_numpy_to_pypy_builtin_converters() def test_scalar_converter(): numpy = import_module("numpy") assert numpy.bool_(True) is True assert n...
68f50e83f4b06d3e45bfe1610d50d88e73bde8af
examples/load_table_from_url.py
examples/load_table_from_url.py
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks", "...
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import io import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_framewo...
Fix for python 2 compatibility
Fix for python 2 compatibility
Python
mit
thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks", "...
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import io import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_framewo...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_fra...
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import io import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_framewo...
#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks", "...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function from __future__ import unicode_literals import pytablereader print("\n".join([ "load from URL", "==============", ])) loader = pytablereader.TableUrlLoader( "https://en.wikipedia.org/wiki/List_of_unit_testing_fra...
78c70c0bdcf3b264cf522136ae35bc1ec5b12b62
tests/test_basic.py
tests/test_basic.py
import sys import pubrunner import pubrunner.command_line def test_countwords(): #pubrunner.pubrun('examples/CountWords/',True,True) sys.argv = ['pubrunner', '--defaultsettings', '--test','examples/CountWords/'] pubrunner.command_line.main() def test_textminingcounter(): #pubrunner.pubrun('examples/CountWords/',T...
import sys import pubrunner import pubrunner.command_line def test_countwords(): parentDir = os.path.dirname(os.path.abspath(__file__)) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner.command_line.main() def test_textminin...
Use absolute path for running tests
Use absolute path for running tests
Python
mit
jakelever/pubrunner,jakelever/pubrunner
import sys import pubrunner import pubrunner.command_line def test_countwords(): #pubrunner.pubrun('examples/CountWords/',True,True) sys.argv = ['pubrunner', '--defaultsettings', '--test','examples/CountWords/'] pubrunner.command_line.main() def test_textminingcounter(): #pubrunner.pubrun('examples/CountWords/',T...
import sys import pubrunner import pubrunner.command_line def test_countwords(): parentDir = os.path.dirname(os.path.abspath(__file__)) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner.command_line.main() def test_textminin...
<commit_before>import sys import pubrunner import pubrunner.command_line def test_countwords(): #pubrunner.pubrun('examples/CountWords/',True,True) sys.argv = ['pubrunner', '--defaultsettings', '--test','examples/CountWords/'] pubrunner.command_line.main() def test_textminingcounter(): #pubrunner.pubrun('examples...
import sys import pubrunner import pubrunner.command_line def test_countwords(): parentDir = os.path.dirname(os.path.abspath(__file__)) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner.command_line.main() def test_textminin...
import sys import pubrunner import pubrunner.command_line def test_countwords(): #pubrunner.pubrun('examples/CountWords/',True,True) sys.argv = ['pubrunner', '--defaultsettings', '--test','examples/CountWords/'] pubrunner.command_line.main() def test_textminingcounter(): #pubrunner.pubrun('examples/CountWords/',T...
<commit_before>import sys import pubrunner import pubrunner.command_line def test_countwords(): #pubrunner.pubrun('examples/CountWords/',True,True) sys.argv = ['pubrunner', '--defaultsettings', '--test','examples/CountWords/'] pubrunner.command_line.main() def test_textminingcounter(): #pubrunner.pubrun('examples...
80676409b706f3927b463afef6aa844d00aeb107
pymatgen/core/__init__.py
pymatgen/core/__init__.py
""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds import * from .l...
""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds import * from .l...
Add units to Core import.
Add units to Core import.
Python
mit
migueldiascosta/pymatgen,Bismarrck/pymatgen,sonium0/pymatgen,ctoher/pymatgen,Bismarrck/pymatgen,migueldiascosta/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,rousseab/pymatgen,sonium0/pymatgen,yanikou19/pymatgen,Dioptas/py...
""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds import * from .l...
""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds import * from .l...
<commit_before>""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds i...
""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds import * from .l...
""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds import * from .l...
<commit_before>""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "Shyue Ping Ong" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds i...
900fa2acbdb4cde05ab26cb134d95870d68ce004
salt/states/host.py
salt/states/host.py
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['result'] = Tr...
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['result'] = Tr...
Clean up strings to use format and add better comments
Clean up strings to use format and add better comments
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['result'] = Tr...
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['result'] = Tr...
<commit_before>''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret...
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['result'] = Tr...
''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret['result'] = Tr...
<commit_before>''' Manage the state of the hosts file ''' def present(name, ip): ''' Ensures that the named host is present with the given ip ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''} if __salt__['hosts.has_pair'](ip, name): ret...
f1d48525f1e8cde2af9a49636f38360b87b0ecb6
function/univariate_function.py
function/univariate_function.py
""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init__() @abst...
""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init__() @abst...
Add comments to abstract methods.
Add comments to abstract methods.
Python
mit
dpazel/music_rep
""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init__() @abst...
""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init__() @abst...
<commit_before>""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init...
""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init__() @abst...
""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init__() @abst...
<commit_before>""" File: univariate_function.py Purpose: Class that defines a generic (abstract) univariate function. """ from abc import ABC, abstractmethod class UnivariateFunction(ABC): """ Class that defines a generic (abstract) univariate function. """ def __init(self): super().__init...
0e4641734f101d0d972d66b05c19a5c2dc8043e1
journal/tests/test_activity.py
journal/tests/test_activity.py
import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat') Activ...
import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat') Activ...
Fix Activity CSV field test
Fix Activity CSV field test
Python
apache-2.0
WildCAS/CASCategorization,WildCAS/CASCategorization,WildCAS/CASCategorization
import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat') Activ...
import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat') Activ...
<commit_before>import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat'...
import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat') Activ...
import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat') Activ...
<commit_before>import datetime from django.test import TestCase from journal.models import Activity, Entry from journal.serializers import ActivitySerializer class ActivityTestCase(TestCase): """Sanity checks for activity""" def setUp(self): cat_e = Entry.objects.create(entry='I like walking the cat'...
bea0006566cb5512f1ae515689111339be27e42b
tk/material/apps.py
tk/material/apps.py
from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all translated title...
from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all translated title...
Change current language only within context when building search indexes
Change current language only within context when building search indexes
Python
agpl-3.0
GISAElkartea/tresna-kutxa,GISAElkartea/tresna-kutxa,GISAElkartea/tresna-kutxa,GISAElkartea/tresna-kutxa
from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all translated title...
from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all translated title...
<commit_before>from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all t...
from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all translated title...
from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all translated title...
<commit_before>from django.apps import AppConfig from django.db.models.signals import post_save from django.utils import translation from django.conf import settings from watson import search from localized_fields.fields import LocalizedField class MaterialSearchAdapter(search.SearchAdapter): """ Dumps all t...
a6754051ced2763065007b765d5d523fe8c65835
src/epiweb/urls.py
src/epiweb/urls.py
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), (r'^\+media/(?...
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), (r'^\+media/(?...
Add URLs to profile app.
Add URLs to profile app.
Python
agpl-3.0
ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), (r'^\+media/(?...
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), (r'^\+media/(?...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), ...
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), (r'^\+media/(?...
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), (r'^\+media/(?...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'homepage.html'}), ...
d23a2647f9313a49c9c552d90a2d57a26173b232
tools/dump_redis.py
tools/dump_redis.py
#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) else: ...
#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) else: ...
Add : Load for redis
Add : Load for redis
Python
agpl-3.0
savoirfairelinux/mod-booster-snmp,savoirfairelinux/mod-booster-snmp,savoirfairelinux/mod-booster-snmp
#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) else: ...
#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) else: ...
<commit_before>#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) e...
#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) else: ...
#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) else: ...
<commit_before>#!/usr/bin/python import redis import re import ast def dump_redis(): conn = redis.StrictRedis() out = {} for key in conn.keys(): if re.search(":[0-9]*$", key) is not None: out[key] = conn.smembers(key) #print '"%s":%s' % (key, conn.smembers(key)) e...
7c3cf9e430bee4451e817ccc3d32884ed0c5f8e9
bakeit/uploader.py
bakeit/uploader.py
try: from urllib.request import urlopen, Request, HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. """ self.api_key = a...
try: from urllib.request import urlopen, Request from urllib.error import HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. ...
Fix Python3 error when decoding the response.
fix: Fix Python3 error when decoding the response.
Python
mit
skorokithakis/bakeit
try: from urllib.request import urlopen, Request, HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. """ self.api_key = a...
try: from urllib.request import urlopen, Request from urllib.error import HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. ...
<commit_before>try: from urllib.request import urlopen, Request, HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. """ s...
try: from urllib.request import urlopen, Request from urllib.error import HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. ...
try: from urllib.request import urlopen, Request, HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. """ self.api_key = a...
<commit_before>try: from urllib.request import urlopen, Request, HTTPError except ImportError: from urllib2 import urlopen, Request, HTTPError import json class PasteryUploader(): def __init__(self, api_key): """ Initialize an Uploader instance with the given API key. """ s...
6e3bd2f5460049c9702bf44b37095c635ad8460b
smartfile/errors.py
smartfile/errors.py
import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self).__init__(*args,...
import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self).__init__(*args,...
Fix error handling to catch if JSON is not returned
Fix error handling to catch if JSON is not returned
Python
mit
smartfile/client-python
import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self).__init__(*args,...
import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self).__init__(*args,...
<commit_before>import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self)....
import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self).__init__(*args,...
import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self).__init__(*args,...
<commit_before>import six class APIError(Exception): "SmartFile API base Exception." pass class RequestError(APIError): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc self.detail = str(exc) super(RequestError, self)....
e2c53b348a69093cc770ba827a6bdd5191f2a830
aldryn_faq/cms_toolbar.py
aldryn_faq/cms_toolbar.py
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_blog import request_post_identifier from aldryn_faq import request_faq_category_identifier @toolb...
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _, get_language from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_faq import request_faq_category_identifier @toolbar_pool.register class FaqToolbar(...
Add ability to create question from toolbar
Add ability to create question from toolbar
Python
bsd-3-clause
czpython/aldryn-faq,mkoistinen/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_blog import request_post_identifier from aldryn_faq import request_faq_category_identifier @toolb...
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _, get_language from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_faq import request_faq_category_identifier @toolbar_pool.register class FaqToolbar(...
<commit_before># -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_blog import request_post_identifier from aldryn_faq import request_faq_category_iden...
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _, get_language from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_faq import request_faq_category_identifier @toolbar_pool.register class FaqToolbar(...
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_blog import request_post_identifier from aldryn_faq import request_faq_category_identifier @toolb...
<commit_before># -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_blog import request_post_identifier from aldryn_faq import request_faq_category_iden...
d7ea0514d3b794f2cacde82069699eff6b96cb24
wafer/talks/urls.py
wafer/talks/urls.py
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patterns( '', ...
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patterns( '', ...
Add a trailing slash to the paginated talk list
Add a trailing slash to the paginated talk list
Python
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patterns( '', ...
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patterns( '', ...
<commit_before>from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patter...
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patterns( '', ...
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patterns( '', ...
<commit_before>from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.talks.views import ( Speakers, TalkCreate, TalkDelete, TalkUpdate, TalkView, UsersTalks, TalksViewSet) router = routers.DefaultRouter() router.register(r'talks', TalksViewSet) urlpatterns = patter...
65881ca4254460ad6861769288680bd608648e0f
adhocracy/tests/lib/test_text.py
adhocracy/tests/lib/test_text.py
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self.assertEqual(re...
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self.assertEqual(re...
Adjust test cause user links now use double quotes for attributes
Adjust test cause user links now use double quotes for attributes
Python
agpl-3.0
alkadis/vcv,liqd/adhocracy,liqd/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,alkadis/vcv,phihag/adhocracy,phihag/adhocracy,SysTheron/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,SysTheron/adhocracy,SysThero...
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self.assertEqual(re...
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self.assertEqual(re...
<commit_before>from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self...
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self.assertEqual(re...
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self.assertEqual(re...
<commit_before>from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_user class TestText(TestController): def test_render(self): from adhocracy.lib.text import render source = ('header\n' '========') result = render(source) self...
b33fcfe3752caeb61a83eb04c3b8399b7c44c9a4
sylvia/__init__.py
sylvia/__init__.py
from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole import * from SylviaEpcServer import *
import sys if sys.version_info[0] > 2: raise Exception( "Sorry, we're still on Python 2. Version 1.0 of Sylvia will finally move to Python 3." ) from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole impo...
Add meaningful error for runnign with Python3
Add meaningful error for runnign with Python3 If we detect a Python3 interpreter at module init, tell the user to use Python 2. And be sure to apologize because it's 2019...
Python
mit
bgutter/sylvia
from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole import * from SylviaEpcServer import * Add meaningful error for runnign with Python3 If we detect a Python3 interpreter at module init, tell the user to ...
import sys if sys.version_info[0] > 2: raise Exception( "Sorry, we're still on Python 2. Version 1.0 of Sylvia will finally move to Python 3." ) from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole impo...
<commit_before>from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole import * from SylviaEpcServer import * <commit_msg>Add meaningful error for runnign with Python3 If we detect a Python3 interpreter at mod...
import sys if sys.version_info[0] > 2: raise Exception( "Sorry, we're still on Python 2. Version 1.0 of Sylvia will finally move to Python 3." ) from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole impo...
from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole import * from SylviaEpcServer import * Add meaningful error for runnign with Python3 If we detect a Python3 interpreter at module init, tell the user to ...
<commit_before>from PhonemeDetails import * from LetterDetails import * from PronunciationInferencer import * from PhoneticDictionary import * from Poem import * from SylviaConsole import * from SylviaEpcServer import * <commit_msg>Add meaningful error for runnign with Python3 If we detect a Python3 interpreter at mod...
71de95f9a2ea9e48d30d04897e79b025b8520775
bfg9000/shell/__init__.py
bfg9000/shell/__init__.py
import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass def execute(...
import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass def execute(...
Clean up the shell execute() function
Clean up the shell execute() function
Python
bsd-3-clause
jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000
import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass def execute(...
import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass def execute(...
<commit_before>import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass...
import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass def execute(...
import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass def execute(...
<commit_before>import os import subprocess from ..platform_name import platform_name if platform_name() == 'windows': from .windows import * else: from .posix import * class shell_list(list): """A special subclass of list used to mark that this command line uses special shell characters.""" pass...
5bd4688408fa2267bfb72fcab1ff85ddd134c00c
openquake/hazardlib/__init__.py
openquake/hazardlib/__init__.py
# The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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. ...
# The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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. ...
Upgrade release number to 0.6.0 (oq-engine 1.3.0)
Upgrade release number to 0.6.0 (oq-engine 1.3.0)
Python
agpl-3.0
mmpagani/oq-hazardlib,silviacanessa/oq-hazardlib,silviacanessa/oq-hazardlib,silviacanessa/oq-hazardlib,gem/oq-hazardlib,gem/oq-engine,vup1120/oq-hazardlib,vup1120/oq-hazardlib,gem/oq-engine,gem/oq-engine,g-weatherill/oq-hazardlib,vup1120/oq-hazardlib,larsbutler/oq-hazardlib,mmpagani/oq-hazardlib,gem/oq-engine,g-weather...
# The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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. ...
# The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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. ...
<commit_before># The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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 ...
# The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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. ...
# The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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. ...
<commit_before># The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # 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 ...
c8e57ffc08f89111bb628bdfa6114a76672e73b1
chmvh_website/gallery/signals.py
chmvh_website/gallery/signals.py
from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import create_thumbnail, process_patient_picture @receiver(post_save, sender='gallery.Patient') def send_notifications(sender, instance, *args, **kwargs): """ Notify users that a reply has been posted """ p...
from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import process_patient_picture @receiver(post_save, sender='gallery.Patient') def process_picture(sender, instance, update_fields, *args, **kwargs): """ Process a patients picture. This involves checki...
Fix infinite loop when processing pictures.
Fix infinite loop when processing pictures.
Python
mit
cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website
from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import create_thumbnail, process_patient_picture @receiver(post_save, sender='gallery.Patient') def send_notifications(sender, instance, *args, **kwargs): """ Notify users that a reply has been posted """ p...
from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import process_patient_picture @receiver(post_save, sender='gallery.Patient') def process_picture(sender, instance, update_fields, *args, **kwargs): """ Process a patients picture. This involves checki...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import create_thumbnail, process_patient_picture @receiver(post_save, sender='gallery.Patient') def send_notifications(sender, instance, *args, **kwargs): """ Notify users that a reply has been p...
from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import process_patient_picture @receiver(post_save, sender='gallery.Patient') def process_picture(sender, instance, update_fields, *args, **kwargs): """ Process a patients picture. This involves checki...
from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import create_thumbnail, process_patient_picture @receiver(post_save, sender='gallery.Patient') def send_notifications(sender, instance, *args, **kwargs): """ Notify users that a reply has been posted """ p...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from gallery.tasks import create_thumbnail, process_patient_picture @receiver(post_save, sender='gallery.Patient') def send_notifications(sender, instance, *args, **kwargs): """ Notify users that a reply has been p...
6075ec67951d0fa6cae6db5b37cad3291766dfc4
ci/cleanup-binary-tags.py
ci/cleanup-binary-tags.py
#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git pull --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() versions = sorted(list...
#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git fetch --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() versions = sorted(lis...
Adjust pulling tags in CI
Adjust pulling tags in CI
Python
mit
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git pull --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() versions = sorted(list...
#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git fetch --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() versions = sorted(lis...
<commit_before>#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git pull --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() version...
#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git fetch --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() versions = sorted(lis...
#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git pull --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() versions = sorted(list...
<commit_before>#!/usr/bin/env python3 import os import subprocess import semver def tag_to_version(tag): return tag.split('-')[1].lstrip('v') subprocess.check_call('git pull --tags', shell=True) tags = subprocess.check_output( 'git tag --list | grep binary', shell=True).decode('UTF-8').splitlines() version...
699279fe19c20e200db91e032c97b3f0b644c2af
conllu/__init__.py
conllu/__init__.py
from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence ] def _i...
from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence ] def par...
Move helper to end of module and remove double spaces.
Move helper to end of module and remove double spaces.
Python
mit
EmilStenstrom/conllu
from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence ] def _i...
from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence ] def par...
<commit_before>from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence...
from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence ] def par...
from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence ] def _i...
<commit_before>from __future__ import unicode_literals from conllu.models import TokenList from conllu.parser import parse_token_and_metadata def parse(data, fields=None): return [ TokenList(*parse_token_and_metadata(sentence, fields=fields)) for sentence in data.split("\n\n") if sentence...
c305632eb916332802fa5229e6f739f4ad74f686
ptpython/config.py
ptpython/config.py
__all__ = ('configure') def configure(repl): repl.vi_mode = True repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai')
__all__ = ('configure') def configure(repl): repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai')
Disable vim mode in ptpython. Works meh
Disable vim mode in ptpython. Works meh
Python
mit
mpardalos/dotfiles,mpardalos/dotfiles
__all__ = ('configure') def configure(repl): repl.vi_mode = True repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai') Disable vim mode in ptpyth...
__all__ = ('configure') def configure(repl): repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai')
<commit_before>__all__ = ('configure') def configure(repl): repl.vi_mode = True repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai') <commit_msg...
__all__ = ('configure') def configure(repl): repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai')
__all__ = ('configure') def configure(repl): repl.vi_mode = True repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai') Disable vim mode in ptpyth...
<commit_before>__all__ = ('configure') def configure(repl): repl.vi_mode = True repl.show_signature = True repl.show_meta_enter_message = True repl.show_line_numbers = True repl.enable_open_in_editor = True repl.true_color = True repl.use_code_colorscheme('monokai') <commit_msg...
34174b9426fb4579a27771089037202f930faa9d
debug_logging/__init__.py
debug_logging/__init__.py
VERSION = (0, 4, 0, "a", 1) # following PEP 386 DEV_N = 1 # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "f": ver...
VERSION = (0, 4, 0, "f", 1) # following PEP 386 DEV_N = None # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "f": ...
Update release number for pypi release
Update release number for pypi release
Python
bsd-3-clause
lincolnloop/django-debug-logging,lincolnloop/django-debug-logging
VERSION = (0, 4, 0, "a", 1) # following PEP 386 DEV_N = 1 # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "f": ver...
VERSION = (0, 4, 0, "f", 1) # following PEP 386 DEV_N = None # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "f": ...
<commit_before>VERSION = (0, 4, 0, "a", 1) # following PEP 386 DEV_N = 1 # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "...
VERSION = (0, 4, 0, "f", 1) # following PEP 386 DEV_N = None # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "f": ...
VERSION = (0, 4, 0, "a", 1) # following PEP 386 DEV_N = 1 # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "f": ver...
<commit_before>VERSION = (0, 4, 0, "a", 1) # following PEP 386 DEV_N = 1 # for PyPi releases, set this to None def get_version(short=False): version = "%s.%s" % (VERSION[0], VERSION[1]) if short: return version if VERSION[2]: version = "%s.%s" % (version, VERSION[2]) if VERSION[3] != "...
48bbdf82606440c2291d5f6255910c20b366cf9e
django/contrib/comments/feeds.py
django/contrib/comments/feeds.py
from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_site'): ...
from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_site'): ...
Use correct m2m join table name in LatestCommentsFeed
Use correct m2m join table name in LatestCommentsFeed --HG-- extra : convert_revision : svn%3Abcc190cf-cafb-0310-a4f2-bffc1f526a37/django/trunk%409089
Python
bsd-3-clause
adieu/django-nonrel,adieu/django-nonrel,adieu/django-nonrel
from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_site'): ...
from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_site'): ...
<commit_before>from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_s...
from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_site'): ...
from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_site'): ...
<commit_before>from django.conf import settings from django.contrib.syndication.feeds import Feed from django.contrib.sites.models import Site from django.contrib import comments class LatestCommentFeed(Feed): """Feed of latest comments on the current site.""" def title(self): if not hasattr(self, '_s...
13f9a48166aed2f6d09e1a27c60568d2318ceee2
src/ocspdash/custom_columns.py
src/ocspdash/custom_columns.py
# -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID type, otherwise us...
# -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID type, otherwise us...
Change the custom UUID column to work right
Change the custom UUID column to work right
Python
mit
scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash
# -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID type, otherwise us...
# -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID type, otherwise us...
<commit_before># -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID typ...
# -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID type, otherwise us...
# -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID type, otherwise us...
<commit_before># -*- coding: utf-8 -*- """Implements custom SQLAlchemy TypeDecorators.""" import uuid import sqlalchemy.dialects.postgresql from sqlalchemy.types import BINARY, TypeDecorator __all__ = [ 'UUID', ] class UUID(TypeDecorator): """Platform-independent UUID type. Uses Postgresql's UUID typ...
053d4599dbb70664cb9f4e9c5b620b39733c254d
nova_powervm/conf/__init__.py
nova_powervm/conf/__init__.py
# Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 a...
# Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 a...
Support new conf refactor from Nova
Support new conf refactor from Nova The core nova project is consolidating their conf options. This impacted the PowerVM conf options as a few that we were explicitly importing were moved. This change set fixes the issue and allows PowerVM to work properly. The change actually removes the imports, but they are stil...
Python
apache-2.0
openstack/nova-powervm,openstack/nova-powervm,stackforge/nova-powervm,stackforge/nova-powervm
# Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 a...
# Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 a...
<commit_before># Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 # # Unles...
# Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 a...
# Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 a...
<commit_before># Copyright 2016 IBM Corp. # # All Rights Reserved. # # 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 # # Unles...
0c4e94cf9f6265768178509a4dcd07d1f502f5c8
djangoratings/managers.py
djangoratings/managers.py
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
Fix for the return value of delete method
Fix for the return value of delete method
Python
bsd-2-clause
bopo/django-ratings,dcramer/django-ratings,kangasbros/django-bitcoin,Elec/django-ratings,yeago/django-ratings,hovel/django-ratings,Eksmo/django-ratings,readevalprint/django-bitcoin
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
<commit_before>from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached t...
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
<commit_before>from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached t...
8fafef4c2151d17133c5787847d68ab4b58f40c3
stagecraft/libs/views/utils.py
stagecraft/libs/views/utils.py
import json from django.utils.cache import patch_response_headers from functools import wraps def long_cache(a_view): @wraps(a_view) def _wrapped_view(request, *args, **kwargs): response = a_view(request, *args, **kwargs) patch_response_headers(response, 86400 * 365) return response ...
import json from django.utils.cache import patch_response_headers from functools import wraps from uuid import UUID class JsonEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, UUID): return '{}'.format(obj) if hasattr(obj, 'serialize'): return obj.seri...
Extend JSON serialiser to use serialize() method
Extend JSON serialiser to use serialize() method If an object is a UUID, return a string representation of it. If the object still can't be serialised, call its serialize() method. This is useful when nesting Link models inside dashboards, for example.
Python
mit
alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft
import json from django.utils.cache import patch_response_headers from functools import wraps def long_cache(a_view): @wraps(a_view) def _wrapped_view(request, *args, **kwargs): response = a_view(request, *args, **kwargs) patch_response_headers(response, 86400 * 365) return response ...
import json from django.utils.cache import patch_response_headers from functools import wraps from uuid import UUID class JsonEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, UUID): return '{}'.format(obj) if hasattr(obj, 'serialize'): return obj.seri...
<commit_before>import json from django.utils.cache import patch_response_headers from functools import wraps def long_cache(a_view): @wraps(a_view) def _wrapped_view(request, *args, **kwargs): response = a_view(request, *args, **kwargs) patch_response_headers(response, 86400 * 365) re...
import json from django.utils.cache import patch_response_headers from functools import wraps from uuid import UUID class JsonEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, UUID): return '{}'.format(obj) if hasattr(obj, 'serialize'): return obj.seri...
import json from django.utils.cache import patch_response_headers from functools import wraps def long_cache(a_view): @wraps(a_view) def _wrapped_view(request, *args, **kwargs): response = a_view(request, *args, **kwargs) patch_response_headers(response, 86400 * 365) return response ...
<commit_before>import json from django.utils.cache import patch_response_headers from functools import wraps def long_cache(a_view): @wraps(a_view) def _wrapped_view(request, *args, **kwargs): response = a_view(request, *args, **kwargs) patch_response_headers(response, 86400 * 365) re...
be51fddd326975047b7e60227072f5df80eadbad
conf_site/accounts/tests/factories.py
conf_site/accounts/tests/factories.py
# -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name") class M...
# -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name") class M...
Fix race condition involving account usernames.
Fix race condition involving account usernames. Fix race condition causing random test failures by using get_or_create on generated usernames. See https://factoryboy.readthedocs.io/en/latest/orms.html#factory.django.DjangoOptions.django_get_or_create
Python
mit
pydata/conf_site,pydata/conf_site,pydata/conf_site
# -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name") class M...
# -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name") class M...
<commit_before># -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name...
# -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name") class M...
# -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name") class M...
<commit_before># -*- coding: utf-8 -*- import factory from django.contrib.auth import get_user_model class UserFactory(factory.django.DjangoModelFactory): username = factory.Faker("user_name") email = factory.Faker("email") first_name = factory.Faker("first_name") last_name = factory.Faker("last_name...
d648b7bc1e8f2e891be8a72d78c689b06a7bcdac
tests/TestConfigFileLoading.py
tests/TestConfigFileLoading.py
import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: cls.filepat...
import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: cls.filepat...
Make test names lower case prefix
Make test names lower case prefix
Python
bsd-3-clause
sky-uk/bslint
import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: cls.filepat...
import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: cls.filepat...
<commit_before>import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: ...
import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: cls.filepat...
import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: cls.filepat...
<commit_before>import unittest import src import sys from io import StringIO class TestConfigFileLoading(unittest.TestCase): filepath_prefix = '' @classmethod def setUpClass(cls): if sys.argv[0].endswith('nosetests'): cls.filepath_prefix = "./resources/config/" else: ...
115771e1917bd40989cc70762225fd3c6e0a565b
test/test_parser.py
test/test_parser.py
import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position to start so it can be read #self.tf.seek(0) ...
import bz2 import gzip import os import re import shutil import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position...
Add test for parsing different file types
Add test for parsing different file types - Add tests for bzip, gzip and normal files to parser tests.
Python
apache-2.0
apel/apel,tofu-rocketry/apel,apel/apel,tofu-rocketry/apel,stfc/apel,stfc/apel
import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position to start so it can be read #self.tf.seek(0) ...
import bz2 import gzip import os import re import shutil import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position...
<commit_before>import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position to start so it can be read #self....
import bz2 import gzip import os import re import shutil import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position...
import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position to start so it can be read #self.tf.seek(0) ...
<commit_before>import tempfile import unittest import mock import bin.parser class ParserTest(unittest.TestCase): def setUp(self): self.tf = tempfile.TemporaryFile() #print self.tf.name #self.tf.write('Test text.') ## Reset file position to start so it can be read #self....
401d5d3e676bdeeb067977b8506e420262d8be05
tests/test_memes.py
tests/test_memes.py
from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_create_genome(sel...
from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_create_genome(sel...
Remove origin from meme model
Remove origin from meme model
Python
mit
jcpeterson/Dallinger,suchow/Wallace,suchow/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,suchow/Wallace,berkeley-cocosci/Wallace,Dallinger/Dallinger,Dallinger/Dallinger,berkeley-cocosci/Wallace,berkeley-cocosci/Wallace,jcpeterson/Dallinger,Dallinger/Dallinger,jcpeterson/Dalli...
from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_create_genome(sel...
from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_create_genome(sel...
<commit_before>from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_cr...
from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_create_genome(sel...
from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_create_genome(sel...
<commit_before>from wallace import models, memes, db class TestMemes(object): def setup(self): self.db = db.init_db(drop_all=True) def teardown(self): self.db.rollback() self.db.close() def add(self, *args): self.db.add_all(args) self.db.commit() def test_cr...
1b103d314e94e3c1dba9d9d08a2655c62f26d18c
ibmcnx/doc/DataSources.py
ibmcnx/doc/DataSources.py
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Create script to save documentation to a file
4: Create script to save documentation to a file Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
291d26c5563307e33f7a4aaee406b75c4b8c591a
tulip/tasks_test.py
tulip/tasks_test.py
"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): self.event_...
"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): self.event_...
Test for sleep(dt) without extra arg.
Test for sleep(dt) without extra arg.
Python
apache-2.0
gvanrossum/asyncio,gsb-eng/asyncio,gsb-eng/asyncio,manipopopo/asyncio,gvanrossum/asyncio,haypo/trollius,gsb-eng/asyncio,vxgmichel/asyncio,ajdavis/asyncio,fallen/asyncio,jashandeep-sohi/asyncio,haypo/trollius,vxgmichel/asyncio,jashandeep-sohi/asyncio,gvanrossum/asyncio,Martiusweb/asyncio,ajdavis/asyncio,manipopopo/async...
"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): self.event_...
"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): self.event_...
<commit_before>"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): ...
"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): self.event_...
"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): self.event_...
<commit_before>"""Tests for tasks.py.""" import time import unittest from . import events from . import futures from . import tasks class TaskTests(unittest.TestCase): def setUp(self): self.event_loop = events.new_event_loop() events.set_event_loop(self.event_loop) def tearDown(self): ...
8832144b3fe0b1e227ebd02b2b3cf8ea5cbcb386
introductions/__init__.py
introductions/__init__.py
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) def health(self): try: with self.engine.connect() as c: c.execute('select 1=1').fetchall() return True...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) from werkzeug.contrib.fixers import ProxyFix app.wsgi_app = ProxyFix(app.wsgi_app) def health(self): try: with self.engine.con...
Add proxy fix as in lr this will run with reverse proxy
Add proxy fix as in lr this will run with reverse proxy
Python
mit
LandRegistry/introductions-alpha,LandRegistry/introductions-alpha,LandRegistry/introductions-alpha
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) def health(self): try: with self.engine.connect() as c: c.execute('select 1=1').fetchall() return True...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) from werkzeug.contrib.fixers import ProxyFix app.wsgi_app = ProxyFix(app.wsgi_app) def health(self): try: with self.engine.con...
<commit_before>from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) def health(self): try: with self.engine.connect() as c: c.execute('select 1=1').fetchall() ...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) from werkzeug.contrib.fixers import ProxyFix app.wsgi_app = ProxyFix(app.wsgi_app) def health(self): try: with self.engine.con...
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) def health(self): try: with self.engine.connect() as c: c.execute('select 1=1').fetchall() return True...
<commit_before>from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os from .health import Health app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) def health(self): try: with self.engine.connect() as c: c.execute('select 1=1').fetchall() ...
67be3c3e8ac89f3d8ce36aece39b0bd67fb8fd08
src/testers/tls.py
src/testers/tls.py
# -*- coding: utf-8 -*- from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo def enabled(test...
# -*- coding: utf-8 -*- import ssl from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo def...
Fix missing parentheses in exception
Fix missing parentheses in exception
Python
mit
stampery/mongoaudit
# -*- coding: utf-8 -*- from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo def enabled(test...
# -*- coding: utf-8 -*- import ssl from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo def...
<commit_before># -*- coding: utf-8 -*- from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo d...
# -*- coding: utf-8 -*- import ssl from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo def...
# -*- coding: utf-8 -*- from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo def enabled(test...
<commit_before># -*- coding: utf-8 -*- from src.testers.decorators import requires_userinfo @requires_userinfo def available(test): """ Check if MongoDB is compiled with OpenSSL support """ return 'OpenSSLVersion' in test.tester.info \ or 'openssl' in test.tester.info @requires_userinfo d...
e018f35e51712e4d6a03f5b31e33f61c03365538
profiles/views.py
profiles/views.py
from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_object_or_404 from ...
from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_object_or_404 from ...
Order content on profile by most recent.
Order content on profile by most recent.
Python
mit
ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest,ImmaculateObsession/nest
from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_object_or_404 from ...
from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_object_or_404 from ...
<commit_before>from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_objec...
from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_object_or_404 from ...
from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_object_or_404 from ...
<commit_before>from django.shortcuts import render from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import DetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import get_objec...
9d10b74e4ffc5d4f62597ddb6884d35690656172
cookiecutter/find.py
cookiecutter/find.py
# -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project temp...
# -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project temp...
Remove Python 2.6 compat from format
Remove Python 2.6 compat from format
Python
bsd-3-clause
audreyr/cookiecutter,dajose/cookiecutter,hackebrot/cookiecutter,stevepiercy/cookiecutter,michaeljoseph/cookiecutter,dajose/cookiecutter,pjbull/cookiecutter,terryjbates/cookiecutter,luzfcb/cookiecutter,audreyr/cookiecutter,pjbull/cookiecutter,luzfcb/cookiecutter,michaeljoseph/cookiecutter,terryjbates/cookiecutter,stevep...
# -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project temp...
# -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project temp...
<commit_before># -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is t...
# -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project temp...
# -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project temp...
<commit_before># -*- coding: utf-8 -*- """Functions for finding Cookiecutter templates and other components.""" import logging import os from .exceptions import NonTemplatedInputDirException logger = logging.getLogger(__name__) def find_template(repo_dir): """Determine which child directory of `repo_dir` is t...
9b8a223dc45f133851fac2df564c2c058aafdf91
scripts/index.py
scripts/index.py
from collections import defaultdict from pathlib import Path import re from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): path = re.sub(r'^content/(.*)/README.org$', r'\1', str(src)) segments = path.split('/') ...
from collections import defaultdict from pathlib import Path from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): segments = src.parts[1:-1] node = root for s in segments: node = node[s] def walk(node, ...
Use pathlib for path segmentation
Use pathlib for path segmentation
Python
mit
yeonghoey/notes,yeonghoey/yeonghoey,yeonghoey/yeonghoey,yeonghoey/yeonghoey,yeonghoey/yeonghoey
from collections import defaultdict from pathlib import Path import re from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): path = re.sub(r'^content/(.*)/README.org$', r'\1', str(src)) segments = path.split('/') ...
from collections import defaultdict from pathlib import Path from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): segments = src.parts[1:-1] node = root for s in segments: node = node[s] def walk(node, ...
<commit_before>from collections import defaultdict from pathlib import Path import re from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): path = re.sub(r'^content/(.*)/README.org$', r'\1', str(src)) segments = path....
from collections import defaultdict from pathlib import Path from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): segments = src.parts[1:-1] node = root for s in segments: node = node[s] def walk(node, ...
from collections import defaultdict from pathlib import Path import re from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): path = re.sub(r'^content/(.*)/README.org$', r'\1', str(src)) segments = path.split('/') ...
<commit_before>from collections import defaultdict from pathlib import Path import re from string import Template import sys def tree(): return defaultdict(tree) root = tree() for src in Path('content').glob('**/README.org'): path = re.sub(r'^content/(.*)/README.org$', r'\1', str(src)) segments = path....
f2e410492aaaad59fca83d313ec673c1fb411e44
astral/api/tests/test_node.py
astral/api/tests/test_node.py
from nose.tools import eq_ from tornado.httpclient import HTTPRequest import uuid from astral.api.tests import BaseTest from astral.models.node import Node class NodeHandlerTest(BaseTest): def test_delete_node(self): node = Node(uuid=uuid.getnode()) self.http_client.fetch(HTTPRequest( ...
from nose.tools import eq_ from tornado.httpclient import HTTPRequest from astral.api.tests import BaseTest from astral.models import Node from astral.models.tests.factories import NodeFactory class NodeHandlerTest(BaseTest): def test_delete_node(self): node = NodeFactory() self.http_client.fetch(...
Build proper Node in tests after refactoring constructor.
Build proper Node in tests after refactoring constructor.
Python
mit
peplin/astral
from nose.tools import eq_ from tornado.httpclient import HTTPRequest import uuid from astral.api.tests import BaseTest from astral.models.node import Node class NodeHandlerTest(BaseTest): def test_delete_node(self): node = Node(uuid=uuid.getnode()) self.http_client.fetch(HTTPRequest( ...
from nose.tools import eq_ from tornado.httpclient import HTTPRequest from astral.api.tests import BaseTest from astral.models import Node from astral.models.tests.factories import NodeFactory class NodeHandlerTest(BaseTest): def test_delete_node(self): node = NodeFactory() self.http_client.fetch(...
<commit_before>from nose.tools import eq_ from tornado.httpclient import HTTPRequest import uuid from astral.api.tests import BaseTest from astral.models.node import Node class NodeHandlerTest(BaseTest): def test_delete_node(self): node = Node(uuid=uuid.getnode()) self.http_client.fetch(HTTPReques...
from nose.tools import eq_ from tornado.httpclient import HTTPRequest from astral.api.tests import BaseTest from astral.models import Node from astral.models.tests.factories import NodeFactory class NodeHandlerTest(BaseTest): def test_delete_node(self): node = NodeFactory() self.http_client.fetch(...
from nose.tools import eq_ from tornado.httpclient import HTTPRequest import uuid from astral.api.tests import BaseTest from astral.models.node import Node class NodeHandlerTest(BaseTest): def test_delete_node(self): node = Node(uuid=uuid.getnode()) self.http_client.fetch(HTTPRequest( ...
<commit_before>from nose.tools import eq_ from tornado.httpclient import HTTPRequest import uuid from astral.api.tests import BaseTest from astral.models.node import Node class NodeHandlerTest(BaseTest): def test_delete_node(self): node = Node(uuid=uuid.getnode()) self.http_client.fetch(HTTPReques...
da98272c3b19828dabbbb339f025c9d3dd4a949e
relay_api/core/relay.py
relay_api/core/relay.py
import RPi.GPIO as GPIO class relay(): def __init__(self, gpio_num): self.gpio = gpio_num GPIO.setmode(GPIO.BCM) try: GPIO.input(self.gpio) raise LookupError("Relay is already in use!") except RuntimeError: GPIO.setup(self.gpio, GPIO.OUT) ...
import RPi.GPIO as GPIO MAX_RELAY_GPIO = 27 class relay(): def __init__(self, gpio_num): if gpio_num not in range(MAX_RELAY_GPIO + 1): raise LookupError("Relay GPIO invalid! Use one between 0 - " + str(MAX_RELAY_GPIO)) self.gpio = gpio_num GPIO.s...
Change the way that GPIO is verified
Change the way that GPIO is verified
Python
mit
pahumadad/raspi-relay-api
import RPi.GPIO as GPIO class relay(): def __init__(self, gpio_num): self.gpio = gpio_num GPIO.setmode(GPIO.BCM) try: GPIO.input(self.gpio) raise LookupError("Relay is already in use!") except RuntimeError: GPIO.setup(self.gpio, GPIO.OUT) ...
import RPi.GPIO as GPIO MAX_RELAY_GPIO = 27 class relay(): def __init__(self, gpio_num): if gpio_num not in range(MAX_RELAY_GPIO + 1): raise LookupError("Relay GPIO invalid! Use one between 0 - " + str(MAX_RELAY_GPIO)) self.gpio = gpio_num GPIO.s...
<commit_before>import RPi.GPIO as GPIO class relay(): def __init__(self, gpio_num): self.gpio = gpio_num GPIO.setmode(GPIO.BCM) try: GPIO.input(self.gpio) raise LookupError("Relay is already in use!") except RuntimeError: GPIO.setup(self.gpio, GP...
import RPi.GPIO as GPIO MAX_RELAY_GPIO = 27 class relay(): def __init__(self, gpio_num): if gpio_num not in range(MAX_RELAY_GPIO + 1): raise LookupError("Relay GPIO invalid! Use one between 0 - " + str(MAX_RELAY_GPIO)) self.gpio = gpio_num GPIO.s...
import RPi.GPIO as GPIO class relay(): def __init__(self, gpio_num): self.gpio = gpio_num GPIO.setmode(GPIO.BCM) try: GPIO.input(self.gpio) raise LookupError("Relay is already in use!") except RuntimeError: GPIO.setup(self.gpio, GPIO.OUT) ...
<commit_before>import RPi.GPIO as GPIO class relay(): def __init__(self, gpio_num): self.gpio = gpio_num GPIO.setmode(GPIO.BCM) try: GPIO.input(self.gpio) raise LookupError("Relay is already in use!") except RuntimeError: GPIO.setup(self.gpio, GP...
66137ab7cc8a0736bbf52a6ded49fd5661ddb68b
test/test_files.py
test/test_files.py
import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb https://apt.dockerproject.org/repo"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/usr/local/bin/docker-cl...
import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb \[arch=amd64\] https://download.docker.com/linux/ubuntu"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/us...
Update for new docker install
Update for new docker install
Python
mit
wicksy/CV,wicksy/CV,wicksy/CV
import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb https://apt.dockerproject.org/repo"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/usr/local/bin/docker-cl...
import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb \[arch=amd64\] https://download.docker.com/linux/ubuntu"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/us...
<commit_before>import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb https://apt.dockerproject.org/repo"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/usr/loca...
import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb \[arch=amd64\] https://download.docker.com/linux/ubuntu"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/us...
import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb https://apt.dockerproject.org/repo"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/usr/local/bin/docker-cl...
<commit_before>import pytest @pytest.mark.parametrize("name, user, group, mode, contains", [ ("/etc/apt/sources.list.d/docker.list", "root", "root", "0644", "deb https://apt.dockerproject.org/repo"), ("/tmp/docker-lab/", "root", "root", "0755", "null"), ("/tmp/CV/", "root", "root", "0755", "null"), ("/usr/loca...
2c62c7f063af02f6872edd2801c6700bfffeebd4
cloud_browser/cloud/config.py
cloud_browser/cloud/config.py
"""Cloud configuration.""" from cloud_browser.cloud.rackspace import RackspaceConnection class Config(object): """Cloud configuration helper.""" conn_cls = RackspaceConnection __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connection @clas...
"""Cloud configuration.""" class Config(object): """Cloud configuration helper.""" __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connection @classmethod def from_settings(cls): """Create configuration from Django settings or envir...
Refactor to allow different connection class bindings.
Config: Refactor to allow different connection class bindings.
Python
mit
ryan-roemer/django-cloud-browser,ryan-roemer/django-cloud-browser,ryan-roemer/django-cloud-browser,UrbanDaddy/django-cloud-browser,UrbanDaddy/django-cloud-browser
"""Cloud configuration.""" from cloud_browser.cloud.rackspace import RackspaceConnection class Config(object): """Cloud configuration helper.""" conn_cls = RackspaceConnection __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connection @clas...
"""Cloud configuration.""" class Config(object): """Cloud configuration helper.""" __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connection @classmethod def from_settings(cls): """Create configuration from Django settings or envir...
<commit_before>"""Cloud configuration.""" from cloud_browser.cloud.rackspace import RackspaceConnection class Config(object): """Cloud configuration helper.""" conn_cls = RackspaceConnection __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connec...
"""Cloud configuration.""" class Config(object): """Cloud configuration helper.""" __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connection @classmethod def from_settings(cls): """Create configuration from Django settings or envir...
"""Cloud configuration.""" from cloud_browser.cloud.rackspace import RackspaceConnection class Config(object): """Cloud configuration helper.""" conn_cls = RackspaceConnection __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connection @clas...
<commit_before>"""Cloud configuration.""" from cloud_browser.cloud.rackspace import RackspaceConnection class Config(object): """Cloud configuration helper.""" conn_cls = RackspaceConnection __singleton = None def __init__(self, connection): """Initializer.""" self.connection = connec...
3be2d3031f878232f38f692b186ea5699b1586ef
tm/tmux_wrapper.py
tm/tmux_wrapper.py
# -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session does not exist...
# -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session does not exist...
Add CommandResponse class to use instead of (out, err) tuple
Add CommandResponse class to use instead of (out, err) tuple
Python
mit
ethanal/tm
# -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session does not exist...
# -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session does not exist...
<commit_before># -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session...
# -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session does not exist...
# -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session does not exist...
<commit_before># -*- coding: utf-8 -*- import subprocess class SessionExists(Exception): description = "Session already exists." pass class ServerConnectionError(Exception): description = "tmux server is not currently running." pass class SessionDoesNotExist(Exception): description = "Session...
3040c42aab5eb09e3e91095ac53b1f3e6b9d7610
setup.py
setup.py
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.1", packages=["todoist", "todoist.managers"], author...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.2", packages=["todoist", "todoist.managers"], author...
Update the PyPI version to 8.1.2.
Update the PyPI version to 8.1.2.
Python
mit
Doist/todoist-python
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.1", packages=["todoist", "todoist.managers"], author...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.2", packages=["todoist", "todoist.managers"], author...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.1", packages=["todoist", "todoist.manager...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.2", packages=["todoist", "todoist.managers"], author...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.1", packages=["todoist", "todoist.managers"], author...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except Exception: return "" setup( name="todoist-python", version="8.1.1", packages=["todoist", "todoist.manager...
3277de26d239d5c0420df575b36cb065c033e4ed
massa/container.py
massa/container.py
# -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(create_engine( ...
# -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(create_engine( ...
Define the log level of the logger instead of the handler.
Define the log level of the logger instead of the handler.
Python
mit
jaapverloop/massa
# -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(create_engine( ...
# -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(create_engine( ...
<commit_before># -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(...
# -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(create_engine( ...
# -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(create_engine( ...
<commit_before># -*- coding: utf-8 -*- import logging from logging.handlers import RotatingFileHandler from knot import Container from sqlalchemy import create_engine from .domain import Db, MeasurementService def build(app): c = Container(app.config) @c.factory(cache=True) def db(c): return Db(...
50c4fe78a108ae3ee393777d2f3437c1773cf23f
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellulario', ver...
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellulario', ver...
Fix for accidental string continuation.
Fix for accidental string continuation.
Python
mit
mayfield/cellulario
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellulario', ver...
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellulario', ver...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellu...
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellulario', ver...
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellulario', ver...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='cellu...
6f80fd10cbbc863df3217d2ff903b43bff8f6250
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.2', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python :: 3 :: Only']...
#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.3', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python :: 3 :: Only']...
Prepare for release of 0.0.3
Prepare for release of 0.0.3
Python
apache-2.0
onedox/tap-awin
#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.2', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python :: 3 :: Only']...
#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.3', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python :: 3 :: Only']...
<commit_before>#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.2', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python...
#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.3', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python :: 3 :: Only']...
#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.2', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python :: 3 :: Only']...
<commit_before>#!/usr/bin/env python from setuptools import setup setup(name='tap-awin', version='0.0.2', description='Singer.io tap for extracting data from the Affiliate Window API', author='Onedox', url='https://github.com/onedox/tap-awin', classifiers=['Programming Language :: Python...
f80ca8d5bb332d3435eb2c50eb2ad41e287af58e
setup.py
setup.py
import os from setuptools import setup NAME = 'sleuth' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = '[email protected]' setup( ...
import os from setuptools import setup NAME = 'sleuth-mock' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = '[email protected]' set...
Rename package so it doesn't clash
Rename package so it doesn't clash
Python
unlicense
Kazade/sleuth
import os from setuptools import setup NAME = 'sleuth' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = '[email protected]' setup( ...
import os from setuptools import setup NAME = 'sleuth-mock' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = '[email protected]' set...
<commit_before>import os from setuptools import setup NAME = 'sleuth' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = 'kazade@gmail...
import os from setuptools import setup NAME = 'sleuth-mock' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = '[email protected]' set...
import os from setuptools import setup NAME = 'sleuth' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = '[email protected]' setup( ...
<commit_before>import os from setuptools import setup NAME = 'sleuth' MODULES = ['sleuth'] DESCRIPTION = 'A minimal Python mocking library' URL = "https://github.com/kazade/sleuth" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Luke Benstead' AUTHOR_EMAIL = 'kazade@gmail...
8bdc451dc6ec4b38feb02be25151d9104b90ca65
allergies/example.py
allergies/example.py
class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): return self.scor...
class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): return self.scor...
Rename 'list' to the more pythonic 'lst'
allergies: Rename 'list' to the more pythonic 'lst'
Python
mit
Peque/xpython,wobh/xpython,exercism/python,oalbe/xpython,pheanex/xpython,pheanex/xpython,de2Zotjes/xpython,exercism/python,behrtam/xpython,pombredanne/xpython,orozcoadrian/xpython,outkaj/xpython,exercism/xpython,exercism/xpython,jmluy/xpython,rootulp/xpython,pombredanne/xpython,orozcoadrian/xpython,de2Zotjes/xpython,sm...
class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): return self.scor...
class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): return self.scor...
<commit_before>class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): r...
class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): return self.scor...
class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): return self.scor...
<commit_before>class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def is_allergic_to(self, allergy): r...
f54324c13a21eeee1b90781efb7c132eeba16d44
tweepy/__init__.py
tweepy/__init__.py
# Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, FileCache, MemCac...
# Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0.1' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, FileCache, MemC...
Increment tweepy version to 1.0.1
Increment tweepy version to 1.0.1
Python
mit
damchilly/tweepy,ze-phyr-us/tweepy,yared-bezum/tweepy,Choko256/tweepy,xrg/tweepy,truekonrads/tweepy,takeshineshiro/tweepy,vivek8943/tweepy,thelostscientist/tweepy,atomicjets/tweepy,elijah513/tweepy,kcompher/tweepy,srimanthd/tweepy,nickmalleson/tweepy,wjt/tweepy,tsablic/tweepy,cogniteev/tweepy,awangga/tweepy,alexhanna/t...
# Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, FileCache, MemCac...
# Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0.1' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, FileCache, MemC...
<commit_before># Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, Fi...
# Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0.1' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, FileCache, MemC...
# Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, FileCache, MemCac...
<commit_before># Tweepy # Copyright 2009 Joshua Roesslein # See LICENSE """ Tweepy Twitter API library """ __version__ = '1.0' from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models from . error import TweepError from . api import API from . cache import Cache, MemoryCache, Fi...
08ecc9aaf3398a0dd69bf27fc65c8ca744f98e4b
Orange/tests/test_naive_bayes.py
Orange/tests/test_naive_bayes.py
import unittest import numpy as np from Orange import data import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers(1, 3, (nrows, ...
import unittest import numpy as np import Orange import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers(1, 3, (nrows, ncols)) ...
Improve naive bayes unit test.
Improve naive bayes unit test.
Python
bsd-2-clause
cheral/orange3,qusp/orange3,qPCR4vir/orange3,cheral/orange3,qusp/orange3,qusp/orange3,cheral/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,kwikadi/orange3,qPCR4vir/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,qPCR4vir/orange3,marinkaz/orange3,kwikadi/orange3,marinkaz/orange3,qPCR...
import unittest import numpy as np from Orange import data import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers(1, 3, (nrows, ...
import unittest import numpy as np import Orange import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers(1, 3, (nrows, ncols)) ...
<commit_before>import unittest import numpy as np from Orange import data import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers...
import unittest import numpy as np import Orange import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers(1, 3, (nrows, ncols)) ...
import unittest import numpy as np from Orange import data import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers(1, 3, (nrows, ...
<commit_before>import unittest import numpy as np from Orange import data import Orange.classification.naive_bayes as nb from Orange.evaluation import scoring, testing class NaiveBayesTest(unittest.TestCase): def test_NaiveBayes(self): nrows = 1000 ncols = 10 x = np.random.random_integers...
9704602f26b4a9aab15caf00795d283c5f6e4ae4
src/fiona/tool.py
src/fiona/tool.py
# The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', action='sto...
# The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', action='sto...
Change record output to strict GeoJSON.
Change record output to strict GeoJSON. Meaning features in a FeatureCollection.
Python
bsd-3-clause
rbuffat/Fiona,Toblerity/Fiona,sgillies/Fiona,johanvdw/Fiona,perrygeo/Fiona,Toblerity/Fiona,perrygeo/Fiona,rbuffat/Fiona
# The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', action='sto...
# The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', action='sto...
<commit_before># The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', ...
# The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', action='sto...
# The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', action='sto...
<commit_before># The Fiona data tool. if __name__ == '__main__': import argparse import fiona import json import pprint import sys parser = argparse.ArgumentParser( description="Serialize a file to GeoJSON or view its description") parser.add_argument('-i', '--info', ...