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
727f221767c662e95585f54e06c0c8b4e4a77d88
smartfile/exceptions.py
smartfile/exceptions.py
from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, ConnectionError): ...
from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, ConnectionError): ...
Handle responses without JSON or detail field
Handle responses without JSON or detail field Check the response for JSON and a detail field before trying to access them within SmartFileResponseException. This could occur if the server returns a 500.
Python
mit
smartfile/client-python
from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, ConnectionError): ...
from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, ConnectionError): ...
<commit_before>from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, Connect...
from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, ConnectionError): ...
from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, ConnectionError): ...
<commit_before>from requests.exceptions import ConnectionError class SmartFileException(Exception): pass class SmartFileConnException(SmartFileException): """ Exception for issues regarding a request. """ def __init__(self, exc, *args, **kwargs): self.exc = exc if isinstance(exc, Connect...
1364470725a55232556d8856be7eb910f3376fb3
permuta/misc/union_find.py
permuta/misc/union_find.py
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
Make UnionFind.unite return whether the operation was successful
Make UnionFind.unite return whether the operation was successful
Python
bsd-3-clause
PermutaTriangle/Permuta
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
<commit_before> class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a represent...
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
<commit_before> class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a represent...
c90e9798881630c2f956e08901f5bd35d948df6d
salt_observer/management/commands/fetchpackages.py
salt_observer/management/commands/fetchpackages.py
from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): print('Fetching ...
from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): packages = api.g...
Remove unwanted prints in management command
Remove unwanted prints in management command
Python
mit
hs-hannover/salt-observer,hs-hannover/salt-observer,hs-hannover/salt-observer
from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): print('Fetching ...
from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): packages = api.g...
<commit_before>from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): p...
from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): packages = api.g...
from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): print('Fetching ...
<commit_before>from django.core.management.base import BaseCommand from django.utils import timezone from salt_observer.models import Minion from . import ApiCommand import json class Command(ApiCommand, BaseCommand): help = 'Fetch and save new data from all servers' def save_packages(self, api): p...
fb488a27b16943709327c7a9f31c26aba418055f
lyricist/bsopener.py
lyricist/bsopener.py
from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): """ Contains...
from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): """ Contains...
Add handler for case of HTTP errors case.
Add handler for case of HTTP errors case. Added a try/catch to url requests to handle errors.
Python
mit
iluxonchik/lyricist
from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): """ Contains...
from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): """ Contains...
<commit_before>from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): ...
from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): """ Contains...
from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): """ Contains...
<commit_before>from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.request import Request from .const import constant class BSOpener(object): """ A wrapper arround urllib and BeautifulSoup used a helper for url requests """ # TODO: make this class a singleton class _Const(): ...
a39a91b406be3965addc613021f0c94007c42cf6
matchzoo/__init__.py
matchzoo/__init__.py
from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .utils import * f...
from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .utils import * f...
Add callbacks to matchzoo root scope.
Add callbacks to matchzoo root scope.
Python
apache-2.0
faneshion/MatchZoo,faneshion/MatchZoo
from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .utils import * f...
from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .utils import * f...
<commit_before>from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .u...
from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .utils import * f...
from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .utils import * f...
<commit_before>from pathlib import Path USER_DIR = Path.expanduser(Path('~')).joinpath('.matchzoo') if not USER_DIR.exists(): USER_DIR.mkdir() USER_DATA_DIR = USER_DIR.joinpath('datasets') if not USER_DATA_DIR.exists(): USER_DATA_DIR.mkdir() from .logger import logger from .version import __version__ from .u...
67c58e3941491d276318daf568354f1e17ef3892
omics/gsa/__init__.py
omics/gsa/__init__.py
"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollection
"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollect def enrichment(gene_list, gene_set, background, alternative="two-sided", verbose=True): """Gene set enrichment analysis by Fisher Exact Test. gene_list : query gene list gene_set : predefined gene set background : back...
Add enrichment function in gsa module
Add enrichment function in gsa module
Python
mit
choyichen/omics
"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollection Add enrichment function in gsa module
"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollect def enrichment(gene_list, gene_set, background, alternative="two-sided", verbose=True): """Gene set enrichment analysis by Fisher Exact Test. gene_list : query gene list gene_set : predefined gene set background : back...
<commit_before>"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollection <commit_msg>Add enrichment function in gsa module<commit_after>
"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollect def enrichment(gene_list, gene_set, background, alternative="two-sided", verbose=True): """Gene set enrichment analysis by Fisher Exact Test. gene_list : query gene list gene_set : predefined gene set background : back...
"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollection Add enrichment function in gsa module"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollect def enrichment(gene_list, gene_set, background, alternative="two-sided", verbose=True): """Gene set enrichment analysis b...
<commit_before>"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollection <commit_msg>Add enrichment function in gsa module<commit_after>"""Gene Set Analysis Module """ from GeneSetCollection import GeneSetCollect def enrichment(gene_list, gene_set, background, alternative="two-sided", verbose=Tru...
7818f9aa2d66ab0f4a99f731ecfb03e711e9ad6c
utils/send_messages.py
utils/send_messages.py
from django.conf import settings import requests def send_message_android(destination, title, message): headers = { 'Authorization': 'key=' + settings.FIREBASE_SERVER_KEY, 'Content - Type': 'application/json' } payload = { "to": destination, "notification": {"title": title,...
"""Push notification service send_message_android and send_message_ios are the same, but this is intentional, in order to support any future different conditions for both platforms, different keys or addtional parameters shit happens sometimes ROFL! """ from django.conf import settings from constance import config i...
Add send_push_notification function and separate android and ios functions
Add send_push_notification function and separate android and ios functions
Python
apache-2.0
belatrix/BackendAllStars
from django.conf import settings import requests def send_message_android(destination, title, message): headers = { 'Authorization': 'key=' + settings.FIREBASE_SERVER_KEY, 'Content - Type': 'application/json' } payload = { "to": destination, "notification": {"title": title,...
"""Push notification service send_message_android and send_message_ios are the same, but this is intentional, in order to support any future different conditions for both platforms, different keys or addtional parameters shit happens sometimes ROFL! """ from django.conf import settings from constance import config i...
<commit_before>from django.conf import settings import requests def send_message_android(destination, title, message): headers = { 'Authorization': 'key=' + settings.FIREBASE_SERVER_KEY, 'Content - Type': 'application/json' } payload = { "to": destination, "notification": {...
"""Push notification service send_message_android and send_message_ios are the same, but this is intentional, in order to support any future different conditions for both platforms, different keys or addtional parameters shit happens sometimes ROFL! """ from django.conf import settings from constance import config i...
from django.conf import settings import requests def send_message_android(destination, title, message): headers = { 'Authorization': 'key=' + settings.FIREBASE_SERVER_KEY, 'Content - Type': 'application/json' } payload = { "to": destination, "notification": {"title": title,...
<commit_before>from django.conf import settings import requests def send_message_android(destination, title, message): headers = { 'Authorization': 'key=' + settings.FIREBASE_SERVER_KEY, 'Content - Type': 'application/json' } payload = { "to": destination, "notification": {...
fc6b3df720ac05b715ae6478367f79e834c47c26
pi_broadcast_service/rabbit.py
pi_broadcast_service/rabbit.py
import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.channel() def s...
import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.channel() se...
Make sure the exchange is there first
Make sure the exchange is there first
Python
mit
projectweekend/Pi-Broadcast-Service
import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.channel() def s...
import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.channel() se...
<commit_before>import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.chann...
import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.channel() se...
import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.channel() def s...
<commit_before>import json import pika class Publisher(object): def __init__(self, rabbit_url, exchange): self._rabbit_url = rabbit_url self._exchange = exchange self._connection = pika.BlockingConnection(pika.URLParameters(self._rabbit_url)) self._channel = self._connection.chann...
02c74c5235b8ad821786213a3bcf5f824162454d
flax/linen/combinators.py
flax/linen/combinators.py
"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular module/op is the...
"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular module/op is the...
Include activations in Sequential example.
Include activations in Sequential example.
Python
apache-2.0
google/flax,google/flax
"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular module/op is the...
"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular module/op is the...
<commit_before>"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular m...
"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular module/op is the...
"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular module/op is the...
<commit_before>"""Combinators of modules, such as a Sequential.""" from typing import Callable, Sequence from flax.linen.module import Module class Sequential(Module): """Applies a linear chain of Modules. Meant to be used only for the simple case of fusing together callables where the input of a particular m...
0e6de6bc5890d6028a7115a62289bf26b0dd043b
hydra_agent/actions/server_conf.py
hydra_agent/actions/server_conf.py
# ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def set_server_conf(args = None): import simplejson as json data = json.loads(args.args) from hydra_agent.store import AgentStore AgentStore.set_server_conf(d...
# ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def _validate_conf(server_conf): from hydra_agent.main_loop import MainLoop result = MainLoop()._send_update(server_conf['url'], server_conf['token'], None, {}) if...
Test HTTP access to server before saving server config
Test HTTP access to server before saving server config
Python
mit
intel-hpdd/intel-manager-for-lustre,intel-hpdd/intel-manager-for-lustre,intel-hpdd/intel-manager-for-lustre
# ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def set_server_conf(args = None): import simplejson as json data = json.loads(args.args) from hydra_agent.store import AgentStore AgentStore.set_server_conf(d...
# ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def _validate_conf(server_conf): from hydra_agent.main_loop import MainLoop result = MainLoop()._send_update(server_conf['url'], server_conf['token'], None, {}) if...
<commit_before># ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def set_server_conf(args = None): import simplejson as json data = json.loads(args.args) from hydra_agent.store import AgentStore AgentStore.se...
# ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def _validate_conf(server_conf): from hydra_agent.main_loop import MainLoop result = MainLoop()._send_update(server_conf['url'], server_conf['token'], None, {}) if...
# ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def set_server_conf(args = None): import simplejson as json data = json.loads(args.args) from hydra_agent.store import AgentStore AgentStore.set_server_conf(d...
<commit_before># ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from hydra_agent.plugins import AgentPlugin def set_server_conf(args = None): import simplejson as json data = json.loads(args.args) from hydra_agent.store import AgentStore AgentStore.se...
60edf2f1534e02a6da9aa715662a0e4ea8922191
mk/get_config_dir.py
mk/get_config_dir.py
#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-rpm-buildroot"
#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-specs"
Change name of config repo for api-libs component
Change name of config repo for api-libs component Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849a287a@eu.citrix.com>
Python
lgpl-2.1
simonjbeaumont/planex,jonludlam/planex,euanh/planex-cleanhistory,jonludlam/planex,djs55/planex,djs55/planex,djs55/planex,simonjbeaumont/planex,jonludlam/planex,euanh/planex-cleanhistory,euanh/planex-cleanhistory,simonjbeaumont/planex
#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-rpm-buildroot" Change name of config repo for api-libs component Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849...
#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-specs"
<commit_before>#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-rpm-buildroot" <commit_msg>Change name of config repo for api-libs component Signed-off-by: Jon Ludlam <e7e33808...
#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-specs"
#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-rpm-buildroot" Change name of config repo for api-libs component Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849...
<commit_before>#!/usr/bin/env python import os component = os.getenv("COMPONENT") if component == "ocaml": print "/repos/xen-dist-ocaml.hg" if component == "api-libs": print "/repos/xen-api-libs-rpm-buildroot" <commit_msg>Change name of config repo for api-libs component Signed-off-by: Jon Ludlam <e7e33808...
0043fe9c8de4d8341afbcea388f472a50017de2c
jiradoc/__main__.py
jiradoc/__main__.py
# ------------------------------------------------------------ # __main__.py # # The main program which expects a jiradoc formatted file to # be passed in as a cmdline option. It reads the file and # parses its content to Story objects. # ------------------------------------------------------------ import argparse impo...
# ------------------------------------------------------------ # __main__.py # # The main program # ------------------------------------------------------------ import argparse import os import pkg_resources import sys from jiradoc.parser.parser import parser as jiradoc_parser def main(args=None): parser = argpa...
Validate that the input file ends with .jiradoc
Validate that the input file ends with .jiradoc
Python
mit
lucianovdveekens/jiradoc
# ------------------------------------------------------------ # __main__.py # # The main program which expects a jiradoc formatted file to # be passed in as a cmdline option. It reads the file and # parses its content to Story objects. # ------------------------------------------------------------ import argparse impo...
# ------------------------------------------------------------ # __main__.py # # The main program # ------------------------------------------------------------ import argparse import os import pkg_resources import sys from jiradoc.parser.parser import parser as jiradoc_parser def main(args=None): parser = argpa...
<commit_before># ------------------------------------------------------------ # __main__.py # # The main program which expects a jiradoc formatted file to # be passed in as a cmdline option. It reads the file and # parses its content to Story objects. # ------------------------------------------------------------ impor...
# ------------------------------------------------------------ # __main__.py # # The main program # ------------------------------------------------------------ import argparse import os import pkg_resources import sys from jiradoc.parser.parser import parser as jiradoc_parser def main(args=None): parser = argpa...
# ------------------------------------------------------------ # __main__.py # # The main program which expects a jiradoc formatted file to # be passed in as a cmdline option. It reads the file and # parses its content to Story objects. # ------------------------------------------------------------ import argparse impo...
<commit_before># ------------------------------------------------------------ # __main__.py # # The main program which expects a jiradoc formatted file to # be passed in as a cmdline option. It reads the file and # parses its content to Story objects. # ------------------------------------------------------------ impor...
af2c9647e64ad0e0575b191e35e38f8bf23ed6f8
config.py
config.py
### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('NFL') def configure(advanced): # This will be called by supybot to co...
### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced #...
Remove internationalization because its not needed.
Remove internationalization because its not needed.
Python
mit
cottongin/NFL,fasteddie2/NFL,reticulatingspline/NFL
### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('NFL') def configure(advanced): # This will be called by supybot to co...
### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced #...
<commit_before>### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('NFL') def configure(advanced): # This will be called b...
### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced #...
### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('NFL') def configure(advanced): # This will be called by supybot to co...
<commit_before>### # Copyright (c) 2012-2013, spline # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('NFL') def configure(advanced): # This will be called b...
91c35078c7a8aad153d9aabe0b02fc3c48cfc76a
hesiod.py
hesiod.py
#!/usr/bin/env python from _hesiod import bind, resolve
#!/usr/bin/env python """ Present both functional and object-oriented interfaces for executing lookups in Hesiod, Project Athena's service name resolution protocol. """ from _hesiod import bind, resolve from pwd import struct_passwd class HesiodParseError(Exception): pass class Lookup(object): """ A Ge...
Add object-oriented-style lookups for filsys, passwd, and uid lookups
Add object-oriented-style lookups for filsys, passwd, and uid lookups The filsys entry parsing code is taken from pyHesiodFS and was explicitly relicensed under the MIT license by Quentin Smith <quentin@mit.edu>
Python
mit
ebroder/python-hesiod
#!/usr/bin/env python from _hesiod import bind, resolve Add object-oriented-style lookups for filsys, passwd, and uid lookups The filsys entry parsing code is taken from pyHesiodFS and was explicitly relicensed under the MIT license by Quentin Smith <quentin@mit.edu>
#!/usr/bin/env python """ Present both functional and object-oriented interfaces for executing lookups in Hesiod, Project Athena's service name resolution protocol. """ from _hesiod import bind, resolve from pwd import struct_passwd class HesiodParseError(Exception): pass class Lookup(object): """ A Ge...
<commit_before>#!/usr/bin/env python from _hesiod import bind, resolve <commit_msg>Add object-oriented-style lookups for filsys, passwd, and uid lookups The filsys entry parsing code is taken from pyHesiodFS and was explicitly relicensed under the MIT license by Quentin Smith <quentin@mit.edu><commit_after>
#!/usr/bin/env python """ Present both functional and object-oriented interfaces for executing lookups in Hesiod, Project Athena's service name resolution protocol. """ from _hesiod import bind, resolve from pwd import struct_passwd class HesiodParseError(Exception): pass class Lookup(object): """ A Ge...
#!/usr/bin/env python from _hesiod import bind, resolve Add object-oriented-style lookups for filsys, passwd, and uid lookups The filsys entry parsing code is taken from pyHesiodFS and was explicitly relicensed under the MIT license by Quentin Smith <quentin@mit.edu>#!/usr/bin/env python """ Present both functional ...
<commit_before>#!/usr/bin/env python from _hesiod import bind, resolve <commit_msg>Add object-oriented-style lookups for filsys, passwd, and uid lookups The filsys entry parsing code is taken from pyHesiodFS and was explicitly relicensed under the MIT license by Quentin Smith <quentin@mit.edu><commit_after>#!/usr/bin...
637c19a54c6bee656ba3effd9316ad3d5587a963
src/dynmen/__init__.py
src/dynmen/__init__.py
# -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the repository for more e...
# -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the repository for more e...
Add docstrings to dynmen.new_dmenu and dynmen.new_rofi
Add docstrings to dynmen.new_dmenu and dynmen.new_rofi
Python
mit
frostidaho/dynmen
# -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the repository for more e...
# -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the repository for more e...
<commit_before># -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the reposi...
# -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the repository for more e...
# -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the repository for more e...
<commit_before># -*- coding: utf-8 -*- """ dynmen - A simple python interface to dynamic menus like dmenu or rofi import dynmen menu = dynmen.Menu(['dmenu', '-fn', 'Sans-30']) output = menu({'a': 1, 'b': 2, 'c': 3}) You can make the menu non-blocking by setting: menu.process_mode = 'futures' Please see the reposi...
968ef4bfb57743328587f9f693a7c531e20cbce0
go_cli/tests/test_main.py
go_cli/tests/test_main.py
""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) self.asse...
""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) self.asse...
Check that export-contacts is included in the top-level command.
Check that export-contacts is included in the top-level command.
Python
bsd-3-clause
praekelt/go-cli,praekelt/go-cli
""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) self.asse...
""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) self.asse...
<commit_before>""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) ...
""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) self.asse...
""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) self.asse...
<commit_before>""" Tests for go_cli.main. """ from unittest import TestCase from click.testing import CliRunner from go_cli.main import cli class TestCli(TestCase): def test_help(self): runner = CliRunner() result = runner.invoke(cli, ['--help']) self.assertEqual(result.exit_code, 0) ...
c3b743b6dc757db4f2e063af8fa9ad6b228b3dcb
savate/buffer_event.py
savate/buffer_event.py
# -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): def __init__(sel...
# -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): def __init__(sel...
Use regular send() instead of our writev()
Use regular send() instead of our writev() Buffering is apparently more rewarding performance-wise than using zero-copy vectorised I/O ala writev(), hence there's no point to keep using our homemade write() extension.
Python
agpl-3.0
noirbee/savate,noirbee/savate
# -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): def __init__(sel...
# -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): def __init__(sel...
<commit_before># -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): d...
# -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): def __init__(sel...
# -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): def __init__(sel...
<commit_before># -*- coding: utf-8 -*- import errno import collections from savate import writev # FIXME: should this be a method of BufferEvent below ? # FIXME: handle Python2.x/Python3k compat here def buffer_slice(buff, offset, size): return buffer(buff, offset, size) class BufferOutputHandler(object): d...
ea9273ba54dc502327bcca8b233e8d338aaa0d43
pombola/south_africa/management/commands/south_africa_create_new_parties_for_election_2019.py
pombola/south_africa/management/commands/south_africa_create_new_parties_for_election_2019.py
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handl...
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handl...
Move party name to defaults argument
[ZA] Move party name to defaults argument Some party names have changed, but the slug remains the same, so to avoid errors move the name to the defaults sections so it's not checked for existing parties.
Python
agpl-3.0
mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handl...
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handl...
<commit_before>import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections"...
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handl...
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handl...
<commit_before>import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections"...
d51fcb604f9e4a0f9b7d4178d4c85209594afbde
dataset/types.py
dataset/types.py
from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integer string =...
from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integer string =...
Replace `cls` argument with `self` Not sure if this was originally intended to be a `@classmethod` but it's now written and called as a method bound to an instance of the class.
Replace `cls` argument with `self` Not sure if this was originally intended to be a `@classmethod` but it's now written and called as a method bound to an instance of the class.
Python
mit
pudo/dataset
from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integer string =...
from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integer string =...
<commit_before>from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integ...
from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integer string =...
from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integer string =...
<commit_before>from datetime import datetime, date from sqlalchemy import Integer, UnicodeText, Float, BigInteger from sqlalchemy import Boolean, Date, DateTime, Unicode from sqlalchemy.types import TypeEngine class Types(object): """A holder class for easy access to SQLAlchemy type names.""" integer = Integ...
4e63db0d699eeb7a313708f82c129637222e1014
src/penn_chime/utils.py
src/penn_chime/utils.py
"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe to a base64-encoded CSV representation of that data. This is useful for building datauris for use to download the data in the browser. Arguments: df: The data...
"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe into csv base64-encoded data. This is useful for building datauris for use to download the data in the browser. Arguments: df: The dataframe to convert ""...
Update excel_to_base64 to always close file handles
Update excel_to_base64 to always close file handles
Python
mit
CodeForPhilly/chime,CodeForPhilly/chime,CodeForPhilly/chime
"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe to a base64-encoded CSV representation of that data. This is useful for building datauris for use to download the data in the browser. Arguments: df: The data...
"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe into csv base64-encoded data. This is useful for building datauris for use to download the data in the browser. Arguments: df: The dataframe to convert ""...
<commit_before>"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe to a base64-encoded CSV representation of that data. This is useful for building datauris for use to download the data in the browser. Arguments: ...
"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe into csv base64-encoded data. This is useful for building datauris for use to download the data in the browser. Arguments: df: The dataframe to convert ""...
"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe to a base64-encoded CSV representation of that data. This is useful for building datauris for use to download the data in the browser. Arguments: df: The data...
<commit_before>"""Utils.""" from base64 import b64encode import pandas as pd def dataframe_to_base64(df: pd.DataFrame) -> str: """Converts a dataframe to a base64-encoded CSV representation of that data. This is useful for building datauris for use to download the data in the browser. Arguments: ...
e14ca7e0a71e558ae9d8327248012d8109f9e0c5
needlestack/base.py
needlestack/base.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) self.options = kwargs def set_name(self, name): self.name...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) for name, value in kwargs.items(): setattr(self, name, val...
Add type addaptation methods for generic field class.
Add type addaptation methods for generic field class.
Python
bsd-3-clause
niwinz/needlestack
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) self.options = kwargs def set_name(self, name): self.name...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) for name, value in kwargs.items(): setattr(self, name, val...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) self.options = kwargs def set_name(self, name): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) for name, value in kwargs.items(): setattr(self, name, val...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) self.options = kwargs def set_name(self, name): self.name...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import class SearchBackend(object): pass class Field(object): """ Base class for any field. """ name = None def __init__(self, **kwargs) self.options = kwargs def set_name(self, name): ...
b0961ac53a75ff3745d2297de80748f90c823827
pajbot/migration/db.py
pajbot/migration/db.py
from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABLE IF NOT EXISTS...
from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABLE IF NOT EXISTS...
Change definition of schema_version table
Change definition of schema_version table
Python
mit
pajlada/tyggbot,pajlada/tyggbot,pajlada/tyggbot,pajlada/tyggbot,pajlada/pajbot,pajlada/pajbot,pajlada/pajbot,pajlada/pajbot
from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABLE IF NOT EXISTS...
from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABLE IF NOT EXISTS...
<commit_before>from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABL...
from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABLE IF NOT EXISTS...
from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABLE IF NOT EXISTS...
<commit_before>from contextlib import contextmanager class DatabaseMigratable: def __init__(self, conn): self.conn = conn @contextmanager def create_resource(self): with self.conn.cursor() as cursor: # begins a transaction automatically cursor.execute("CREATE TABL...
6f6d1a7146020121a98ba6bb6cfa718686fc2a8d
ffflash/lib/api.py
ffflash/lib/api.py
from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: if isinstance(c,...
from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: if isinstance(c, dict) and f in c.keys()...
Fix double indentation error in FFApi class
Fix double indentation error in FFApi class
Python
bsd-3-clause
spookey/ffflash,spookey/ffflash
from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: if isinstance(c,...
from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: if isinstance(c, dict) and f in c.keys()...
<commit_before>from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: i...
from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: if isinstance(c, dict) and f in c.keys()...
from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: if isinstance(c,...
<commit_before>from datetime import datetime from pprint import pformat from re import search as re_search from re import sub as re_sub class FFApi: def __init__(self, content): self.c = content def pull(self, *fields): c = self.c for f in fields: i...
786d1ee8f58c95ab3d27d06bda2ec593cadef48e
apps/videos/tests/__init__.py
apps/videos/tests/__init__.py
from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tests.rpc import *...
from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tests.rpc import *...
Remove the syncing tests from the list.
Remove the syncing tests from the list.
Python
agpl-3.0
ReachingOut/unisubs,ofer43211/unisubs,ofer43211/unisubs,ReachingOut/unisubs,ujdhesa/unisubs,norayr/unisubs,wevoice/wesub,norayr/unisubs,eloquence/unisubs,wevoice/wesub,pculture/unisubs,ofer43211/unisubs,eloquence/unisubs,wevoice/wesub,norayr/unisubs,ujdhesa/unisubs,pculture/unisubs,eloquence/unisubs,ujdhesa/unisubs,wev...
from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tests.rpc import *...
from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tests.rpc import *...
<commit_before>from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tes...
from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tests.rpc import *...
from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tests.rpc import *...
<commit_before>from apps.videos.tests.celery_tasks import * from apps.videos.tests.downloads import * from apps.videos.tests.feeds import * from apps.videos.tests.following import * from apps.videos.tests.forms import * from apps.videos.tests.metadata import * from apps.videos.tests.models import * from apps.videos.tes...
980aaa340a03353742d03be2844d4ceb829715c0
numpy/core/__init__.py
numpy/core/__init__.py
from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchararray as char import records as rec fro...
from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import _internal # for freeze programs import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchar...
Add an dummy import statement so that freeze programs pick up _internal.p
Add an dummy import statement so that freeze programs pick up _internal.p git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@3807 94b884b6-d6fd-0310-90d3-974f1d3f35e1
Python
bsd-3-clause
teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,illume/numpy3k,teoliphant/numpy-refactor,illume/numpy3k,efiring/numpy-work,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,Ademan/NumPy-GSoC,chadnetzer/numpy-gaurdro,efiring/numpy-work,teoliphant/numpy-refactor,Ademan/NumPy-GSoC,Ademan/NumPy-GSoC,jasonm...
from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchararray as char import records as rec fro...
from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import _internal # for freeze programs import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchar...
<commit_before> from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchararray as char import rec...
from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import _internal # for freeze programs import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchar...
from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchararray as char import records as rec fro...
<commit_before> from info import __doc__ from numpy.version import version as __version__ import multiarray import umath import numerictypes as nt multiarray.set_typeDict(nt.sctypeDict) import _sort from numeric import * from fromnumeric import * from defmatrix import * import ma import defchararray as char import rec...
4aa979273bfe698459d9a8066ee41741c3a68e3d
megamix/__init__.py
megamix/__init__.py
# Module of Gaussian Mixture models for python __all__ = ['batch','online']
# Module of Gaussian Mixture models for python import megamix.batch import megamix.online __all__ = ['batch','online']
Solve minor import problems with submodules
Solve minor import problems with submodules
Python
apache-2.0
14thibea/megamix
# Module of Gaussian Mixture models for python __all__ = ['batch','online']Solve minor import problems with submodules
# Module of Gaussian Mixture models for python import megamix.batch import megamix.online __all__ = ['batch','online']
<commit_before> # Module of Gaussian Mixture models for python __all__ = ['batch','online']<commit_msg>Solve minor import problems with submodules<commit_after>
# Module of Gaussian Mixture models for python import megamix.batch import megamix.online __all__ = ['batch','online']
# Module of Gaussian Mixture models for python __all__ = ['batch','online']Solve minor import problems with submodules # Module of Gaussian Mixture models for python import megamix.batch import megamix.online __all__ = ['batch','online']
<commit_before> # Module of Gaussian Mixture models for python __all__ = ['batch','online']<commit_msg>Solve minor import problems with submodules<commit_after> # Module of Gaussian Mixture models for python import megamix.batch import megamix.online __all__ = ['batch','online']
525441540306cb2ac385b0f633681e24587117dc
gdx2py/__init__.py
gdx2py/__init__.py
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2'
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' from .gdxfile import GdxFile
Revert "Fixed bug with imports"
Revert "Fixed bug with imports" This reverts commit 7b63b268a002a0ceb0b7bb2c6c57237bf6d5f25b.
Python
mit
ererkka/GDX2py
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' Revert "Fixed bug with imports" This reverts commit 7b63b268a002a0ceb0b7bb2c6c57237bf6d5f25b.
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' from .gdxfile import GdxFile
<commit_before># -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' <commit_msg>Revert "Fixed bug with imports" This reverts commit 7b63b268a002a0ceb0b7bb2c6c57237bf6d5f25b.<commit_after>
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' from .gdxfile import GdxFile
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' Revert "Fixed bug with imports" This reverts commit 7b63b268a002a0ceb0b7bb2c6c57237bf6d5f25b.# -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' from .g...
<commit_before># -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: ererkka """ __version__ = '1.2.2' <commit_msg>Revert "Fixed bug with imports" This reverts commit 7b63b268a002a0ceb0b7bb2c6c57237bf6d5f25b.<commit_after># -*- coding: utf-8 -*- """ Created on Wed Feb 24 11:01:10 2016 @author: er...
b63ee83574605e79075ee834d2418cd58b722bc6
docs/tests.py
docs/tests.py
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
Add test case for resources docs page
Add test case for resources docs page
Python
mit
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
<commit_before>from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.sta...
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.status_code, 200) ...
<commit_before>from django.test import Client, TestCase from django.core.urlresolvers import reverse import views class DocsTestCase(TestCase): def setUp(self): self.client = Client() def test_index(self): response = self.client.get(reverse(views.index)) self.assertEqual(response.sta...
56f7646413de01cb45825b30586231cf3ecbd43c
tests/test_flask_get.py
tests/test_flask_get.py
import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): """R...
import json import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): ...
Make this test a bit harder.
Make this test a bit harder.
Python
mit
jwg4/flask-autodoc,jwg4/flask-autodoc
import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): """R...
import json import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): ...
<commit_before>import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): ...
import json import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): ...
import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): """R...
<commit_before>import unittest from flask import Flask from flask.ext.autodoc import Autodoc class TestAutodocWithFlask(unittest.TestCase): def setUp(self): self.app = Flask(__name__) self.autodoc = Autodoc(self.app) @self.app.route('/') @self.autodoc.doc() def index(): ...
1ac385de638854cad1095a3f81a63ecf45fa60ae
organizer/models.py
organizer/models.py
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
Declare Meta class in NewsLink model.
Ch03: Declare Meta class in NewsLink model. [skip ci]
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
<commit_before>from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label for URL config...
<commit_before>from django.db import models # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Tag(models.Model): name = models.CharField( max_length=31, unique=True) slug = models.SlugField( max_length=31, unique=True, help_text='A label...
bf09097e66c02764d81516a4161ca607ccbd0bb5
lfs/other_translations.py
lfs/other_translations.py
def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth")
def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street / No') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth")
Add house number to street label within address form
Add house number to street label within address form
Python
bsd-3-clause
diefenbach/django-lfs,diefenbach/django-lfs,diefenbach/django-lfs
def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth") Add house number to street label within address form
def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street / No') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth")
<commit_before>def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth") <commit_msg>Add house number to street label within address form<commit_a...
def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street / No') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth")
def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth") Add house number to street label within address formdef _(): return 1 _(u'Price ex...
<commit_before>def _(): return 1 _(u'Price excludes tax') _(u'Price includes tax') _(u'Street') _(u'Left') _(u'Right') _(u'Average Rating') _(u'Zip Code') _(u'Last Order Number') _(u'Format') _(u"Cart Price") _(u"Combined Length and Girth") <commit_msg>Add house number to street label within address form<commit_a...
f317f946f9f17cbaf162b12c8770908abba5bbeb
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an interface to cpp...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an interface to cpp...
Change on the regex variable such that it distinguish warnings from errors.
Change on the regex variable such that it distinguish warnings from errors.
Python
mit
SublimeLinter/SublimeLinter-cppcheck,ftoulemon/SublimeLinter-cppcheck
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an interface to cpp...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an interface to cpp...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an i...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an interface to cpp...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an interface to cpp...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cppcheck plugin class.""" from SublimeLinter.lint import Linter, util class Cppcheck(Linter): """Provides an i...
f8c440d849a794298f119735ebe10290fc66f2ec
mopidy/__main__.py
mopidy/__main__.py
import asyncore import logging import multiprocessing import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getLogger('mopidy.ma...
import asyncore import logging import multiprocessing import optparse import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getL...
Add -v and -q options for more or less output
Add -v and -q options for more or less output
Python
apache-2.0
jodal/mopidy,tkem/mopidy,jodal/mopidy,swak/mopidy,pacificIT/mopidy,tkem/mopidy,adamcik/mopidy,jcass77/mopidy,jmarsik/mopidy,adamcik/mopidy,ali/mopidy,jmarsik/mopidy,pacificIT/mopidy,swak/mopidy,jmarsik/mopidy,hkariti/mopidy,quartz55/mopidy,rawdlite/mopidy,mokieyue/mopidy,ZenithDK/mopidy,bencevans/mopidy,SuperStarPL/mop...
import asyncore import logging import multiprocessing import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getLogger('mopidy.ma...
import asyncore import logging import multiprocessing import optparse import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getL...
<commit_before>import asyncore import logging import multiprocessing import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getLo...
import asyncore import logging import multiprocessing import optparse import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getL...
import asyncore import logging import multiprocessing import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getLogger('mopidy.ma...
<commit_before>import asyncore import logging import multiprocessing import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from mopidy import settings, SettingsError from mopidy.process import CoreProcess from mopidy.utils import get_class logger = logging.getLo...
a521c4a4a55437452a4a7d006ec8faea0521ea05
capstone/rl/learners/sarsa.py
capstone/rl/learners/sarsa.py
from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, random_state=None): ...
from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, random_state=None): ...
Create tabular q-function with kwarg random_state
Create tabular q-function with kwarg random_state
Python
mit
davidrobles/mlnd-capstone-code
from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, random_state=None): ...
from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, random_state=None): ...
<commit_before>from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, rando...
from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, random_state=None): ...
from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, random_state=None): ...
<commit_before>from ..learner import Learner from ..policies import RandomPolicy from ..value_functions import TabularQ from ...utils import check_random_state class Sarsa(Learner): def __init__(self, env, policy=None, learning_rate=0.1, discount_factor=0.99, n_episodes=1000, verbose=True, rando...
b388722fcc70d2787b91b5a4492cb9659cea7a42
parsl/providers/torque/template.py
parsl/providers/torque/template.py
template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -k eo #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} ${worker_init} ...
template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} ${worker_init} export JOBN...
Remove line which was preventing stdout redirect
Remove line which was preventing stdout redirect I think this line tries to send stdout and stderr to the same file. I'm not really sure why removing it causes the later specification of the stdout and stderr lines to be respected, but we don't want them in the same file in any case. Fixes #647.
Python
apache-2.0
Parsl/parsl,Parsl/parsl,Parsl/parsl,swift-lang/swift-e-lab,swift-lang/swift-e-lab,Parsl/parsl
template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -k eo #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} ${worker_init} ...
template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} ${worker_init} export JOBN...
<commit_before>template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -k eo #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} $...
template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} ${worker_init} export JOBN...
template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -k eo #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} ${worker_init} ...
<commit_before>template_string = '''#!/bin/bash #PBS -S /bin/bash #PBS -N ${jobname} #PBS -m n #PBS -k eo #PBS -l walltime=$walltime #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node} #PBS -o ${submit_script_dir}/${jobname}.submit.stdout #PBS -e ${submit_script_dir}/${jobname}.submit.stderr ${scheduler_options} $...
3b83e983f1e7cd3a0866109c66dd91903db87fa1
goodtablesio/integrations/github/tasks/repos.py
goodtablesio/integrations/github/tasks/repos.py
import datetime from goodtablesio.models.user import User from goodtablesio.models.source import Source from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='goodtablesio.github.sync...
import datetime from goodtablesio.models.user import User from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.models.repo import GithubRepo from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='go...
Use own model class on github task
Use own model class on github task
Python
agpl-3.0
frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io
import datetime from goodtablesio.models.user import User from goodtablesio.models.source import Source from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='goodtablesio.github.sync...
import datetime from goodtablesio.models.user import User from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.models.repo import GithubRepo from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='go...
<commit_before>import datetime from goodtablesio.models.user import User from goodtablesio.models.source import Source from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='goodtable...
import datetime from goodtablesio.models.user import User from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.models.repo import GithubRepo from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='go...
import datetime from goodtablesio.models.user import User from goodtablesio.models.source import Source from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='goodtablesio.github.sync...
<commit_before>import datetime from goodtablesio.models.user import User from goodtablesio.models.source import Source from goodtablesio.services import database from goodtablesio.celery_app import celery_app from goodtablesio.integrations.github.utils.repos import iter_repos_by_token @celery_app.task(name='goodtable...
274a1b43a57f838f078d11ef71803d46f8fd34bf
perfect-numbers/perfect_numbers.py
perfect-numbers/perfect_numbers.py
def divisor_generator(n): big_factors = {1} for i in range(2, n): if i in big_factors: break if n % i == 0: big_factors.add(n // i) yield i yield from big_factors def is_perfect(n): return n == sum(divisor_generator(n))
from math import sqrt, ceil def divisor_generator(n): yield 1 for i in range(2, ceil(sqrt(n))): if n % i == 0: yield i yield n // i def is_perfect(n): return n == sum(divisor_generator(n))
Refactor to give faster solution
Refactor to give faster solution
Python
agpl-3.0
CubicComet/exercism-python-solutions
def divisor_generator(n): big_factors = {1} for i in range(2, n): if i in big_factors: break if n % i == 0: big_factors.add(n // i) yield i yield from big_factors def is_perfect(n): return n == sum(divisor_generator(n)) Refactor to give faster soluti...
from math import sqrt, ceil def divisor_generator(n): yield 1 for i in range(2, ceil(sqrt(n))): if n % i == 0: yield i yield n // i def is_perfect(n): return n == sum(divisor_generator(n))
<commit_before>def divisor_generator(n): big_factors = {1} for i in range(2, n): if i in big_factors: break if n % i == 0: big_factors.add(n // i) yield i yield from big_factors def is_perfect(n): return n == sum(divisor_generator(n)) <commit_msg>Ref...
from math import sqrt, ceil def divisor_generator(n): yield 1 for i in range(2, ceil(sqrt(n))): if n % i == 0: yield i yield n // i def is_perfect(n): return n == sum(divisor_generator(n))
def divisor_generator(n): big_factors = {1} for i in range(2, n): if i in big_factors: break if n % i == 0: big_factors.add(n // i) yield i yield from big_factors def is_perfect(n): return n == sum(divisor_generator(n)) Refactor to give faster soluti...
<commit_before>def divisor_generator(n): big_factors = {1} for i in range(2, n): if i in big_factors: break if n % i == 0: big_factors.add(n // i) yield i yield from big_factors def is_perfect(n): return n == sum(divisor_generator(n)) <commit_msg>Ref...
9fe93f19c38ea1e41ce7bfe5aca8ec9327b195b5
test/test_reqmodules.py
test/test_reqmodules.py
import tserver, sys, md5, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(md5.new(k).hexdigest(), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inputs = [1, 485, 3...
import tserver, sys, base64, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(base64.encodestring(k), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inputs = [1, 485...
Use the base64 module for testing rather than md5 which is deprecated in python2.6
Use the base64 module for testing rather than md5 which is deprecated in python2.6
Python
bsd-3-clause
ErikDubbelboer/disco,beni55/disco,ErikDubbelboer/disco,beni55/disco,pombredanne/disco,scrapinghub/disco,scrapinghub/disco,pombredanne/disco,ErikDubbelboer/disco,seabirdzh/disco,pooya/disco,ErikDubbelboer/disco,discoproject/disco,pombredanne/disco,mwilliams3/disco,simudream/disco,discoproject/disco,mwilliams3/disco,ktkt...
import tserver, sys, md5, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(md5.new(k).hexdigest(), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inputs = [1, 485, 3...
import tserver, sys, base64, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(base64.encodestring(k), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inputs = [1, 485...
<commit_before> import tserver, sys, md5, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(md5.new(k).hexdigest(), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inpu...
import tserver, sys, base64, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(base64.encodestring(k), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inputs = [1, 485...
import tserver, sys, md5, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(md5.new(k).hexdigest(), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inputs = [1, 485, 3...
<commit_before> import tserver, sys, md5, math from disco import Disco, result_iterator def data_gen(path): return path[1:] + "\n" def fun_map(e, params): k = str(int(math.ceil(float(e))) ** 2) return [(md5.new(k).hexdigest(), "")] tserver.run_server(data_gen) disco = Disco(sys.argv[1]) inpu...
49a2502043e1d7ad5f3907779be7815a39ad85c7
awx/main/models/activity_stream.py
awx/main/models/activity_stream.py
# Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' OPERATION_CHOICES = [ ('create', _('Entity Created')), ('update', _("Entity Updated")), ...
# Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models from django.utils.translation import ugettext_lazy as _ class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' class Meta: app_label = 'main' OPERATION_...
Fix up some issues with supporting schema migration
Fix up some issues with supporting schema migration
Python
apache-2.0
wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx
# Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' OPERATION_CHOICES = [ ('create', _('Entity Created')), ('update', _("Entity Updated")), ...
# Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models from django.utils.translation import ugettext_lazy as _ class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' class Meta: app_label = 'main' OPERATION_...
<commit_before># Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' OPERATION_CHOICES = [ ('create', _('Entity Created')), ('update', _("Entity Upda...
# Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models from django.utils.translation import ugettext_lazy as _ class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' class Meta: app_label = 'main' OPERATION_...
# Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' OPERATION_CHOICES = [ ('create', _('Entity Created')), ('update', _("Entity Updated")), ...
<commit_before># Copyright (c) 2013 AnsibleWorks, Inc. # All Rights Reserved. from django.db import models class ActivityStream(models.Model): ''' Model used to describe activity stream (audit) events ''' OPERATION_CHOICES = [ ('create', _('Entity Created')), ('update', _("Entity Upda...
5fe73f508d87018db1d6f574cd22d76b46cbe862
events/api.py
events/api.py
''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allowed_methods = ['...
''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allowed_methods = ['...
Fix the event APIv2 to account for retrieval of a single event.
Fix the event APIv2 to account for retrieval of a single event.
Python
bsd-3-clause
alonisser/Open-Knesset,OriHoch/Open-Knesset,habeanf/Open-Knesset,daonb/Open-Knesset,otadmor/Open-Knesset,navotsil/Open-Knesset,MeirKriheli/Open-Knesset,DanaOshri/Open-Knesset,Shrulik/Open-Knesset,daonb/Open-Knesset,otadmor/Open-Knesset,habeanf/Open-Knesset,DanaOshri/Open-Knesset,Shrulik/Open-Knesset,daonb/Open-Knesset,...
''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allowed_methods = ['...
''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allowed_methods = ['...
<commit_before>''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allow...
''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allowed_methods = ['...
''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allowed_methods = ['...
<commit_before>''' Api for the events app ''' import datetime from models import Event from tastypie.utils import trailing_slash from apis.resources.base import BaseResource from django.conf.urls.defaults import url class EventResource(BaseResource): class Meta: queryset = Event.objects.all() allow...
2d7c7872bb030a280de6047a609d14560ff7e29f
fabfile/eg.py
fabfile/eg.py
from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd(PWD): ...
from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd(PWD): ...
Patch mnist example to specify theano for keras.
Patch mnist example to specify theano for keras.
Python
mit
spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc
from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd(PWD): ...
from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd(PWD): ...
<commit_before>from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd...
from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd(PWD): ...
from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd(PWD): ...
<commit_before>from fabric.api import task, local, run, lcd, cd, env from os.path import exists as file_exists from fabtools.python import virtualenv from os import path PWD = path.join(path.dirname(__file__), '..') VENV_DIR = path.join(PWD, '.env') @task def mnist(): with virtualenv(VENV_DIR): with lcd...
81cd919f4f85f2d26d89006234d608aebe8a8047
plugins/clue/clue.py
plugins/clue/clue.py
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} def process_message(data): channel = data['channel'] if channel not in state.keys(): state[channel] = {'count': 0, 'clue': ''} st = state[channel] ...
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} class ClueState: def __init__(self): self.count = 0 self.clue = '' def process_message(data): channel = data['channel'] if channel not in sta...
Switch to a ClueState class instead of just a dictionary
Switch to a ClueState class instead of just a dictionary This makes the syntax a little easier to read, (such as "st.count" instead of "st['count']").
Python
mit
cworth-gh/stony
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} def process_message(data): channel = data['channel'] if channel not in state.keys(): state[channel] = {'count': 0, 'clue': ''} st = state[channel] ...
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} class ClueState: def __init__(self): self.count = 0 self.clue = '' def process_message(data): channel = data['channel'] if channel not in sta...
<commit_before>from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} def process_message(data): channel = data['channel'] if channel not in state.keys(): state[channel] = {'count': 0, 'clue': ''} st = sta...
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} class ClueState: def __init__(self): self.count = 0 self.clue = '' def process_message(data): channel = data['channel'] if channel not in sta...
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} def process_message(data): channel = data['channel'] if channel not in state.keys(): state[channel] = {'count': 0, 'clue': ''} st = state[channel] ...
<commit_before>from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] state = {} def process_message(data): channel = data['channel'] if channel not in state.keys(): state[channel] = {'count': 0, 'clue': ''} st = sta...
1f3e42047a67001719220a5a42fe0c5f51d2b740
Demo/sockets/echosvr.py
Demo/sockets/echosvr.py
#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + ...
#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + ...
Change listen(0) to listen(1) for Solaris 2 sockets
Change listen(0) to listen(1) for Solaris 2 sockets
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + ...
#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + ...
<commit_before>#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_...
#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + ...
#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + ...
<commit_before>#! /usr/local/bin/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_...
2f968509be6ae8e3bcd15d0f46ebc3ba290ca086
astroplan/exceptions.py
astroplan/exceptions.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
Make all astroplan warnings decend from an AstroplanWarning
Make all astroplan warnings decend from an AstroplanWarning
Python
bsd-3-clause
StuartLittlefair/astroplan
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEar...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEarthOrientationDa...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.utils.exceptions import AstropyWarning __all__ = ["TargetAlwaysUpWarning", "TargetNeverUpWarning", "OldEar...
5b00b6cd392a1f5f317cc18893198bb5d62c565d
pystache/parsed.py
pystache/parsed.py
# coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` method that accepts ...
# coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` method that accepts ...
Rename variable name from "val" to "node".
Rename variable name from "val" to "node".
Python
mit
charbeljc/pystache,nitish116/pystache,defunkt/pystache,harsh00008/pystache,rismalrv/pystache,nitish116/pystache,arlenesr28/pystache,nitish116/pystache,rismalrv/pystache,charbeljc/pystache,arlenesr28/pystache,harsh00008/pystache,beni55/pystache,harsh00008/pystache,jrnold/pystache,rismalrv/pystache,jrnold/pystache,arlene...
# coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` method that accepts ...
# coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` method that accepts ...
<commit_before># coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` metho...
# coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` method that accepts ...
# coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` method that accepts ...
<commit_before># coding: utf-8 """ Exposes a class that represents a parsed (or compiled) template. """ class ParsedTemplate(object): """ Represents a parsed or compiled template. An instance wraps a list of unicode strings and node objects. A node object must have a `render(engine, stack)` metho...
336edeebe5ac04df719569efa40e2fef01a2dccc
testproject/__init__.py
testproject/__init__.py
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") from django.test.utils import get_runner from django.conf import settings def runtests(): # Stolen from django/core/management/commands/test.py TestRunner = get_runner(settings) t...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") import django from django.test.utils import get_runner from django.conf import settings def runtests(): if hasattr(django, 'setup'): # django >= 1.7 django.setup() # S...
Set up the app registry when running tests on django 1.7
Set up the app registry when running tests on django 1.7 (cherry picked from commit 7b3c994758254f16e8f47bf0f13b363d98082f20) Signed-off-by: Antoine Catton <4589f2e060cef08c47d868a06754605a848a1006@fusionbox.com>
Python
bsd-2-clause
fusionbox/django-argonauts
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") from django.test.utils import get_runner from django.conf import settings def runtests(): # Stolen from django/core/management/commands/test.py TestRunner = get_runner(settings) t...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") import django from django.test.utils import get_runner from django.conf import settings def runtests(): if hasattr(django, 'setup'): # django >= 1.7 django.setup() # S...
<commit_before>#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") from django.test.utils import get_runner from django.conf import settings def runtests(): # Stolen from django/core/management/commands/test.py TestRunner = get_runner(...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") import django from django.test.utils import get_runner from django.conf import settings def runtests(): if hasattr(django, 'setup'): # django >= 1.7 django.setup() # S...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") from django.test.utils import get_runner from django.conf import settings def runtests(): # Stolen from django/core/management/commands/test.py TestRunner = get_runner(settings) t...
<commit_before>#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings") from django.test.utils import get_runner from django.conf import settings def runtests(): # Stolen from django/core/management/commands/test.py TestRunner = get_runner(...
80958236edd4390b3f2f9fe4848de68fdda60513
hurdles/tools.py
hurdles/tools.py
from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Example: @...
from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Example: @...
Update : extra_setup compiles code, and runs it into custom global context
Update : extra_setup compiles code, and runs it into custom global context
Python
mit
oleiade/Hurdles
from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Example: @...
from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Example: @...
<commit_before>from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Exa...
from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Example: @...
from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Example: @...
<commit_before>from functools import wraps def extra_setup(setup_code): """Allows to setup some extra context to it's decorated function. As a convention, the bench decorated function should always handle *args and **kwargs. Kwargs will be updated with the extra context set by the decorator. Exa...
918c30a22bf6dc6e0c69037ba21759710c5e7602
glance_registry_local_check.py
glance_registry_local_check.py
#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, metric_bool, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): registry_endpoint = 'http://127.0.0.1:9191' api_status = 1 milliseconds = 0 s = Se...
#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, get_keystone_client, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): keystone = get_keystone_client(auth_ref) tenant_id = keystone.tenant_id auth_t...
Revert "Use new metric_bool function"
Revert "Use new metric_bool function" This reverts commit e186b59c83f187900ce4bfd8b02b735d068434bb.
Python
apache-2.0
sigmavirus24/rpc-openstack,stevelle/rpc-openstack,cfarquhar/rpc-maas,jacobwagner/rpc-openstack,andymcc/rpc-openstack,cfarquhar/rpc-maas,briancurtin/rpc-maas,darrenchan/rpc-openstack,cfarquhar/rpc-openstack,stevelle/rpc-openstack,claco/rpc-openstack,major/rpc-openstack,sigmavirus24/rpc-openstack,miguelgrinberg/rpc-opens...
#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, metric_bool, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): registry_endpoint = 'http://127.0.0.1:9191' api_status = 1 milliseconds = 0 s = Se...
#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, get_keystone_client, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): keystone = get_keystone_client(auth_ref) tenant_id = keystone.tenant_id auth_t...
<commit_before>#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, metric_bool, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): registry_endpoint = 'http://127.0.0.1:9191' api_status = 1 milliseconds...
#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, get_keystone_client, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): keystone = get_keystone_client(auth_ref) tenant_id = keystone.tenant_id auth_t...
#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, metric_bool, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): registry_endpoint = 'http://127.0.0.1:9191' api_status = 1 milliseconds = 0 s = Se...
<commit_before>#!/usr/bin/env python from maas_common import (status_ok, status_err, metric, metric_bool, get_auth_ref) from requests import Session from requests import exceptions as exc def check(auth_ref): registry_endpoint = 'http://127.0.0.1:9191' api_status = 1 milliseconds...
3ec825c5ad8f1b4bacbbe9921d7caa46ad5ccd55
comrade/core/context_processors.py
comrade/core/context_processors.py
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
Add contact email to context.
Add contact email to context.
Python
mit
bueda/django-comrade
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTIO...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTIO...
cfbe762a0e752dcb58edbbd0835371ecc300d3f4
nosewatch/plugin.py
nosewatch/plugin.py
import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self, result): ...
import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self, result): ...
Add try block to argv remove statement
Add try block to argv remove statement When running nose-watch withing an environment like django-nose argv doesn't contain any arguments to remove.
Python
bsd-2-clause
lukaszb/nose-watch,lukaszb/nose-watch
import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self, result): ...
import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self, result): ...
<commit_before>import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self...
import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self, result): ...
import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self, result): ...
<commit_before>import sys from nose.plugins import Plugin from subprocess import Popen class WatchPlugin(Plugin): """ Plugin that use watchdog for continuous tests run. """ name = 'watch' is_watching = False sys = sys def call(self, args): Popen(args).wait() def finalize(self...
cf99ee9a106b862ee3401399224e4730d758eacc
rated/middleware.py
rated/middleware.py
from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this view try...
from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this view try...
Use more appropriate status code
Use more appropriate status code
Python
bsd-3-clause
funkybob/django-rated
from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this view try...
from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this view try...
<commit_before> from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this v...
from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this view try...
from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this view try...
<commit_before> from . import settings from django.http import HttpResponse import time import redis # Connection pool POOL = redis.ConnectionPool(**settings.REDIS) class RatedMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # Try to determine the realm for this v...
c3762443859ada75687e5a62d576fe8140a42a7c
tests/test_csv2iati.py
tests/test_csv2iati.py
import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } } def test_contains_links(self, loaded_request): """ Test that each page contains links to the def...
import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } }
Remove redundant csv2iati test now site has been decommissioned
Remove redundant csv2iati test now site has been decommissioned
Python
mit
IATI/IATI-Website-Tests
import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } } def test_contains_links(self, loaded_request): """ Test that each page contains links to the def...
import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } }
<commit_before>import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } } def test_contains_links(self, loaded_request): """ Test that each page contains l...
import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } }
import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } } def test_contains_links(self, loaded_request): """ Test that each page contains links to the def...
<commit_before>import pytest from web_test_base import * class TestCSV2IATI(WebTestBase): requests_to_load = { 'CSV2IATI Homepage': { 'url': 'http://csv2iati.iatistandard.org/' } } def test_contains_links(self, loaded_request): """ Test that each page contains l...
6c3b5a314c9ba25fba2b0a605215d2fdad97e8dc
tests/test_evaluate.py
tests/test_evaluate.py
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
Add basic test to assert same shape of seg and gt
Add basic test to assert same shape of seg and gt
Python
bsd-3-clause
jni/gala,janelia-flyem/gala
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
<commit_before>import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_ta...
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
<commit_before>import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_ta...
1ac69ebb2b1ea3218f5c01338af3df86f3828090
jarvis-system/orchestrator/src/asyncworker.py
jarvis-system/orchestrator/src/asyncworker.py
# Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter.do(service_dic...
# Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter.do(service_dic...
Fix bug in url creation.
Fix bug in url creation.
Python
mit
lahsivjar/jarvis-kube
# Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter.do(service_dic...
# Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter.do(service_dic...
<commit_before># Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter...
# Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter.do(service_dic...
# Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter.do(service_dic...
<commit_before># Gets a list of services from the service resolver for each query. The module then # requests each service with the query in async fashion and returns a json response import requests import string import responsefilter def do(service_dict): url = _get_service_url(service_dict) return responsefilter...
96755c5e3ccf0573e7190da2a4a9264fdf409710
linter.py
linter.py
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
Remove deprecated SL 'syntax' property override
Remove deprecated SL 'syntax' property override Replaced by 'defaults/selector': http://www.sublimelinter.com/en/stable/linter_settings.html#selector
Python
mit
jonlabelle/SublimeLinter-contrib-markdownlint,jonlabelle/SublimeLinter-contrib-markdownlint
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
<commit_before># # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(NodeLinter): ...
<commit_before># # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class MarkdownLint(...
9b2ee2e4a956f8409047b289ee5c35ad4fcb4310
insanity/layers.py
insanity/layers.py
import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class NeuralNetworkLayer(object): def __init__(self, numInputs, input, inputDropout, numNe...
import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class Layer(object): def __init__(self, numInputs, numNeurons, activation): self.numInpu...
Add @property for network layer inputs
Add @property for network layer inputs
Python
cc0-1.0
cn04/insanity
import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class NeuralNetworkLayer(object): def __init__(self, numInputs, input, inputDropout, numNe...
import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class Layer(object): def __init__(self, numInputs, numNeurons, activation): self.numInpu...
<commit_before>import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class NeuralNetworkLayer(object): def __init__(self, numInputs, input, inpu...
import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class Layer(object): def __init__(self, numInputs, numNeurons, activation): self.numInpu...
import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class NeuralNetworkLayer(object): def __init__(self, numInputs, input, inputDropout, numNe...
<commit_before>import numpy as np import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal import downsample class NeuralNetworkLayer(object): def __init__(self, numInputs, input, inpu...
f707f0daec148ae16604a8fb1326fe10155d4453
tunobase/corporate/company_info/contact/tasks.py
tunobase/corporate/company_info/contact/tasks.py
""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_utils @task(defau...
""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_utils @task(defau...
Send contact us message from the email the user inputted on the site or use the default setting
Send contact us message from the email the user inputted on the site or use the default setting
Python
bsd-3-clause
unomena/tunobase,unomena/tunobase
""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_utils @task(defau...
""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_utils @task(defau...
<commit_before>""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_uti...
""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_utils @task(defau...
""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_utils @task(defau...
<commit_before>""" CONTACT APP This module provides a variety of tasks to be queued by Celery. Classes: n/a Functions: email_contact_message Created on 21 Oct 2013 @author: michael """ from celery.decorators import task from django.conf import settings from tunobase.mailer import utils as mailer_uti...
d410c30ba779ac0b32fdac7bf15733b1edacafe7
src/weitersager/util.py
src/weitersager/util.py
""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable def configure_logging(level: str) -> None: """Configure app...
""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable, Optional def configure_logging(level: str) -> None: """Con...
Make thread name argument optional
Make thread name argument optional
Python
mit
homeworkprod/weitersager
""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable def configure_logging(level: str) -> None: """Configure app...
""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable, Optional def configure_logging(level: str) -> None: """Con...
<commit_before>""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable def configure_logging(level: str) -> None: "...
""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable, Optional def configure_logging(level: str) -> None: """Con...
""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable def configure_logging(level: str) -> None: """Configure app...
<commit_before>""" weitersager.util ~~~~~~~~~~~~~~~~ Utilities :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ import logging from logging import Formatter, StreamHandler from threading import Thread from typing import Callable def configure_logging(level: str) -> None: "...
4ac3c1d5feaadd46a13bc78f9834c29a789e0d9a
manage.py
manage.py
#!/usr/bin/env python import os import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_dir = os.path.dir...
#!/usr/bin/env python import os import sys import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_dir = ...
Set the exit code when running tests correctly
Set the exit code when running tests correctly
Python
mit
andytom/snippets,andytom/snippets
#!/usr/bin/env python import os import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_dir = os.path.dir...
#!/usr/bin/env python import os import sys import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_dir = ...
<commit_before>#!/usr/bin/env python import os import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_di...
#!/usr/bin/env python import os import sys import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_dir = ...
#!/usr/bin/env python import os import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_dir = os.path.dir...
<commit_before>#!/usr/bin/env python import os import unittest from flask.ext.script import Manager, Server from app import app manager = Manager(app) server = Server(host='0.0.0.0', use_debugger=True) manager.add_command("runserver", server) @manager.command def test(): """Runs all the tests""" parent_di...
530549f7fe2c6bbf45996e17b2b125150ad031ae
manage.py
manage.py
#!/usr/bin/env python """ Run the Varda REST server. To reset the database: from varda import db db.drop_all() db.create_all() """ from flaskext.script import Manager from flaskext.celery import install_commands as install_celery_commands from varda import app, db manager = Manager(app) install_cele...
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
Add some notes on database setup
Add some notes on database setup
Python
mit
varda/varda,sndrtj/varda
#!/usr/bin/env python """ Run the Varda REST server. To reset the database: from varda import db db.drop_all() db.create_all() """ from flaskext.script import Manager from flaskext.celery import install_commands as install_celery_commands from varda import app, db manager = Manager(app) install_cele...
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
<commit_before>#!/usr/bin/env python """ Run the Varda REST server. To reset the database: from varda import db db.drop_all() db.create_all() """ from flaskext.script import Manager from flaskext.celery import install_commands as install_celery_commands from varda import app, db manager = Manager(ap...
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
#!/usr/bin/env python """ Run the Varda REST server. To reset the database: from varda import db db.drop_all() db.create_all() """ from flaskext.script import Manager from flaskext.celery import install_commands as install_celery_commands from varda import app, db manager = Manager(app) install_cele...
<commit_before>#!/usr/bin/env python """ Run the Varda REST server. To reset the database: from varda import db db.drop_all() db.create_all() """ from flaskext.script import Manager from flaskext.celery import install_commands as install_celery_commands from varda import app, db manager = Manager(ap...
830e1a23559b82af37f52657484edd20641318c5
teamsupport/__init__.py
teamsupport/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (TeamSupportService,)
# -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.models import Action, Ticket from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (Action, TeamSupportService, Ticket,)
Add convenience imports for models
Add convenience imports for models
Python
mit
zoidbergwill/teamsupport-python,yola/teamsupport-python
# -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (TeamSupportService,) Add convenience imports for models
# -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.models import Action, Ticket from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (Action, TeamSupportService, Ticket,)
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (TeamSupportService,) <commit_msg>Add convenience imports for models<commit_after>
# -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.models import Action, Ticket from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (Action, TeamSupportService, Ticket,)
# -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (TeamSupportService,) Add convenience imports for models# -*- coding: utf-8 -*- from __future__ import abso...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from teamsupport.services import TeamSupportService __author__ = 'Yola Engineers' __email__ = 'engineers@yola.com' __version__ = '0.1.0' __all__ = (TeamSupportService,) <commit_msg>Add convenience imports for models<commit_after># -*- codi...
0b0a11d01378368fb795c117ffd931811eaf9b76
pyhunter/exceptions.py
pyhunter/exceptions.py
class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to the Hunter API ...
class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to the Hunter API ...
Add new line at end of file
Add new line at end of file
Python
mit
VonStruddle/PyHunter
class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to the Hunter API ...
class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to the Hunter API ...
<commit_before> class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to th...
class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to the Hunter API ...
class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to the Hunter API ...
<commit_before> class PyhunterError(Exception): """ Generic exception class for the library """ pass class MissingCompanyError(PyhunterError): pass class MissingNameError(PyhunterError): pass class HunterApiError(PyhunterError): """ Represents something went wrong in the call to th...
404d499877c050f706ca0f713d1c8ef0e5a88889
ooni/tests/bases.py
ooni/tests/bases.py
from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.initialize_ooni_home("ooni_home") def tearDown(self): config.read_config_file()
import os from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.global_options['datadir'] = os.path.join(__file__, '..', '..', '..', 'data') config.global_options['datadir'] = os.path.abspath(config.global_options['da...
Set the datadirectory to be that of the repo.
Set the datadirectory to be that of the repo.
Python
bsd-2-clause
kdmurray91/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,juga0/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,0xPoly/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-pro...
from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.initialize_ooni_home("ooni_home") def tearDown(self): config.read_config_file()Set the datadirectory to be that of the repo.
import os from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.global_options['datadir'] = os.path.join(__file__, '..', '..', '..', 'data') config.global_options['datadir'] = os.path.abspath(config.global_options['da...
<commit_before>from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.initialize_ooni_home("ooni_home") def tearDown(self): config.read_config_file()<commit_msg>Set the datadirectory to be that of the repo.<commit_...
import os from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.global_options['datadir'] = os.path.join(__file__, '..', '..', '..', 'data') config.global_options['datadir'] = os.path.abspath(config.global_options['da...
from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.initialize_ooni_home("ooni_home") def tearDown(self): config.read_config_file()Set the datadirectory to be that of the repo.import os from twisted.trial impor...
<commit_before>from twisted.trial import unittest from ooni.settings import config class ConfigTestCase(unittest.TestCase): def setUp(self): config.initialize_ooni_home("ooni_home") def tearDown(self): config.read_config_file()<commit_msg>Set the datadirectory to be that of the repo.<commit_...
eacc1f88f7e34e26c3a4d29ec009b4984c10a345
SimPEG/Mesh/__init__.py
SimPEG/Mesh/__init__.py
from TensorMesh import TensorMesh from CylMesh import CylMesh from Cyl1DMesh import Cyl1DMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh
from TensorMesh import TensorMesh from CylMesh import CylMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh
Remove Cyl1DMesh from init file...
Remove Cyl1DMesh from init file...
Python
mit
simpeg/discretize,simpeg/simpeg,simpeg/discretize,simpeg/discretize
from TensorMesh import TensorMesh from CylMesh import CylMesh from Cyl1DMesh import Cyl1DMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh Remove Cyl1DMesh from init file...
from TensorMesh import TensorMesh from CylMesh import CylMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh
<commit_before>from TensorMesh import TensorMesh from CylMesh import CylMesh from Cyl1DMesh import Cyl1DMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh <commit_msg>Remove Cyl1DMesh from init file...<commit_after>
from TensorMesh import TensorMesh from CylMesh import CylMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh
from TensorMesh import TensorMesh from CylMesh import CylMesh from Cyl1DMesh import Cyl1DMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh Remove Cyl1DMesh from init file...from TensorMesh import TensorMesh from CylMesh import CylMesh from LogicallyRectMesh...
<commit_before>from TensorMesh import TensorMesh from CylMesh import CylMesh from Cyl1DMesh import Cyl1DMesh from LogicallyRectMesh import LogicallyRectMesh from TreeMesh import TreeMesh from BaseMesh import BaseMesh <commit_msg>Remove Cyl1DMesh from init file...<commit_after>from TensorMesh import TensorMesh from CylM...
26330025ccdeab7febd69c7f9053a99ac46d421b
cactus/static/external/manager.py
cactus/static/external/manager.py
class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, external, exter...
class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, external, exter...
Add option to unregister externals
Add option to unregister externals
Python
bsd-3-clause
page-io/Cactus,juvham/Cactus,ibarria0/Cactus,gone/Cactus,Knownly/Cactus,ibarria0/Cactus,dreadatour/Cactus,danielmorosan/Cactus,PegasusWang/Cactus,dreadatour/Cactus,andyzsf/Cactus-,Bluetide/Cactus,koenbok/Cactus,Knownly/Cactus,PegasusWang/Cactus,koobs/Cactus,ibarria0/Cactus,eudicots/Cactus,page-io/Cactus,chaudum/Cactus,...
class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, external, exter...
class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, external, exter...
<commit_before>class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, ...
class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, external, exter...
class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, external, exter...
<commit_before>class ExternalManager(object): """ Manager the active externals """ def __init__(self, processors=None, optimizers=None): self.processors = processors if processors is not None else [] self.optimizers = optimizers if optimizers is not None else [] def _register(self, ...
d48e1388eb2a21f83094e561405e292f6ecc3fb9
labkey/__init__.py
labkey/__init__.py
# # Copyright (c) 2011-2014 LabKey Corporation # # 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 (c) 2011-2014 LabKey Corporation # # 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...
Include utils in base import
Include utils in base import
Python
apache-2.0
LabKey/labkey-api-python
# # Copyright (c) 2011-2014 LabKey Corporation # # 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 (c) 2011-2014 LabKey Corporation # # 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 (c) 2011-2014 LabKey Corporation # # 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 (c) 2011-2014 LabKey Corporation # # 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 (c) 2011-2014 LabKey Corporation # # 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 (c) 2011-2014 LabKey Corporation # # 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...
962ae8a53c95e8ade1e0fd5804062b807837781e
pycalc.py
pycalc.py
# vim: set fileencoding=utf-8 import sys try: import readline # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: print("This program is for python version 3 onl...
# vim: set fileencoding=utf-8 import sys try: import readline # noqa: this is used simply by being imported. # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: ...
Add lines to shut flake8 up.
Add lines to shut flake8 up.
Python
mit
5225225/pycalc,5225225/pycalc
# vim: set fileencoding=utf-8 import sys try: import readline # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: print("This program is for python version 3 onl...
# vim: set fileencoding=utf-8 import sys try: import readline # noqa: this is used simply by being imported. # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: ...
<commit_before># vim: set fileencoding=utf-8 import sys try: import readline # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: print("This program is for pytho...
# vim: set fileencoding=utf-8 import sys try: import readline # noqa: this is used simply by being imported. # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: ...
# vim: set fileencoding=utf-8 import sys try: import readline # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: print("This program is for python version 3 onl...
<commit_before># vim: set fileencoding=utf-8 import sys try: import readline # No idea if this is a license violation. Hope it isn't. except ImportError: print("Could not find readline, you will likely get no line editing functionality") if sys.version_info.major < 3: print("This program is for pytho...
2f03aa69f55d4d899af968e57a59a58d27ef82c8
url_shortener/forms.py
url_shortener/forms.py
# -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.DataRequired(), ...
# -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.DataRequired(), ...
Add placeholder text to URL form field
Add placeholder text to URL form field
Python
mit
piotr-rusin/url-shortener,piotr-rusin/url-shortener
# -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.DataRequired(), ...
# -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.DataRequired(), ...
<commit_before># -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.Dat...
# -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.DataRequired(), ...
# -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.DataRequired(), ...
<commit_before># -*- coding: utf-8 -*- from flask_wtf import Form from flask_wtf.recaptcha import RecaptchaField, Recaptcha from wtforms import StringField, validators from .validation import not_blacklisted_nor_spam class ShortenedURLForm(Form): url = StringField( validators=[ validators.Dat...
43e4d71a193f78e83f26e9d1c5fe69cee1b289b5
raffle.py
raffle.py
# -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.shuffle(attendees) win...
# -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.seed() random.shuffle(...
Add call to random.seed() and change print statement to print function.
Add call to random.seed() and change print statement to print function.
Python
bsd-3-clause
pythonkc/pythonkc-raffler
# -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.shuffle(attendees) win...
# -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.seed() random.shuffle(...
<commit_before># -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.shuffle(att...
# -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.seed() random.shuffle(...
# -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.shuffle(attendees) win...
<commit_before># -*- coding: utf-8 -*- import random import webbrowser from pythonkc_meetups import PythonKCMeetups from optparse import OptionParser def raffle_time(api_key=None, event_id=None): client = PythonKCMeetups(api_key=api_key) attendees = client.get_event_attendees(event_id) random.shuffle(att...
c7b40736b6e59a654652afaab7fb643e00c1f186
clients/cron/call_uw_course_alerter.py
clients/cron/call_uw_course_alerter.py
import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] for course in courses: ...
#!/usr/bin/env python import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] ...
Add shebang for Python to sample script
Add shebang for Python to sample script
Python
mit
tuzhucheng/uw-course-alerter,tuzhucheng/uw-course-alerter,tuzhucheng/uw-course-alerter,tuzhucheng/uw-course-alerter
import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] for course in courses: ...
#!/usr/bin/env python import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] ...
<commit_before>import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] for cour...
#!/usr/bin/env python import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] ...
import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] for course in courses: ...
<commit_before>import subprocess import urllib def main(): api_url = 'https://uw-alert.herokuapp.com/check_availability' courses = [{'level': 'under', 'session': 1151, 'subject': 'CS', 'number': 341, 'email': 'youremail@example.com'}] for cour...
9b524fa97d1d1c8c132d1a880103a5ab4d0dabfc
models.py
models.py
from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_created = ndb.Date...
from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_created = ndb.Date...
Add Comment Model for Photo and Album
Add Comment Model for Photo and Album
Python
mit
MichaelAquilina/Photo-Nebula,MichaelAquilina/Photo-Nebula
from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_created = ndb.Date...
from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_created = ndb.Date...
<commit_before>from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_cre...
from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_created = ndb.Date...
from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_created = ndb.Date...
<commit_before>from google.appengine.ext import ndb class Photo(ndb.Model): name = ndb.StringProperty() blob_info_key = ndb.BlobKeyProperty() date_created = ndb.DateTimeProperty(auto_now_add=True) class Album(ndb.Model): name = ndb.StringProperty() description = ndb.StringProperty() date_cre...
3c04509ced5c51c55294e88ded2614b9f289deea
launch_instance.py
launch_instance.py
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ImageId='ami...
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ImageId='ami...
Upgrade instance type due to RAM issues
Upgrade instance type due to RAM issues
Python
mit
gertvv/ictrp-retrieval,gertvv/ictrp-retrieval
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ImageId='ami...
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ImageId='ami...
<commit_before>import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ...
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ImageId='ami...
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ImageId='ami...
<commit_before>import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): ec2 = boto3.resource('ec2') with open('env.sh') as e, open('cloud-init.sh') as f: script = e.read() + f.read() instance = ec2.create_instances( ...
d5e5b9ca4c9243d950e17b141008ffb168df0b64
kbkdna/dna.py
kbkdna/dna.py
#!/usr/bin/env python2 from __future__ import division def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketrans complemen...
#!/usr/bin/env python2 def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketrans complements = maketrans('ACTGactg', 'TGACt...
Put the gc_content bug back.
Put the gc_content bug back.
Python
mit
kalekundert/kbkdna
#!/usr/bin/env python2 from __future__ import division def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketrans complemen...
#!/usr/bin/env python2 def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketrans complements = maketrans('ACTGactg', 'TGACt...
<commit_before>#!/usr/bin/env python2 from __future__ import division def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketran...
#!/usr/bin/env python2 def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketrans complements = maketrans('ACTGactg', 'TGACt...
#!/usr/bin/env python2 from __future__ import division def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketrans complemen...
<commit_before>#!/usr/bin/env python2 from __future__ import division def reverse(seq): """Return the reverse of the given sequence (i.e. 3' to 5').""" return seq[::-1] def complement(seq): """Return the complement of the given sequence (i.e. G=>C, A=>T, etc.)""" from string import maketran...
34274289f0cbfafbb1d762cad38a7225873d6850
matches/admin.py
matches/admin.py
from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" tip.is_score_ca...
from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" tip.is_score_ca...
Add action to zero out tips for given match
Add action to zero out tips for given match
Python
mit
leventebakos/football-ech,leventebakos/football-ech
from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" tip.is_score_ca...
from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" tip.is_score_ca...
<commit_before>from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" ...
from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" tip.is_score_ca...
from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" tip.is_score_ca...
<commit_before>from django.contrib import admin from .models import Match from .models import Tip def delete_tips(modeladmin, request, queryset): for match in queryset: tips = Tip.object.filter(match = match) for tip in tips: tip.score = 0 tip.scoring_field = "" ...
88921deb630bef702a08f5b3a07279ccd223902b
test/lifecycle_test.py
test/lifecycle_test.py
from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() queue.put(lifecycle.current_space()) def push_thread_space_to_queue(queue): queue.put(lifecycle.current_s...
from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() def push_thread_space_to_queue(queue): queue.put(lifecycle.current_space()) push_thread_space_to_queue(qu...
Reduce minor duplication in lifecycle test.
Reduce minor duplication in lifecycle test.
Python
mit
uber/doubles
from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() queue.put(lifecycle.current_space()) def push_thread_space_to_queue(queue): queue.put(lifecycle.current_s...
from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() def push_thread_space_to_queue(queue): queue.put(lifecycle.current_space()) push_thread_space_to_queue(qu...
<commit_before>from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() queue.put(lifecycle.current_space()) def push_thread_space_to_queue(queue): queue.put(life...
from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() def push_thread_space_to_queue(queue): queue.put(lifecycle.current_space()) push_thread_space_to_queue(qu...
from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() queue.put(lifecycle.current_space()) def push_thread_space_to_queue(queue): queue.put(lifecycle.current_s...
<commit_before>from threading import Thread from Queue import Queue from doubles import lifecycle class TestLifecycle(object): def test_stores_a_space_per_thread(self): queue = Queue() queue.put(lifecycle.current_space()) def push_thread_space_to_queue(queue): queue.put(life...
0335f32fa7035d394a6434b924a8ebb17332fd45
mist/__init__.py
mist/__init__.py
import requests class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self.headers = {"Authorization": "Bearer " + self.token, "Accept": "application/vnd.littlebits.v2+json"} def output(self, pct, dur): ...
import requests print """ mist - a python wrapper for the cloudBit API. If you use this, please let me know on github! http://github.com/technoboy10/mist """ class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self...
Print stuff when module is imported.
Print stuff when module is imported.
Python
mit
technoboy10/partly-cloudy
import requests class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self.headers = {"Authorization": "Bearer " + self.token, "Accept": "application/vnd.littlebits.v2+json"} def output(self, pct, dur): ...
import requests print """ mist - a python wrapper for the cloudBit API. If you use this, please let me know on github! http://github.com/technoboy10/mist """ class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self...
<commit_before>import requests class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self.headers = {"Authorization": "Bearer " + self.token, "Accept": "application/vnd.littlebits.v2+json"} def output(self, p...
import requests print """ mist - a python wrapper for the cloudBit API. If you use this, please let me know on github! http://github.com/technoboy10/mist """ class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self...
import requests class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self.headers = {"Authorization": "Bearer " + self.token, "Accept": "application/vnd.littlebits.v2+json"} def output(self, pct, dur): ...
<commit_before>import requests class Bit: def __init__(self, auth_token, device_id): self.token = auth_token self.id = device_id self.version = '0.1.0' self.headers = {"Authorization": "Bearer " + self.token, "Accept": "application/vnd.littlebits.v2+json"} def output(self, p...
1843e34bba0343cd3600f3c8934ae29b4b365554
chstrings/chstrings_test.py
chstrings/chstrings_test.py
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_' + cfg.lang_cod...
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up. Use the fallback # lang_tag across all tests. lang_tag = cfg.lang_code ...
Extend chstrings smoke test a little more.
Extend chstrings smoke test a little more.
Python
mit
eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_' + cfg.lang_cod...
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up. Use the fallback # lang_tag across all tests. lang_tag = cfg.lang_code ...
<commit_before>import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_'...
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up. Use the fallback # lang_tag across all tests. lang_tag = cfg.lang_code ...
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_' + cfg.lang_cod...
<commit_before>import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_'...
a47e300d9e25dd3f631c9538f33b1d65cca847af
profile_collection/startup/80-areadetector.py
profile_collection/startup/80-areadetector.py
from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode', name='shctl1'...
from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode', name='shctl1'...
Update ioc storage path for the raw tiffs.
Update ioc storage path for the raw tiffs.
Python
bsd-2-clause
pavoljuhas/ipython_ophyd,pavoljuhas/ipython_ophyd,NSLS-II-XPD/ipython_ophyd,NSLS-II-XPD/ipython_ophyd
from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode', name='shctl1'...
from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode', name='shctl1'...
<commit_before>from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode'...
from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode', name='shctl1'...
from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode', name='shctl1'...
<commit_before>from ophyd.controls.area_detector import (AreaDetectorFileStoreHDF5, AreaDetectorFileStoreTIFF, AreaDetectorFileStoreTIFFSquashing) # from shutter import sh1 shctl1 = EpicsSignal('XF:28IDC-ES:1{Det:PE1}cam1:ShutterMode'...
46592a761df3716e5c3e218e4aa714bc7fc1b0ce
twilio.py
twilio.py
from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")
from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")
Add newline at end of file
Add newline at end of file
Python
mit
nhshd-slot/SLOT,bsharif/SLOT,bsharif/SLOT,nhshd-slot/SLOT,bsharif/SLOT,nhshd-slot/SLOT
from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")Add newline at end of file
from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")
<commit_before>from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")<commit_msg>Add newline at end of file<commit_after>
from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")
from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")Add newline at end of filefrom twilio.rest import TwilioRestClient import config...
<commit_before>from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!")<commit_msg>Add newline at end of file<commit_after>from twilio.r...
8bd562b3ae6a2e5ae4fd1ad88da5d46408415365
cliche/services/__init__.py
cliche/services/__init__.py
""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some methods referr...
""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some methods referr...
Add some details to docs
Add some details to docs
Python
mit
clicheio/cliche,item4/cliche,clicheio/cliche,item4/cliche,clicheio/cliche
""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some methods referr...
""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some methods referr...
<commit_before>""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some...
""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some methods referr...
""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some methods referr...
<commit_before>""":mod:`cliche.services` --- Interfacing external services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ How to add a new external service --------------------------------- In order to add a new service to cliche, you must create a subpackage under :data:`cliche.services` and expose some...
4add4eb1895498d547c8cf86ea8017c273932139
petition/forms.py
petition/forms.py
from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_forms.layout impo...
from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_forms.layout impo...
Add a class for sign button
Add a class for sign button What will make it easier to manipulate the theme
Python
mit
watchdogpolska/django-one-petition,watchdogpolska/django-one-petition,watchdogpolska/django-one-petition
from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_forms.layout impo...
from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_forms.layout impo...
<commit_before>from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_fo...
from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_forms.layout impo...
from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_forms.layout impo...
<commit_before>from django.forms import ModelForm from django import forms from django.forms.widgets import TextInput from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from braces.forms import UserKwargModelFormMixin from crispy_forms.helper import FormHelper from crispy_fo...
bcd9799b790aef9571491c0537e5aeb12bc9a564
make_a_plea/management/commands/check_urns_in_db.py
make_a_plea/management/commands/check_urns_in_db.py
import csv from django.core.management.base import BaseCommand from apps.plea.models import DataValidation, Case from apps.plea.standardisers import standardise_urn, format_for_region class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): parser.add_argum...
from django.core.management.base import BaseCommand from apps.plea.models import Case from apps.plea.standardisers import standardise_urn class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): parser.add_argument('csv_file', nargs='+') def handle(self...
Update management command to check if a list of URNs is present in the database
Update management command to check if a list of URNs is present in the database
Python
mit
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
import csv from django.core.management.base import BaseCommand from apps.plea.models import DataValidation, Case from apps.plea.standardisers import standardise_urn, format_for_region class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): parser.add_argum...
from django.core.management.base import BaseCommand from apps.plea.models import Case from apps.plea.standardisers import standardise_urn class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): parser.add_argument('csv_file', nargs='+') def handle(self...
<commit_before>import csv from django.core.management.base import BaseCommand from apps.plea.models import DataValidation, Case from apps.plea.standardisers import standardise_urn, format_for_region class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): p...
from django.core.management.base import BaseCommand from apps.plea.models import Case from apps.plea.standardisers import standardise_urn class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): parser.add_argument('csv_file', nargs='+') def handle(self...
import csv from django.core.management.base import BaseCommand from apps.plea.models import DataValidation, Case from apps.plea.standardisers import standardise_urn, format_for_region class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): parser.add_argum...
<commit_before>import csv from django.core.management.base import BaseCommand from apps.plea.models import DataValidation, Case from apps.plea.standardisers import standardise_urn, format_for_region class Command(BaseCommand): help = "Build weekly aggregate stats" def add_arguments(self, parser): p...
9eea896352e62850494dbb3f894eef0b82afab89
needy/projects/boostbuild.py
needy/projects/boostbuild.py
import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return False if n...
import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return False if n...
Add support for linkage in b2 projects
Add support for linkage in b2 projects
Python
mit
vmrob/needy,ccbrown/needy,vmrob/needy,bittorrent/needy,bittorrent/needy,ccbrown/needy
import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return False if n...
import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return False if n...
<commit_before>import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return Fals...
import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return False if n...
import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return False if n...
<commit_before>import os import subprocess from .. import project class BoostBuildProject(project.Project): @staticmethod def identifier(): return 'boostbuild' @staticmethod def is_valid_project(definition, needy): if not definition.target.platform.is_host(): return Fals...
cd88b3a695e87078aa0b50f9b3ea3af9ae3eb0a5
databroker/tests/test_core.py
databroker/tests/test_core.py
from __future__ import absolute_import, division, print_function from databroker.core import Header def test_header_dict_conformance(db): # TODO update this if / when we add conformance testing to # validate attrs in Header target = {'start': {'uid': 'start'}, 'stop': {'uid': 'stop', 'start...
from __future__ import absolute_import, division, print_function import copy from databroker.core import Header def test_header_dict_conformance(db): db.prepare_hook = lambda name, doc: copy.deepcopy(doc) # TODO update this if / when we add conformance testing to # validate attrs in Header target = ...
Remove doct from the equation in attrs tests.
TST: Remove doct from the equation in attrs tests.
Python
bsd-3-clause
ericdill/databroker,ericdill/databroker
from __future__ import absolute_import, division, print_function from databroker.core import Header def test_header_dict_conformance(db): # TODO update this if / when we add conformance testing to # validate attrs in Header target = {'start': {'uid': 'start'}, 'stop': {'uid': 'stop', 'start...
from __future__ import absolute_import, division, print_function import copy from databroker.core import Header def test_header_dict_conformance(db): db.prepare_hook = lambda name, doc: copy.deepcopy(doc) # TODO update this if / when we add conformance testing to # validate attrs in Header target = ...
<commit_before>from __future__ import absolute_import, division, print_function from databroker.core import Header def test_header_dict_conformance(db): # TODO update this if / when we add conformance testing to # validate attrs in Header target = {'start': {'uid': 'start'}, 'stop': {'uid':...
from __future__ import absolute_import, division, print_function import copy from databroker.core import Header def test_header_dict_conformance(db): db.prepare_hook = lambda name, doc: copy.deepcopy(doc) # TODO update this if / when we add conformance testing to # validate attrs in Header target = ...
from __future__ import absolute_import, division, print_function from databroker.core import Header def test_header_dict_conformance(db): # TODO update this if / when we add conformance testing to # validate attrs in Header target = {'start': {'uid': 'start'}, 'stop': {'uid': 'stop', 'start...
<commit_before>from __future__ import absolute_import, division, print_function from databroker.core import Header def test_header_dict_conformance(db): # TODO update this if / when we add conformance testing to # validate attrs in Header target = {'start': {'uid': 'start'}, 'stop': {'uid':...
4fdf3af6414ae6fdc20882309bcaf36ffbe5c7a7
scripts/prereg/approve_draft_registrations.py
scripts/prereg/approve_draft_registrations.py
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from website.app import init_app from website.models import DraftRegistration, Sanction, User logger = logging.getLogger(__name__) logging.basicConfig(level=logging.WARN) l...
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from framework.tasks.handlers import celery_teardown_request from website.app import init_app from website.project.model import DraftRegistration, Sanction logger = loggin...
Make sure celery_teardown_request gets called in DraftReg auto-approve script
Make sure celery_teardown_request gets called in DraftReg auto-approve script [skip ci]
Python
apache-2.0
crcresearch/osf.io,Johnetordoff/osf.io,TomHeatwole/osf.io,Nesiehr/osf.io,Nesiehr/osf.io,mattclark/osf.io,caneruguz/osf.io,zachjanicki/osf.io,caneruguz/osf.io,SSJohns/osf.io,adlius/osf.io,monikagrabowska/osf.io,abought/osf.io,crcresearch/osf.io,HalcyonChimera/osf.io,KAsante95/osf.io,aaxelb/osf.io,acshi/osf.io,KAsante95/...
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from website.app import init_app from website.models import DraftRegistration, Sanction, User logger = logging.getLogger(__name__) logging.basicConfig(level=logging.WARN) l...
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from framework.tasks.handlers import celery_teardown_request from website.app import init_app from website.project.model import DraftRegistration, Sanction logger = loggin...
<commit_before>""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from website.app import init_app from website.models import DraftRegistration, Sanction, User logger = logging.getLogger(__name__) logging.basicConfig(level=...
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from framework.tasks.handlers import celery_teardown_request from website.app import init_app from website.project.model import DraftRegistration, Sanction logger = loggin...
""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from website.app import init_app from website.models import DraftRegistration, Sanction, User logger = logging.getLogger(__name__) logging.basicConfig(level=logging.WARN) l...
<commit_before>""" A script for testing DraftRegistrationApprovals. Automatically approves all pending DraftRegistrationApprovals. """ import sys import logging from website.app import init_app from website.models import DraftRegistration, Sanction, User logger = logging.getLogger(__name__) logging.basicConfig(level=...
579fbe76f8ab86d5f599f9888149fcaed297842c
src/sentry/celery.py
src/sentry/celery.py
from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings if not setting...
from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings if not setting...
Use star args to invoke apply_async
Use star args to invoke apply_async
Python
bsd-3-clause
zenefits/sentry,nicholasserra/sentry,fotinakis/sentry,JamesMura/sentry,alexm92/sentry,nicholasserra/sentry,BuildingLink/sentry,gencer/sentry,daevaorn/sentry,beeftornado/sentry,JamesMura/sentry,mvaled/sentry,jean/sentry,JamesMura/sentry,fotinakis/sentry,mvaled/sentry,JamesMura/sentry,beeftornado/sentry,looker/sentry,fot...
from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings if not setting...
from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings if not setting...
<commit_before>from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings...
from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings if not setting...
from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings if not setting...
<commit_before>from __future__ import absolute_import import celery import os import os.path import sys # Add the project to the python path sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) # Configure the application only if it seemingly isnt already configured from django.conf import settings...
e9031ab6091e3b9d7866c300c8e21b9e81e7e935
api/collections/urls.py
api/collections/urls.py
from django.conf.urls import url from api.collections import views from website import settings urlpatterns = [] # Routes only active in local/staging environments if settings.DEV_MODE: urlpatterns.extend([ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^(?P<collection_...
from django.conf.urls import url from api.collections import views urlpatterns = [ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'), url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedN...
Remove DEV ONLY on the sub view since the super already has it
Remove DEV ONLY on the sub view since the super already has it
Python
apache-2.0
cslzchen/osf.io,leb2dg/osf.io,kch8qx/osf.io,TomBaxter/osf.io,wearpants/osf.io,laurenrevere/osf.io,chrisseto/osf.io,cslzchen/osf.io,mluo613/osf.io,rdhyee/osf.io,mluke93/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,pattisdr/osf.io,billyhunt/osf.io,mluo613/osf.io,caseyrollins/osf.io,zachjanicki/osf.io,jnayak1/osf.io,a...
from django.conf.urls import url from api.collections import views from website import settings urlpatterns = [] # Routes only active in local/staging environments if settings.DEV_MODE: urlpatterns.extend([ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^(?P<collection_...
from django.conf.urls import url from api.collections import views urlpatterns = [ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'), url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedN...
<commit_before>from django.conf.urls import url from api.collections import views from website import settings urlpatterns = [] # Routes only active in local/staging environments if settings.DEV_MODE: urlpatterns.extend([ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^...
from django.conf.urls import url from api.collections import views urlpatterns = [ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name='collection-detail'), url(r'^(?P<collection_id>\w+)/linked_nodes/$', views.LinkedN...
from django.conf.urls import url from api.collections import views from website import settings urlpatterns = [] # Routes only active in local/staging environments if settings.DEV_MODE: urlpatterns.extend([ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^(?P<collection_...
<commit_before>from django.conf.urls import url from api.collections import views from website import settings urlpatterns = [] # Routes only active in local/staging environments if settings.DEV_MODE: urlpatterns.extend([ url(r'^$', views.CollectionList.as_view(), name='collection-list'), url(r'^...
af9b7dd5e4923c15a8adbab41ee9933245714ec8
python/example.py
python/example.py
#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get some URL metrics....
#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get some URL metrics....
Format keyword arguments like PEP-8.
Format keyword arguments like PEP-8.
Python
mit
seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples,seomoz/SEOmozAPISamples
#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get some URL metrics....
#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get some URL metrics....
<commit_before>#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get so...
#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get some URL metrics....
#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get some URL metrics....
<commit_before>#! /usr/bin/env python from lsapi import lsapi l = lsapi('my-access-id', 'my-secret-key') # As you may have noticed, there are lots of columns available # I did what I could to make them easily-accessible, but there # are a lot, and the names are long. So, the API calls have # defaults # Let's get so...
610c27c15c09777a84143f551bb2cd3c2a5e3584
nltk/align/util.py
nltk/align/util.py
# Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT
# Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT from nltk.align.api import Alignment def pharaohtext2tuples(pharaoh_text): """ Converts pharaoh text format into an Alignment object (a list of t...
Convert pharaoh output format to Alignment object and vice versa:wq
Convert pharaoh output format to Alignment object and vice versa:wq
Python
apache-2.0
nltk/nltk,nltk/nltk,nltk/nltk
# Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT Convert pharaoh output format to Alignment object and vice versa:wq
# Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT from nltk.align.api import Alignment def pharaohtext2tuples(pharaoh_text): """ Converts pharaoh text format into an Alignment object (a list of t...
<commit_before># Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT <commit_msg>Convert pharaoh output format to Alignment object and vice versa:wq<commit_after>
# Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT from nltk.align.api import Alignment def pharaohtext2tuples(pharaoh_text): """ Converts pharaoh text format into an Alignment object (a list of t...
# Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT Convert pharaoh output format to Alignment object and vice versa:wq# Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Pr...
<commit_before># Natural Language Toolkit: Aligner Utilities # # Copyright (C) 2001-2013 NLTK Project # Author: # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT <commit_msg>Convert pharaoh output format to Alignment object and vice versa:wq<commit_after># Natural Language Toolkit: Aligner Util...
59eb6eaf18c67c424dad35f82f6baac6c93de380
elasticmock/__init__.py
elasticmock/__init__.py
# -*- coding: utf-8 -*- from functools import wraps from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): elastic_key = 'localhost:9200' if hosts is None else '{0}:{1}'.format(hosts[0].get('host'), hosts[0]...
# -*- coding: utf-8 -*- from functools import wraps from elasticsearch.client import _normalize_hosts from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): host = _normalize_hosts(hosts)[0] elastic_key ...
Allow the same 'hosts' settings that Elasticsearch does
Allow the same 'hosts' settings that Elasticsearch does
Python
mit
vrcmarcos/elasticmock
# -*- coding: utf-8 -*- from functools import wraps from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): elastic_key = 'localhost:9200' if hosts is None else '{0}:{1}'.format(hosts[0].get('host'), hosts[0]...
# -*- coding: utf-8 -*- from functools import wraps from elasticsearch.client import _normalize_hosts from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): host = _normalize_hosts(hosts)[0] elastic_key ...
<commit_before># -*- coding: utf-8 -*- from functools import wraps from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): elastic_key = 'localhost:9200' if hosts is None else '{0}:{1}'.format(hosts[0].get('h...
# -*- coding: utf-8 -*- from functools import wraps from elasticsearch.client import _normalize_hosts from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): host = _normalize_hosts(hosts)[0] elastic_key ...
# -*- coding: utf-8 -*- from functools import wraps from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): elastic_key = 'localhost:9200' if hosts is None else '{0}:{1}'.format(hosts[0].get('host'), hosts[0]...
<commit_before># -*- coding: utf-8 -*- from functools import wraps from mock import patch from elasticmock.fake_elasticsearch import FakeElasticsearch ELASTIC_INSTANCES = {} def _get_elasticmock(hosts=None, *args, **kwargs): elastic_key = 'localhost:9200' if hosts is None else '{0}:{1}'.format(hosts[0].get('h...
7d10b9d803089d1cf8a0c06219608d31bf5fb84f
src/collectors/MongoDBCollector/MongoDBCollector.py
src/collectors/MongoDBCollector/MongoDBCollector.py
try: from numbers import Number import pymongo except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatus() command, other values are ignor...
try: from numbers import Number import pymongo from pymongo import ReadPreference except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatu...
Replace deprecated slave_ok for read_preference in pymongo.Connection
Replace deprecated slave_ok for read_preference in pymongo.Connection See: http://api.mongodb.org/python/current/api/pymongo/connection.html
Python
mit
jriguera/Diamond,MichaelDoyle/Diamond,Netuitive/netuitive-diamond,hamelg/Diamond,dcsquared13/Diamond,sebbrandt87/Diamond,python-diamond/Diamond,gg7/diamond,sebbrandt87/Diamond,actmd/Diamond,signalfx/Diamond,Basis/Diamond,bmhatfield/Diamond,python-diamond/Diamond,krbaker/Diamond,jumping/Diamond,signalfx/Diamond,rtoma/Di...
try: from numbers import Number import pymongo except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatus() command, other values are ignor...
try: from numbers import Number import pymongo from pymongo import ReadPreference except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatu...
<commit_before>try: from numbers import Number import pymongo except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatus() command, other v...
try: from numbers import Number import pymongo from pymongo import ReadPreference except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatu...
try: from numbers import Number import pymongo except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatus() command, other values are ignor...
<commit_before>try: from numbers import Number import pymongo except ImportError: Number = None import diamond class MongoDBCollector(diamond.collector.Collector): """Collects data from MongoDB's db.serverStatus() command Collects all number values from the db.serverStatus() command, other v...
ab5ebb50019add34333edb04cc96f7f55fce8d1c
src/toil/utils/__init__.py
src/toil/utils/__init__.py
from __future__ import absolute_import from toil import version import logging logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choices=['aws', 'azur...
from __future__ import absolute_import from toil import version import logging import os logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choices=['aw...
Remove default for zone, add method for searching for specified zone in environ vars.
Remove default for zone, add method for searching for specified zone in environ vars.
Python
apache-2.0
BD2KGenomics/slugflow,BD2KGenomics/slugflow
from __future__ import absolute_import from toil import version import logging logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choices=['aws', 'azur...
from __future__ import absolute_import from toil import version import logging import os logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choices=['aw...
<commit_before>from __future__ import absolute_import from toil import version import logging logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choice...
from __future__ import absolute_import from toil import version import logging import os logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choices=['aw...
from __future__ import absolute_import from toil import version import logging logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choices=['aws', 'azur...
<commit_before>from __future__ import absolute_import from toil import version import logging logger = logging.getLogger(__name__) def addBasicProvisionerOptions(parser): parser.add_argument("--version", action='version', version=version) parser.add_argument('-p', "--provisioner", dest='provisioner', choice...
98d45ace5ce5b8918e470beb7dbcb1d59b0608af
server_app/__main__.py
server_app/__main__.py
import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver") logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app.register_bluep...
import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app.register_blue...
Fix logging directory njot existing
Fix logging directory njot existing
Python
bsd-3-clause
jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat,jos0003/Chat
import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver") logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app.register_bluep...
import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app.register_blue...
<commit_before>import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver") logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app...
import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver")) logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app.register_blue...
import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver") logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app.register_bluep...
<commit_before>import sys import os import logging if not os.path.exists(os.path.expanduser("~/.chatserver")): os.makedirs(os.path.expanduser("~/.chatserver") logging.basicConfig(filename=os.path.expanduser("~/.chatserver/chat.log"), level=logging.DEBUG) from app import app, db, main, socketio db.create_all() app...
7755ab25249c39350004447daa614bc35e4517e7
src/malibu/__init__.py
src/malibu/__init__.py
# -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.check_output( ...
# -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.check_output( ...
Remove unnecessary strip, add finally for release tagger
0.1.8: Remove unnecessary strip, add finally for release tagger
Python
unlicense
maiome-development/malibu
# -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.check_output( ...
# -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.check_output( ...
<commit_before># -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.che...
# -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.check_output( ...
# -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.check_output( ...
<commit_before># -*- coding: utf-8 -*- from malibu import command # noqa from malibu import config # noqa from malibu import database # noqa from malibu import design # noqa from malibu import text # noqa from malibu import util # noqa import subprocess __git_label__ = '' try: __git_label__ = subprocess.che...
44e5d35b6d43a22a480000b39a4e85335a27904b
corehq/apps/es/management/commands/wipe_es.py
corehq/apps/es/management/commands/wipe_es.py
from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser): parser.add_argument( '--commit',...
from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new from corehq.util.es.elasticsearch import IndicesClient class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser...
Use IndicesClient to get full URL
Use IndicesClient to get full URL
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser): parser.add_argument( '--commit',...
from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new from corehq.util.es.elasticsearch import IndicesClient class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser...
<commit_before>from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser): parser.add_argument( ...
from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new from corehq.util.es.elasticsearch import IndicesClient class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser...
from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser): parser.add_argument( '--commit',...
<commit_before>from django.core.management import BaseCommand from corehq.apps.cleanup.utils import confirm_destructive_operation from corehq.elastic import get_es_new class Command(BaseCommand): """ Wipe all data from BlobDB. """ def add_arguments(self, parser): parser.add_argument( ...
a4bc21a1e24b0ac86564b1259a2583ed680a29e2
aque/handlers/reduce.py
aque/handlers/reduce.py
import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) sequence = [child.result() for child in job.children()] try: args = (job['initial'], ) except: args = () log.debug('reducin...
import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) args = job.get('args', ()) if len(args) >= 2: job.error('too many args; reduce expects 1, got %d' % len(args)) return sequence...
Reduce pulls initial from args
Reduce pulls initial from args
Python
bsd-3-clause
mikeboers/aque,mikeboers/aque
import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) sequence = [child.result() for child in job.children()] try: args = (job['initial'], ) except: args = () log.debug('reducin...
import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) args = job.get('args', ()) if len(args) >= 2: job.error('too many args; reduce expects 1, got %d' % len(args)) return sequence...
<commit_before>import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) sequence = [child.result() for child in job.children()] try: args = (job['initial'], ) except: args = () log...
import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) args = job.get('args', ()) if len(args) >= 2: job.error('too many args; reduce expects 1, got %d' % len(args)) return sequence...
import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) sequence = [child.result() for child in job.children()] try: args = (job['initial'], ) except: args = () log.debug('reducin...
<commit_before>import logging from aque.utils import decode_callable log = logging.getLogger(__name__) def reduce_children(job): func = decode_callable(job.get('func')) sequence = [child.result() for child in job.children()] try: args = (job['initial'], ) except: args = () log...
a6be362f03410b53cd21d6ff7b63bdaef6963ad4
findingaids/__init__.py
findingaids/__init__.py
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
Update dev version to 1.10
Update dev version to 1.10
Python
apache-2.0
emory-libraries/findingaids,emory-libraries/findingaids
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
<commit_before># file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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/LICE...
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
<commit_before># file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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/LICE...
4a69aa350f0b3cf95cbf2f518d58310be5731a74
salt/pwm-server/config.py
salt/pwm-server/config.py
SQLALCHEMY_DATABASE_URI = 'sqlite:///srv/pwm-server/db.sqlite'
SQLALCHEMY_DATABASE_URI = 'sqlite:////srv/pwm-server/db.sqlite'
Correct the path to the sqlite db on vagrant
Correct the path to the sqlite db on vagrant
Python
mit
thusoy/pwm-server,thusoy/pwm-server
SQLALCHEMY_DATABASE_URI = 'sqlite:///srv/pwm-server/db.sqlite' Correct the path to the sqlite db on vagrant
SQLALCHEMY_DATABASE_URI = 'sqlite:////srv/pwm-server/db.sqlite'
<commit_before>SQLALCHEMY_DATABASE_URI = 'sqlite:///srv/pwm-server/db.sqlite' <commit_msg>Correct the path to the sqlite db on vagrant<commit_after>
SQLALCHEMY_DATABASE_URI = 'sqlite:////srv/pwm-server/db.sqlite'
SQLALCHEMY_DATABASE_URI = 'sqlite:///srv/pwm-server/db.sqlite' Correct the path to the sqlite db on vagrantSQLALCHEMY_DATABASE_URI = 'sqlite:////srv/pwm-server/db.sqlite'
<commit_before>SQLALCHEMY_DATABASE_URI = 'sqlite:///srv/pwm-server/db.sqlite' <commit_msg>Correct the path to the sqlite db on vagrant<commit_after>SQLALCHEMY_DATABASE_URI = 'sqlite:////srv/pwm-server/db.sqlite'
a8b1b4ca3fd4964b2349ed085e8d2350072e67b9
d1_libclient_python/src/d1_client/__init__.py
d1_libclient_python/src/d1_client/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed under the Apache...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed under the Apache...
Remove implicit import of symbols
Remove implicit import of symbols Currently, using libclient for python requires selecting the target node type (MN or CN) and the target DataONE API version, by specifying the appropriate client, so it better to use the library by explicitly importing only the needed clients instead of all of of them.
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed under the Apache...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed under the Apache...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed u...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed under the Apache...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed under the Apache...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2012 DataONE # # Licensed u...
1ebf1cfb0ca67d7bb10fa776b5944d8755292999
shellstreaming/test/inputstream/test_textfile.py
shellstreaming/test/inputstream/test_textfile.py
# -*- coding: utf-8 -*- from nose.tools import * import os import time from shellstreaming.inputstream.textfile import TextFile TEST_FILE = os.path.abspath(os.path.dirname(__file__)) + '/test_textfile_input01.txt' def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TEST_FILE, batch_span_m...
# -*- coding: utf-8 -*- from nose.tools import * import time from os.path import abspath, dirname, join from shellstreaming.inputstream.textfile import TextFile TEST_FILE = join(abspath(dirname(__file__)), 'test_textfile_input01.txt') def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TE...
Use os.path.join instead of string concatenation.
Use os.path.join instead of string concatenation. Use `join` in order to create path intelligently on all operating systems. See: http://docs.python.org/2/library/os.path.html#os.path.join
Python
apache-2.0
laysakura/shellstreaming,laysakura/shellstreaming
# -*- coding: utf-8 -*- from nose.tools import * import os import time from shellstreaming.inputstream.textfile import TextFile TEST_FILE = os.path.abspath(os.path.dirname(__file__)) + '/test_textfile_input01.txt' def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TEST_FILE, batch_span_m...
# -*- coding: utf-8 -*- from nose.tools import * import time from os.path import abspath, dirname, join from shellstreaming.inputstream.textfile import TextFile TEST_FILE = join(abspath(dirname(__file__)), 'test_textfile_input01.txt') def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TE...
<commit_before># -*- coding: utf-8 -*- from nose.tools import * import os import time from shellstreaming.inputstream.textfile import TextFile TEST_FILE = os.path.abspath(os.path.dirname(__file__)) + '/test_textfile_input01.txt' def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TEST_FIL...
# -*- coding: utf-8 -*- from nose.tools import * import time from os.path import abspath, dirname, join from shellstreaming.inputstream.textfile import TextFile TEST_FILE = join(abspath(dirname(__file__)), 'test_textfile_input01.txt') def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TE...
# -*- coding: utf-8 -*- from nose.tools import * import os import time from shellstreaming.inputstream.textfile import TextFile TEST_FILE = os.path.abspath(os.path.dirname(__file__)) + '/test_textfile_input01.txt' def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TEST_FILE, batch_span_m...
<commit_before># -*- coding: utf-8 -*- from nose.tools import * import os import time from shellstreaming.inputstream.textfile import TextFile TEST_FILE = os.path.abspath(os.path.dirname(__file__)) + '/test_textfile_input01.txt' def test_textfile_usage(): n_batches = n_records = 0 stream = TextFile(TEST_FIL...