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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73e4789517c8de480d1b5e8c05f3dbe9b31883e5 | bouncer/embed_detector.py | bouncer/embed_detector.py | import re
from urllib.parse import urlparse
"""
Hardcoded URL patterns where client is assumed to be embedded.
Only the hostname and path are included in the pattern. The path must be
specified.
These are regular expressions so periods must be escaped.
"""
PATTERNS = [
"h\.readthedocs\.io/.*",
"web\.hypothes... | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | Use fnmatch patterns instead of regexes for URL patterns | Use fnmatch patterns instead of regexes for URL patterns
fnmatch patterns have enough flexibility for this use case and this avoids the
need to remember to escape periods, which is easy to forget otherwise. The
resulting patterns are also easier to read.
| Python | bsd-2-clause | hypothesis/bouncer,hypothesis/bouncer,hypothesis/bouncer | import re
from urllib.parse import urlparse
"""
Hardcoded URL patterns where client is assumed to be embedded.
Only the hostname and path are included in the pattern. The path must be
specified.
These are regular expressions so periods must be escaped.
"""
PATTERNS = [
"h\.readthedocs\.io/.*",
"web\.hypothes... | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | <commit_before>import re
from urllib.parse import urlparse
"""
Hardcoded URL patterns where client is assumed to be embedded.
Only the hostname and path are included in the pattern. The path must be
specified.
These are regular expressions so periods must be escaped.
"""
PATTERNS = [
"h\.readthedocs\.io/.*",
... | import fnmatch
import re
from urllib.parse import urlparse
# Hardcoded URL patterns where client is assumed to be embedded.
#
# Only the hostname and path are included in the pattern. The path must be
# specified; use "example.com/*" to match all URLs on a particular domain.
#
# Patterns are shell-style wildcards ('*'... | import re
from urllib.parse import urlparse
"""
Hardcoded URL patterns where client is assumed to be embedded.
Only the hostname and path are included in the pattern. The path must be
specified.
These are regular expressions so periods must be escaped.
"""
PATTERNS = [
"h\.readthedocs\.io/.*",
"web\.hypothes... | <commit_before>import re
from urllib.parse import urlparse
"""
Hardcoded URL patterns where client is assumed to be embedded.
Only the hostname and path are included in the pattern. The path must be
specified.
These are regular expressions so periods must be escaped.
"""
PATTERNS = [
"h\.readthedocs\.io/.*",
... |
a64024959a36e1a03dbd3ecf27f08a56702ecec4 | eche/tests/test_step1_raed_print.py | eche/tests/test_step1_raed_print.py | import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark.parametrize("t... | import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark.parametrize("t... | Add list with list test. | Add list with list test.
| Python | mit | skk/eche | import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark.parametrize("t... | import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark.parametrize("t... | <commit_before>import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark... | import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark.parametrize("t... | import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark.parametrize("t... | <commit_before>import pytest
from eche.reader import read_str
from eche.printer import print_str
import math
@pytest.mark.parametrize("test_input", [
'1',
'-1',
'0',
str(math.pi),
str(math.e)
])
def test_numbers(test_input):
assert print_str(read_str(test_input)) == test_input
@pytest.mark... |
e20aaffc908a762757b6b4cb73f6d607b15ac03a | tracker.py | tracker.py | #-*- coding: utf-8 -*-
import time
import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
import json
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_status(self, statu... | import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_status(self, status):
print status.created_at
#W... | Remove unnecessary code and libraries | Remove unnecessary code and libraries
| Python | mit | tim-thompson/TweetTimeTracker | #-*- coding: utf-8 -*-
import time
import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
import json
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_status(self, statu... | import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_status(self, status):
print status.created_at
#W... | <commit_before>#-*- coding: utf-8 -*-
import time
import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
import json
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_sta... | import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_status(self, status):
print status.created_at
#W... | #-*- coding: utf-8 -*-
import time
import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
import json
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_status(self, statu... | <commit_before>#-*- coding: utf-8 -*-
import time
import sys
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
import tweepy
import json
#Get Hashtag to track
argTag = sys.argv[1]
#Class for listening to all tweets
class TweetListener(StreamListener):
def on_sta... |
c2d9a7a276b4f0442663a62bafb3c70bd7373f7e | distarray/local/tests/paralleltest_io.py | distarray/local/tests/paralleltest_io.py | import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 = LocalArray((7,... | import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 = LocalArray((7,... | Add missing `comm` argument to LocalArray constructor. | Add missing `comm` argument to LocalArray constructor.
Segfaults otherwise... | Python | bsd-3-clause | RaoUmer/distarray,RaoUmer/distarray,enthought/distarray,enthought/distarray | import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 = LocalArray((7,... | import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 = LocalArray((7,... | <commit_before>import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 =... | import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 = LocalArray((7,... | import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 = LocalArray((7,... | <commit_before>import tempfile
from numpy.testing import assert_allclose
from os import path
from distarray.local import LocalArray, save, load
from distarray.testing import comm_null_passes, MpiTestCase
class TestFlatFileIO(MpiTestCase):
@comm_null_passes
def test_flat_file_read_write(self):
larr0 =... |
12fc9a49a0dd55836165d89df6bb59ffecdd03eb | bayespy/inference/vmp/nodes/__init__.py | bayespy/inference/vmp/nodes/__init__.py | ################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . import *
from .b... | ################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . import *
from .b... | Add Choose node to imported nodes | ENH: Add Choose node to imported nodes
| Python | mit | bayespy/bayespy,jluttine/bayespy | ################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . import *
from .b... | ################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . import *
from .b... | <commit_before>################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . imp... | ################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . import *
from .b... | ################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . import *
from .b... | <commit_before>################################################################################
# Copyright (C) 2011-2012 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
# Import some most commonly used nodes
from . imp... |
53dc86ace10f73832c0cbca9fcbc0389999a0e1c | hyperion/util/convenience.py | hyperion/util/convenience.py | class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptThinRadius(self.tempera... | import numpy as np
class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptTh... | Deal with the case of large radii for optically thin temperature radius | Deal with the case of large radii for optically thin temperature radius
| Python | bsd-2-clause | hyperion-rt/hyperion,bluescarni/hyperion,hyperion-rt/hyperion,astrofrog/hyperion,astrofrog/hyperion,bluescarni/hyperion,hyperion-rt/hyperion | class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptThinRadius(self.tempera... | import numpy as np
class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptTh... | <commit_before>class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptThinRadi... | import numpy as np
class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptTh... | class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptThinRadius(self.tempera... | <commit_before>class OptThinRadius(object):
def __init__(self, temperature, value=1.):
self.temperature = temperature
self.value = value
def __mul__(self, value):
return OptThinRadius(self.temperature, value=self.value * value)
def __rmul__(self, value):
return OptThinRadi... |
8dd06e484b1b1bf71fbeb131340fd8358aa001b9 | cattle/plugins/core/publisher.py | cattle/plugins/core/publisher.py | import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_manager.MARSHAL... | import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_manager.MARSHAL... | Increase HTTP timeout to 60 seconds | Increase HTTP timeout to 60 seconds
| Python | apache-2.0 | wlan0/python-agent,rancher/python-agent,wlan0/python-agent,cjellick/python-agent,rancherio/python-agent,rancherio/python-agent,cjellick/python-agent,rancher/python-agent | import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_manager.MARSHAL... | import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_manager.MARSHAL... | <commit_before>import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_... | import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_manager.MARSHAL... | import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_manager.MARSHAL... | <commit_before>import logging
import requests
import time
from cattle import type_manager
from cattle.utils import log_request
log = logging.getLogger("agent")
class Publisher:
def __init__(self, url, auth):
self._url = url
self._auth = auth
self._marshaller = type_manager.get_type(type_... |
d0b56003b2b508a5db43986064d2e01fecefe155 | virtool/indexes/models.py | virtool/indexes/models.py | from sqlalchemy import Column, Enum, Integer, String
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to store new index fil... | from sqlalchemy import Column, Enum, Integer, String, UniqueConstraint
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to s... | Add UniqueConstraint for IndexFile SQL model | Add UniqueConstraint for IndexFile SQL model
| Python | mit | virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool | from sqlalchemy import Column, Enum, Integer, String
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to store new index fil... | from sqlalchemy import Column, Enum, Integer, String, UniqueConstraint
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to s... | <commit_before>from sqlalchemy import Column, Enum, Integer, String
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to stor... | from sqlalchemy import Column, Enum, Integer, String, UniqueConstraint
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to s... | from sqlalchemy import Column, Enum, Integer, String
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to store new index fil... | <commit_before>from sqlalchemy import Column, Enum, Integer, String
from virtool.pg.utils import Base, SQLEnum
class IndexType(str, SQLEnum):
"""
Enumerated type for index file types
"""
json = "json"
fasta = "fasta"
bowtie2 = "bowtie2"
class IndexFile(Base):
"""
SQL model to stor... |
b415e265f6b725c7e1a99d2ee1dae77f0cd555a7 | config.py | config.py | # Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-server-cf63e.fir... | # Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-server-cf63e.fir... | Add category filtering on the server side to save client fetching. | Add category filtering on the server side to save client fetching.
| Python | mpl-2.0 | liuche/prox-server | # Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-server-cf63e.fir... | # Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-server-cf63e.fir... | <commit_before># Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-s... | # Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-server-cf63e.fir... | # Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-server-cf63e.fir... | <commit_before># Paths to key files
FIREBASE_KEY_PATH="firebase.local.json"
# Firebase config for prox-server
# These are public-facing and can be found in the console under Auth > Web Setup (in the top-right corner)
FIREBASE_CONFIG = {
"apiKey": "AIzaSyCksV_AC0oB9OnJmj0YgXNOrmnJawNbFeE",
"authDomain": "prox-s... |
cd2ecd3bede2886c384e4761f7052cfacb7d24ae | modules/serialize.py | modules/serialize.py | import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = 'json'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
json.dump(s... | import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = '.sublime-session'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
... | Use "sublime-session" as file extension | Use "sublime-session" as file extension
Furthermore fix some bugs in serialize.py
| Python | mit | Zeeker/sublime-SessionManager | import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = 'json'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
json.dump(s... | import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = '.sublime-session'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
... | <commit_before>import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = 'json'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
... | import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = '.sublime-session'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
... | import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = 'json'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
json.dump(s... | <commit_before>import sublime
import json
import os
from ..json import encoder
from ..json import decoder
from . import settings
_DEFAULT_PATH = os.path.join('User', 'sessions')
_DEFAULT_EXTENSION = 'json'
def dump(name, session):
session_path = _generate_path(name)
with open(session_path, 'w') as f:
... |
17d66bad1fd2ad75294dde5cbf0c1b5c694ae54c | bin/get_templates.py | bin/get_templates.py | #!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, "WeakMetal", ()... | #!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, "WeakMetal", ()... | Add functionality to delete all templates | Add functionality to delete all templates
| Python | mit | Tactique/game_engine,Tactique/game_engine | #!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, "WeakMetal", ()... | #!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, "WeakMetal", ()... | <commit_before>#!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, ... | #!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, "WeakMetal", ()... | #!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, "WeakMetal", ()... | <commit_before>#!/usr/bin/env python
import json
import os
from lib.functional import multi_map
from engine import types, consts
template_dir = os.path.join(os.environ['PORTER'], 'templates')
structs = (
(types.new_unit, "Tank", (consts.RED,)),
(types.new_attack, "RegularCannon", ()),
(types.new_armor, ... |
464e13cc9065b966eadd1413802c32c536c478fd | tests/optvis/param/test_cppn.py | tests/optvis/param/test_cppn.py | from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Session() as sess:... | from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Session() as sess:... | Add retries to cppn param test | Add retries to cppn param test
| Python | apache-2.0 | tensorflow/lucid,tensorflow/lucid,tensorflow/lucid,tensorflow/lucid | from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Session() as sess:... | from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Session() as sess:... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Ses... | from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Session() as sess:... | from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Session() as sess:... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import tensorflow as tf
import logging
from lucid.optvis.param.cppn import cppn
log = logging.getLogger(__name__)
@pytest.mark.slow
def test_cppn_fits_xor():
with tf.Graph().as_default(), tf.Ses... |
90f56855d992dc03ddcc8e5c2db08ed0e5917e39 | ipython/profile/00_import_sciqnd.py | ipython/profile/00_import_sciqnd.py | import cPickle as pickle
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following lines call magic commands
get_ipytho... | import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following ... | Add useful modules/pckg from the standard library | Add useful modules/pckg from the standard library
| Python | mit | escorciav/linux-utils,escorciav/linux-utils | import cPickle as pickle
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following lines call magic commands
get_ipytho... | import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following ... | <commit_before>import cPickle as pickle
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following lines call magic comm... | import cPickle as pickle
import glob
import json
import math
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following ... | import cPickle as pickle
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following lines call magic commands
get_ipytho... | <commit_before>import cPickle as pickle
import os
import sys
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sp
import scipy.io
import scipy.stats
import skimage
import skimage.transform
import skimage.io
import cv2
# The following lines call magic comm... |
9a6150ca2303bb1c682cdc037853e2cf182a1baa | halng/commands.py | halng/commands.py | import logging
import os
import brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add_option("", "--... | import logging
import os
from brain import Brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add_opt... | Update to use the static Brain.init() | Update to use the static Brain.init()
| Python | mit | DarkMio/cobe,tiagochiavericosta/cobe,wodim/cobe-ng,pteichman/cobe,tiagochiavericosta/cobe,meska/cobe,wodim/cobe-ng,DarkMio/cobe,meska/cobe,LeMagnesium/cobe,pteichman/cobe,LeMagnesium/cobe | import logging
import os
import brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add_option("", "--... | import logging
import os
from brain import Brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add_opt... | <commit_before>import logging
import os
import brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add... | import logging
import os
from brain import Brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add_opt... | import logging
import os
import brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add_option("", "--... | <commit_before>import logging
import os
import brain
from cmdparse import Command
log = logging.getLogger("hal")
class InitCommand(Command):
def __init__(self):
Command.__init__(self, "init", summary="Initialize a new brain")
self.add_option("", "--force", action="store_true")
self.add... |
41b4b94470e777876c386b33ee6181f6193169e6 | version.py | version.py | major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26 | major = 0
minor=0
patch=11
branch="master"
timestamp=1376505745.87 | Tag commit for v0.0.11-master generated by gitmake.py | Tag commit for v0.0.11-master generated by gitmake.py
| Python | mit | ryansturmer/gitmake | major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26Tag commit for v0.0.11-master generated by gitmake.py | major = 0
minor=0
patch=11
branch="master"
timestamp=1376505745.87 | <commit_before>major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26<commit_msg>Tag commit for v0.0.11-master generated by gitmake.py<commit_after> | major = 0
minor=0
patch=11
branch="master"
timestamp=1376505745.87 | major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26Tag commit for v0.0.11-master generated by gitmake.pymajor = 0
minor=0
patch=11
branch="master"
timestamp=1376505745.87 | <commit_before>major = 0
minor=0
patch=10
branch="master"
timestamp=1376502388.26<commit_msg>Tag commit for v0.0.11-master generated by gitmake.py<commit_after>major = 0
minor=0
patch=11
branch="master"
timestamp=1376505745.87 |
9c786c82671ade46e7af309fd597d5eac93a75b0 | pycah/db/__init__.py | pycah/db/__init__.py | import psycopg2
c = psycopg2.connect(user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.curs... | import psycopg2
c = psycopg2.connect(user='postgres', password='password', host='127.0.0.1')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password', host='127.0.0.1')
c.set_ses... | Fix database connectivity on Linux. | Fix database connectivity on Linux.
| Python | mit | nhardy/pyCAH,nhardy/pyCAH,nhardy/pyCAH | import psycopg2
c = psycopg2.connect(user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.curs... | import psycopg2
c = psycopg2.connect(user='postgres', password='password', host='127.0.0.1')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password', host='127.0.0.1')
c.set_ses... | <commit_before>import psycopg2
c = psycopg2.connect(user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password')
c.set_session(autocommit=True)... | import psycopg2
c = psycopg2.connect(user='postgres', password='password', host='127.0.0.1')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password', host='127.0.0.1')
c.set_ses... | import psycopg2
c = psycopg2.connect(user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.curs... | <commit_before>import psycopg2
c = psycopg2.connect(user='postgres', password='password')
c.set_session(autocommit=True)
cur = c.cursor()
try:
cur.execute('CREATE DATABASE pycah;')
c.commit()
c.close()
c = psycopg2.connect(database='pycah', user='postgres', password='password')
c.set_session(autocommit=True)... |
a58a6b897370e82aa3625c36a00e2de74c16ab6c | cortex/__init__.py | cortex/__init__.py | from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import show as webshow
... | from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import show as webshow
... | Fix up the deprecate surfs object | Fix up the deprecate surfs object
| Python | bsd-2-clause | gallantlab/pycortex,gallantlab/pycortex,CVML/pycortex,CVML/pycortex,smerdis/pycortex,smerdis/pycortex,smerdis/pycortex,gallantlab/pycortex,gallantlab/pycortex,gallantlab/pycortex,CVML/pycortex,smerdis/pycortex,CVML/pycortex,CVML/pycortex,smerdis/pycortex | from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import show as webshow
... | from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import show as webshow
... | <commit_before>from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import s... | from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import show as webshow
... | from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import show as webshow
... | <commit_before>from .dataset import Dataset, VolumeData, VertexData, DataView, View
from . import align, volume, quickflat, webgl, segment, options
from .database import db
from .utils import *
from .quickflat import make_figure as quickshow
openFile = Dataset.from_file
try:
from . import webgl
from .webgl import s... |
cae7a57304e207f319e9bb2e52837ee207d0d96e | mcdowell/src/main/python/ch1/ch1.py | mcdowell/src/main/python/ch1/ch1.py | def unique(string):
counter = {}
for c in string:
if c in counter:
counter[c] += 1
else:
counter[c] = 1
print(counter)
for k in counter:
if counter[k] > 1:
return False
else:
return True
def reverse(string):
result = []
for... | def unique(string):
counter = {}
for c in string:
if c in counter:
return False
else:
counter[c] = 1
else:
return True
def reverse(string):
result = []
for i in range(len(string)):
result.append(string[-(i+1)])
return "".join(result)
def ... | Add is_permutation function. Simplifiy unique function. | Add is_permutation function. Simplifiy unique function.
| Python | mit | jamesewoo/tigeruppercut,jamesewoo/tigeruppercut | def unique(string):
counter = {}
for c in string:
if c in counter:
counter[c] += 1
else:
counter[c] = 1
print(counter)
for k in counter:
if counter[k] > 1:
return False
else:
return True
def reverse(string):
result = []
for... | def unique(string):
counter = {}
for c in string:
if c in counter:
return False
else:
counter[c] = 1
else:
return True
def reverse(string):
result = []
for i in range(len(string)):
result.append(string[-(i+1)])
return "".join(result)
def ... | <commit_before>def unique(string):
counter = {}
for c in string:
if c in counter:
counter[c] += 1
else:
counter[c] = 1
print(counter)
for k in counter:
if counter[k] > 1:
return False
else:
return True
def reverse(string):
resu... | def unique(string):
counter = {}
for c in string:
if c in counter:
return False
else:
counter[c] = 1
else:
return True
def reverse(string):
result = []
for i in range(len(string)):
result.append(string[-(i+1)])
return "".join(result)
def ... | def unique(string):
counter = {}
for c in string:
if c in counter:
counter[c] += 1
else:
counter[c] = 1
print(counter)
for k in counter:
if counter[k] > 1:
return False
else:
return True
def reverse(string):
result = []
for... | <commit_before>def unique(string):
counter = {}
for c in string:
if c in counter:
counter[c] += 1
else:
counter[c] = 1
print(counter)
for k in counter:
if counter[k] > 1:
return False
else:
return True
def reverse(string):
resu... |
eda5e7e2bb83f35e18cd0b5402636d4e930e02b9 | mamba/cli.py | mamba/cli.py | # -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.ApplicationFactory(a... | # -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.ApplicationFactory(a... | Use a choices for specifiying type of reporter | Use a choices for specifiying type of reporter
| Python | mit | dex4er/mamba,nestorsalceda/mamba,angelsanz/mamba,jaimegildesagredo/mamba,markng/mamba,eferro/mamba,alejandrodob/mamba | # -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.ApplicationFactory(a... | # -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.ApplicationFactory(a... | <commit_before># -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.Appli... | # -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.ApplicationFactory(a... | # -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.ApplicationFactory(a... | <commit_before># -*- coding: utf-8 -*-
import sys
import argparse
from mamba import application_factory, __version__
from mamba.infrastructure import is_python3
def main():
arguments = _parse_arguments()
if arguments.version:
print(__version__)
return
factory = application_factory.Appli... |
6b72e0bbb09e8f8b6d8821252e34aeca89693441 | mt_core/backends/__init__.py | mt_core/backends/__init__.py | # coding=UTF-8
| # coding=UTF-8
class GuestInfo:
OS_WINDOWS = "windows"
OS_LINUX = "linux"
def __init__(self, username, password, os):
self.username = username
self.password = password
self.os = os
class Hypervisor:
# 完全克隆
CLONE_FULL = 0
# 链接克隆
CLONE_LINKED = 1
def clone(self... | Add Hypervisor base class for workstation and virtualbox | Add Hypervisor base class for workstation and virtualbox
| Python | mit | CADTS-Bachelor/mini-testbed | # coding=UTF-8
Add Hypervisor base class for workstation and virtualbox | # coding=UTF-8
class GuestInfo:
OS_WINDOWS = "windows"
OS_LINUX = "linux"
def __init__(self, username, password, os):
self.username = username
self.password = password
self.os = os
class Hypervisor:
# 完全克隆
CLONE_FULL = 0
# 链接克隆
CLONE_LINKED = 1
def clone(self... | <commit_before># coding=UTF-8
<commit_msg>Add Hypervisor base class for workstation and virtualbox<commit_after> | # coding=UTF-8
class GuestInfo:
OS_WINDOWS = "windows"
OS_LINUX = "linux"
def __init__(self, username, password, os):
self.username = username
self.password = password
self.os = os
class Hypervisor:
# 完全克隆
CLONE_FULL = 0
# 链接克隆
CLONE_LINKED = 1
def clone(self... | # coding=UTF-8
Add Hypervisor base class for workstation and virtualbox# coding=UTF-8
class GuestInfo:
OS_WINDOWS = "windows"
OS_LINUX = "linux"
def __init__(self, username, password, os):
self.username = username
self.password = password
self.os = os
class Hypervisor:
# 完全克隆... | <commit_before># coding=UTF-8
<commit_msg>Add Hypervisor base class for workstation and virtualbox<commit_after># coding=UTF-8
class GuestInfo:
OS_WINDOWS = "windows"
OS_LINUX = "linux"
def __init__(self, username, password, os):
self.username = username
self.password = password
se... |
e478a70549164bee7351f01c161a8b0ef6f8c1c8 | dashboard/src/api.py | dashboard/src/api.py | import requests
import os
class Api:
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
self.url = Api.add_slash(url)
self.token = token
def is_api_running(self):
try:
res = requests.get(self.url)
if res.status_code in {200, 401}:
... | """Module with class representing common API."""
import requests
import os
class Api:
"""Class representing common API."""
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
"""Set the API endpoint and store the authorization token if provided."""
self.url = Api.add_slash(url)... | Add staticmethod annotation + docstrings to module, class, and all public methods | Add staticmethod annotation + docstrings to module, class, and all public methods
| Python | apache-2.0 | jpopelka/fabric8-analytics-common,jpopelka/fabric8-analytics-common,jpopelka/fabric8-analytics-common,tisnik/fabric8-analytics-common,tisnik/fabric8-analytics-common,tisnik/fabric8-analytics-common | import requests
import os
class Api:
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
self.url = Api.add_slash(url)
self.token = token
def is_api_running(self):
try:
res = requests.get(self.url)
if res.status_code in {200, 401}:
... | """Module with class representing common API."""
import requests
import os
class Api:
"""Class representing common API."""
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
"""Set the API endpoint and store the authorization token if provided."""
self.url = Api.add_slash(url)... | <commit_before>import requests
import os
class Api:
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
self.url = Api.add_slash(url)
self.token = token
def is_api_running(self):
try:
res = requests.get(self.url)
if res.status_code in {200, 401}... | """Module with class representing common API."""
import requests
import os
class Api:
"""Class representing common API."""
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
"""Set the API endpoint and store the authorization token if provided."""
self.url = Api.add_slash(url)... | import requests
import os
class Api:
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
self.url = Api.add_slash(url)
self.token = token
def is_api_running(self):
try:
res = requests.get(self.url)
if res.status_code in {200, 401}:
... | <commit_before>import requests
import os
class Api:
_API_ENDPOINT = 'api/v1'
def __init__(self, url, token=None):
self.url = Api.add_slash(url)
self.token = token
def is_api_running(self):
try:
res = requests.get(self.url)
if res.status_code in {200, 401}... |
abcee44e3a2b20856cf78d38de5a1a72c5b9a097 | retdec/decompilation_phase.py | retdec/decompilation_phase.py | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, completion):
... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, completion):
... | Fix the description of DecompilationPhase.__init__(). | Fix the description of DecompilationPhase.__init__().
| Python | mit | s3rvac/retdec-python | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, completion):
... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, completion):
... | <commit_before>#
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, ... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, completion):
... | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, completion):
... | <commit_before>#
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <[email protected]> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Phase of a decompilation."""
class DecompilationPhase:
"""Phase of a decompilation."""
def __init__(self, name, part, description, ... |
c86b6390e46bac17c64e19010912c4cb165fa9dd | satnogsclient/settings.py | satnogsclient/settings.py | from os import environ
DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('OUTPUT_PATH', None)
| from os import environ
DEMODULATION_COMMAND = environ.get('SATNOGS_DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('SATNOGS_ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('SATNOGS_DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('SATNOGS_OUTPUT_PATH', None)
| Add prefix to required environment variables. | Add prefix to required environment variables.
| Python | agpl-3.0 | cshields/satnogs-client,adamkalis/satnogs-client,adamkalis/satnogs-client,cshields/satnogs-client | from os import environ
DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('OUTPUT_PATH', None)
Add prefix to required environment variables. | from os import environ
DEMODULATION_COMMAND = environ.get('SATNOGS_DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('SATNOGS_ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('SATNOGS_DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('SATNOGS_OUTPUT_PATH', None)
| <commit_before>from os import environ
DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('OUTPUT_PATH', None)
<commit_msg>Add prefix to required environment variable... | from os import environ
DEMODULATION_COMMAND = environ.get('SATNOGS_DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('SATNOGS_ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('SATNOGS_DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('SATNOGS_OUTPUT_PATH', None)
| from os import environ
DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('OUTPUT_PATH', None)
Add prefix to required environment variables.from os import environ
D... | <commit_before>from os import environ
DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None)
ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None)
DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
OUTPUT_PATH = environ.get('OUTPUT_PATH', None)
<commit_msg>Add prefix to required environment variable... |
d7bb652118970c97dacd26f8aff60aa16804e21c | sqlalchemy_redshift/__init__.py | sqlalchemy_redshift/__init__.py | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | Remove clearing of exception context when raising a new exception | Remove clearing of exception context when raising a new exception
This syntax is only supported in Python 3.3 and up and is causing tests in
Python 2.7 to fail.
| Python | mit | sqlalchemy-redshift/sqlalchemy-redshift,graingert/redshift_sqlalchemy,sqlalchemy-redshift/sqlalchemy-redshift | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | <commit_before>from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi... | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | <commit_before>from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi... |
bf2ace8bd6cb0c492ff4347f9c2fe10a003abaff | sqlalchemy_redshift/__init__.py | sqlalchemy_redshift/__init__.py | from pkg_resources import get_distribution, parse_version
try:
import psycopg2 # noqa: F401
if get_distribution('psycopg2').parsed_version < parse_version('2.5'):
raise ImportError('Minimum required version for psycopg2 is 2.5')
except ImportError:
raise ImportError(
'No module named psyco... | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | Check the version of any of the supported Psycopg2 packages | Check the version of any of the supported Psycopg2 packages
A check was introduced in commit 8e0c4857a1c08f257b95d3b1ee5f6eb795d55cdc which
would check what version of the 'psycopg2' Python (pip) package was installed
as the dependency was removed from setup.py.
The check would however only check the 'psycopg2' packa... | Python | mit | sqlalchemy-redshift/sqlalchemy-redshift,graingert/redshift_sqlalchemy,sqlalchemy-redshift/sqlalchemy-redshift | from pkg_resources import get_distribution, parse_version
try:
import psycopg2 # noqa: F401
if get_distribution('psycopg2').parsed_version < parse_version('2.5'):
raise ImportError('Minimum required version for psycopg2 is 2.5')
except ImportError:
raise ImportError(
'No module named psyco... | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | <commit_before>from pkg_resources import get_distribution, parse_version
try:
import psycopg2 # noqa: F401
if get_distribution('psycopg2').parsed_version < parse_version('2.5'):
raise ImportError('Minimum required version for psycopg2 is 2.5')
except ImportError:
raise ImportError(
'No mod... | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | from pkg_resources import get_distribution, parse_version
try:
import psycopg2 # noqa: F401
if get_distribution('psycopg2').parsed_version < parse_version('2.5'):
raise ImportError('Minimum required version for psycopg2 is 2.5')
except ImportError:
raise ImportError(
'No module named psyco... | <commit_before>from pkg_resources import get_distribution, parse_version
try:
import psycopg2 # noqa: F401
if get_distribution('psycopg2').parsed_version < parse_version('2.5'):
raise ImportError('Minimum required version for psycopg2 is 2.5')
except ImportError:
raise ImportError(
'No mod... |
485d32e71996194fd5bf7bddb2535b5753b23572 | plasmapy/classes/tests/test_plasma_base.py | plasmapy/classes/tests/test_plasma_base.py | from plasmapy.classes import BasePlasma, GenericPlasma
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return ... | from plasmapy.classes import BasePlasma, GenericPlasma
# Get rid of any previously registered classes.
BasePlasma._registry = {}
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
... | Fix failing tests on setup.py test | Fix failing tests on setup.py test
| Python | bsd-3-clause | StanczakDominik/PlasmaPy | from plasmapy.classes import BasePlasma, GenericPlasma
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return ... | from plasmapy.classes import BasePlasma, GenericPlasma
# Get rid of any previously registered classes.
BasePlasma._registry = {}
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
... | <commit_before>from plasmapy.classes import BasePlasma, GenericPlasma
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
... | from plasmapy.classes import BasePlasma, GenericPlasma
# Get rid of any previously registered classes.
BasePlasma._registry = {}
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
... | from plasmapy.classes import BasePlasma, GenericPlasma
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return ... | <commit_before>from plasmapy.classes import BasePlasma, GenericPlasma
class NoDataSource(BasePlasma):
pass
class IsDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
return True
class IsNotDataSource(BasePlasma):
@classmethod
def is_datasource_for(cls, **kwargs):
... |
2d9d3e5a0a904a52e8b97bdb64e59f455d15b6e8 | migrations/versions/1815829d365_.py | migrations/versions/1815829d365_.py | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | Add geometry_application_reference to new unique index. | Add geometry_application_reference to new unique index.
| Python | mit | LandRegistry/system-of-record,LandRegistry/system-of-record | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | <commit_before>"""empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by... | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | """empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - plea... | <commit_before>"""empty message
Revision ID: 1815829d365
Revises: 3fcddd64a72
Create Date: 2016-02-09 17:58:47.362133
"""
# revision identifiers, used by Alembic.
revision = '1815829d365'
down_revision = '3fcddd64a72'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by... |
3ed14bcd364d1843e35cd4a6d1bd48e06379c223 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
from SublimeLinter.lint import Linter
class Hlint(Linter):
"""Provides an interface to hlint."""
defau... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
class Hlint(Linter):
"""Provides an interface ... | Use JSON to parse hlint output | Use JSON to parse hlint output
| Python | mit | SublimeLinter/SublimeLinter-hlint | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
from SublimeLinter.lint import Linter
class Hlint(Linter):
"""Provides an interface to hlint."""
defau... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
class Hlint(Linter):
"""Provides an interface ... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
from SublimeLinter.lint import Linter
class Hlint(Linter):
"""Provides an interface to hlint... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
class Hlint(Linter):
"""Provides an interface ... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
from SublimeLinter.lint import Linter
class Hlint(Linter):
"""Provides an interface to hlint."""
defau... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
from SublimeLinter.lint import Linter
class Hlint(Linter):
"""Provides an interface to hlint... |
b5776f5223b5f648d166c7608abe79c7fb566bb2 | templatetags/views.py | templatetags/views.py | from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(csrf_exempt)
... | from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(csrf_exempt)
... | Fix preview still being slightly different. | Fix preview still being slightly different.
| Python | isc | ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite | from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(csrf_exempt)
... | from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(csrf_exempt)
... | <commit_before>from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(c... | from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(csrf_exempt)
... | from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(csrf_exempt)
... | <commit_before>from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.shortcuts import render
# Create your views here.
class MarkdownPreview(View):
template_name = "markdown_preview.html"
@method_decorator(c... |
0683645a2fb2323a9534d985005d843aada66040 | anypytools/__init__.py | anypytools/__init__.py | # -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHandler())
__all__ = ... | # -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess, execute_anybodycon
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHan... | Add execute_anybodycon to toplevel package | Add execute_anybodycon to toplevel package
| Python | mit | AnyBody-Research-Group/AnyPyTools | # -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHandler())
__all__ = ... | # -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess, execute_anybodycon
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHan... | <commit_before># -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHandler(... | # -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess, execute_anybodycon
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHan... | # -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHandler())
__all__ = ... | <commit_before># -*- coding: utf-8 -*-
"""AnyPyTools library."""
import sys
import platform
import logging
from anypytools.abcutils import AnyPyProcess
from anypytools.macroutils import AnyMacro
from anypytools import macro_commands
logger = logging.getLogger('abt.anypytools')
logger.addHandler(logging.NullHandler(... |
818de1d8ef32ef853d37e753cc0dc701d76d04ea | app/apis/search_api.py | app/apis/search_api.py | from flask import Blueprint, jsonify, request
from importlib import import_module
import re
blueprint = Blueprint('search_api', __name__, url_prefix='/search')
@blueprint.route('/<string:model>')
def api(model):
global Model
class_name = model.title() + 'Search'
model_name = model + '_search'
Model =... | # -*- coding: utf-8 -*-
import sys
from flask import Blueprint, jsonify, request
from importlib import import_module
from unicodedata import normalize
reload(sys)
sys.setdefaultencoding('utf8')
def remove_accents(txt):
return normalize('NFKD', txt.decode('utf-8')).encode('ASCII','ignore')
blueprint = Blueprint(... | Add support to search for word in search api | Add support to search for word in search api
| Python | mit | daniel1409/dataviva-api,DataViva/dataviva-api | from flask import Blueprint, jsonify, request
from importlib import import_module
import re
blueprint = Blueprint('search_api', __name__, url_prefix='/search')
@blueprint.route('/<string:model>')
def api(model):
global Model
class_name = model.title() + 'Search'
model_name = model + '_search'
Model =... | # -*- coding: utf-8 -*-
import sys
from flask import Blueprint, jsonify, request
from importlib import import_module
from unicodedata import normalize
reload(sys)
sys.setdefaultencoding('utf8')
def remove_accents(txt):
return normalize('NFKD', txt.decode('utf-8')).encode('ASCII','ignore')
blueprint = Blueprint(... | <commit_before>from flask import Blueprint, jsonify, request
from importlib import import_module
import re
blueprint = Blueprint('search_api', __name__, url_prefix='/search')
@blueprint.route('/<string:model>')
def api(model):
global Model
class_name = model.title() + 'Search'
model_name = model + '_sear... | # -*- coding: utf-8 -*-
import sys
from flask import Blueprint, jsonify, request
from importlib import import_module
from unicodedata import normalize
reload(sys)
sys.setdefaultencoding('utf8')
def remove_accents(txt):
return normalize('NFKD', txt.decode('utf-8')).encode('ASCII','ignore')
blueprint = Blueprint(... | from flask import Blueprint, jsonify, request
from importlib import import_module
import re
blueprint = Blueprint('search_api', __name__, url_prefix='/search')
@blueprint.route('/<string:model>')
def api(model):
global Model
class_name = model.title() + 'Search'
model_name = model + '_search'
Model =... | <commit_before>from flask import Blueprint, jsonify, request
from importlib import import_module
import re
blueprint = Blueprint('search_api', __name__, url_prefix='/search')
@blueprint.route('/<string:model>')
def api(model):
global Model
class_name = model.title() + 'Search'
model_name = model + '_sear... |
2f7ead81f6820f0c4f47a3334ed6bf418c02fe9d | simpleseo/templatetags/seo.py | simpleseo/templatetags/seo.py | from django.template import Library
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata.html', takes_context=True)
def get_seo(context):
... | from django.template import Library
from django.utils.translation import get_language
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata... | Add simple tags for title and description | Add simple tags for title and description
| Python | bsd-3-clause | AMongeMoreno/django-painless-seo,AMongeMoreno/django-painless-seo,Glamping-Hub/django-painless-seo,Glamping-Hub/django-painless-seo | from django.template import Library
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata.html', takes_context=True)
def get_seo(context):
... | from django.template import Library
from django.utils.translation import get_language
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata... | <commit_before>from django.template import Library
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata.html', takes_context=True)
def get... | from django.template import Library
from django.utils.translation import get_language
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata... | from django.template import Library
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata.html', takes_context=True)
def get_seo(context):
... | <commit_before>from django.template import Library
from simpleseo import settings
from simpleseo.models import SeoMetadata
register = Library()
@register.filter
def single_quotes(description):
return description.replace('\"', '\'')
@register.inclusion_tag('simpleseo/metadata.html', takes_context=True)
def get... |
4f4522bfa969a823a240a6ce16bcec395da06cf2 | src/poliastro/twobody/decorators.py | src/poliastro/twobody/decorators.py | """Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
r, v = u_[:... | """Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
r, v = u_[:... | Remove extra arguments from decorated function | Remove extra arguments from decorated function
| Python | mit | anhiga/poliastro,poliastro/poliastro,Juanlu001/poliastro,newlawrence/poliastro,newlawrence/poliastro,anhiga/poliastro,newlawrence/poliastro,Juanlu001/poliastro,anhiga/poliastro,Juanlu001/poliastro | """Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
r, v = u_[:... | """Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
r, v = u_[:... | <commit_before>"""Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
... | """Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
r, v = u_[:... | """Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
r, v = u_[:... | <commit_before>"""Decorators.
"""
from functools import wraps
from astropy import units as u
from poliastro.bodies import Body
from poliastro.twobody.rv import RVState
u.kms = u.km / u.s
u.km3s2 = u.km ** 3 / u.s ** 2
def state_from_vector(func):
@wraps(func)
def wrapper(t, u_, k, *args, **kwargs):
... |
1fca398ce977dbdcb0bcb8aec953c3e6bd7fd320 | actions/aws_decrypt_password_data.py | actions/aws_decrypt_password_data.py | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | Remove broken leading and trailing characters. | Remove broken leading and trailing characters.
| Python | apache-2.0 | StackStorm/st2cd,StackStorm/st2cd | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | <commit_before>#!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpass... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | <commit_before>#!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpass... |
64c9d2c53f0dc4c9ae92b5675248a8f11c2b4e9e | pyqode/python/managers/file.py | pyqode/python/managers/file.py | """
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extracting its
en... | """
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extracting its
en... | Fix encoding detection in python (shebang line was not parsed anymore) | Fix encoding detection in python (shebang line was not parsed anymore)
| Python | mit | pyQode/pyqode.python,mmolero/pyqode.python,pyQode/pyqode.python,zwadar/pyqode.python | """
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extracting its
en... | """
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extracting its
en... | <commit_before>"""
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extrac... | """
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extracting its
en... | """
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extracting its
en... | <commit_before>"""
Contains the python specific FileManager.
"""
import ast
import re
from pyqode.core.managers import FileManager
class PyFileManager(FileManager):
"""
Extends file manager to override detect_encoding. With python, we can
detect encoding by reading the two first lines of a file and extrac... |
7c5048ec810b5a0d4eb4d7b08469b8baa67e685f | util/regression-tests/config.py | util/regression-tests/config.py | # Location of Apache Error Log
log_location_linux = '/var/log/httpd/error_log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2} [A-z][a-z]{2}... | # Location of Apache Error Log
log_location_linux = '/var/log/apache2/error.log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2} [A-z][a-z]{... | Update log location to reflect ubuntu | Update log location to reflect ubuntu | Python | apache-2.0 | coreruleset/coreruleset,SpiderLabs/owasp-modsecurity-crs,coreruleset/coreruleset,coreruleset/coreruleset,SpiderLabs/owasp-modsecurity-crs,coreruleset/coreruleset,SpiderLabs/owasp-modsecurity-crs,SpiderLabs/owasp-modsecurity-crs,SpiderLabs/owasp-modsecurity-crs,coreruleset/coreruleset,coreruleset/coreruleset,SpiderLabs/... | # Location of Apache Error Log
log_location_linux = '/var/log/httpd/error_log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2} [A-z][a-z]{2}... | # Location of Apache Error Log
log_location_linux = '/var/log/apache2/error.log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2} [A-z][a-z]{... | <commit_before># Location of Apache Error Log
log_location_linux = '/var/log/httpd/error_log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2... | # Location of Apache Error Log
log_location_linux = '/var/log/apache2/error.log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2} [A-z][a-z]{... | # Location of Apache Error Log
log_location_linux = '/var/log/httpd/error_log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2} [A-z][a-z]{2}... | <commit_before># Location of Apache Error Log
log_location_linux = '/var/log/httpd/error_log'
log_location_windows = 'C:\Apache24\logs\error.log'
# Regular expression to filter for timestamp in Apache Error Log
#
# Default timestamp format: (example: [Thu Nov 09 09:04:38.912314 2017])
log_date_regex = "\[([A-Z][a-z]{2... |
225abbf06472fe7afd15252ca446456c4caed0bb | contact/test_settings.py | contact/test_settings.py | # Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STATIC_URL = '/stat... | # Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STATIC_URL = '/static/'
TEMPLATES = [
{... | Update test settings for Django >= 1.8. | Update test settings for Django >= 1.8.
| Python | bsd-3-clause | aaugustin/myks-contact,aaugustin/myks-contact | # Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STATIC_URL = '/stat... | # Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STATIC_URL = '/static/'
TEMPLATES = [
{... | <commit_before># Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STAT... | # Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STATIC_URL = '/static/'
TEMPLATES = [
{... | # Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STATIC_URL = '/stat... | <commit_before># Only used for running the tests
import os
CONTACT_EMAILS = ['[email protected]']
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3'}}
INSTALLED_APPS = ['contact', 'django.contrib.staticfiles']
MIDDLEWARE_CLASSES = []
ROOT_URLCONF = 'contact.test_urls'
SECRET_KEY = 'whatever'
STAT... |
ed865984bb620fa13418bc5b45b12c63ddada21a | datafilters/views.py | datafilters/views.py | from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and
get_... | from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and
get_... | Check filterform validity before calling filter() | Check filterform validity before calling filter()
| Python | mit | zorainc/django-datafilters,zorainc/django-datafilters,freevoid/django-datafilters | from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and
get_... | from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and
get_... | <commit_before>from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(sel... | from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and
get_... | from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(self) and
get_... | <commit_before>from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
Changed in a way that can play nicely with other CBV simply by overriding the get_queryset(sel... |
e9f68b041b67d4489f3c6e553dc9c8683ed46f8c | python/kindergarten-garden/garden.py | python/kindergarten-garden/garden.py | class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, students = DEFAU... | class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, students=DEFAULT... | Remove spaces around '=' for default param | Remove spaces around '=' for default param
| Python | mit | rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism | class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, students = DEFAU... | class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, students=DEFAULT... | <commit_before>class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, s... | class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, students=DEFAULT... | class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, students = DEFAU... | <commit_before>class Garden:
DEFAULT_STUDENTS = ("Alice Bob Charlie David Eve Fred Ginny "
"Harriet Ileana Joseph Kincaid Larry").split()
PLANTS = {'G': 'Grass',
'C': 'Clover',
'R': 'Radishes',
'V': 'Violets'}
def __init__(self, diagram, s... |
dc9070c14892114b9e05e84cc9195d0fb58f859d | api_bouncer/serializers.py | api_bouncer/serializers.py | import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ApiSerializer(serializers.ModelSerializer):
class Meta:
model = Api
fields = '__all__'
class ConsumerSerializer(se... | import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ConsumerSerializer(serializers.ModelSerializer):
class Meta:
model = Consumer
fields = '__all__'
class ConsumerKey... | Use SlugRelatedField for foreign keys for better readability | Use SlugRelatedField for foreign keys for better readability
| Python | apache-2.0 | menecio/django-api-bouncer | import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ApiSerializer(serializers.ModelSerializer):
class Meta:
model = Api
fields = '__all__'
class ConsumerSerializer(se... | import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ConsumerSerializer(serializers.ModelSerializer):
class Meta:
model = Consumer
fields = '__all__'
class ConsumerKey... | <commit_before>import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ApiSerializer(serializers.ModelSerializer):
class Meta:
model = Api
fields = '__all__'
class Consum... | import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ConsumerSerializer(serializers.ModelSerializer):
class Meta:
model = Consumer
fields = '__all__'
class ConsumerKey... | import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ApiSerializer(serializers.ModelSerializer):
class Meta:
model = Api
fields = '__all__'
class ConsumerSerializer(se... | <commit_before>import uuid
import jsonschema
from rest_framework import serializers
from .models import (
Api,
Consumer,
ConsumerKey,
Plugin,
)
from .schemas import plugins
class ApiSerializer(serializers.ModelSerializer):
class Meta:
model = Api
fields = '__all__'
class Consum... |
ab59466b0cce94106e7e48fd4480c33b2f17910b | pylinks/search/views.py | pylinks/search/views.py | from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import ugettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchView):
templ... | from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import gettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchView):
templa... | Switch import from ugettext to gettext | Switch import from ugettext to gettext
| Python | mit | michaelmior/pylinks,michaelmior/pylinks,michaelmior/pylinks | from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import ugettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchView):
templ... | from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import gettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchView):
templa... | <commit_before>from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import ugettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchV... | from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import gettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchView):
templa... | from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import ugettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchView):
templ... | <commit_before>from django.core.paginator import InvalidPage, Paginator
from django.http import Http404
from django.utils.translation import ugettext as _
from haystack.forms import FacetedSearchForm
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
class SearchView(FacetedSearchV... |
0058a20aa01d1de15b9b98785309d8ca018f4485 | sympy/utilities/source.py | sympy/utilities/source.py | """
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.getsource(object)
... | """
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.getsource(object)
... | Fix test failures in Python 3.3b2 | Fix test failures in Python 3.3b2
The fromlist argument of __import__ was being called as [''], which is
meaningless. Because we need fromlist to be non-empty to get the submodule
returned, this was changed to ['*'].
| Python | bsd-3-clause | Shaswat27/sympy,VaibhavAgarwalVA/sympy,sunny94/temp,hargup/sympy,sampadsaha5/sympy,kumarkrishna/sympy,kaichogami/sympy,jerli/sympy,skidzo/sympy,VaibhavAgarwalVA/sympy,bukzor/sympy,madan96/sympy,farhaanbukhsh/sympy,amitjamadagni/sympy,bukzor/sympy,MridulS/sympy,atsao72/sympy,farhaanbukhsh/sympy,skidzo/sympy,wyom/sympy,T... | """
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.getsource(object)
... | """
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.getsource(object)
... | <commit_before>"""
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.get... | """
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.getsource(object)
... | """
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.getsource(object)
... | <commit_before>"""
This module adds several functions for interactive source code inspection.
"""
import inspect
from sympy.core.compatibility import callable
def source(object):
"""
Prints the source code of a given object.
"""
print 'In file: %s' % inspect.getsourcefile(object)
print inspect.get... |
8d217c9797f19d4276484fd070a4a5f3de623e84 | tapioca_toggl/__init__.py | tapioca_toggl/__init__.py | # -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
| # -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
from .tapioca_toggl import Toggl # noqa
| Make api accessible from python package | Make api accessible from python package
| Python | mit | hackebrot/tapioca-toggl | # -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
Make api accessible from python package | # -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
from .tapioca_toggl import Toggl # noqa
| <commit_before># -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
<commit_msg>Make api accessible from python package<commit_after> | # -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
from .tapioca_toggl import Toggl # noqa
| # -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
Make api accessible from python package# -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
from .tapioca_toggl import Toggl # noqa
| <commit_before># -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
<commit_msg>Make api accessible from python package<commit_after># -*- coding: utf-8 -*-
"""
tapioca_toggl
-------------
Python wrapper for Toggl API v8
"""
__version__ = '0.1.0'
from ... |
d24e31dbebc776524e0a2cd4b971c726bfcbfda5 | py_nist_beacon/nist_randomness_beacon.py | py_nist_beacon/nist_randomness_beacon.py | import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
try:
... | import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
try:
... | Check status code before object | Check status code before object
| Python | apache-2.0 | urda/nistbeacon | import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
try:
... | import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
try:
... | <commit_before>import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
... | import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
try:
... | import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
try:
... | <commit_before>import requests
from requests.exceptions import RequestException
from py_nist_beacon.nist_randomness_beacon_value import (
NistRandomnessBeaconValue
)
class NistRandomnessBeacon(object):
NIST_BASE_URL = "https://beacon.nist.gov/rest/record"
@classmethod
def get_last_record(cls):
... |
d6edbc05f1d6f06848b78f131c975b3373b1179a | cpgintegrate/__init__.py | cpgintegrate/__init__.py | import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
try:
df = processor(file)
except Exception:
df = ... | import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
df = processor(file)
yield (df
.assign(Source=getattr(file, 'n... | Raise exceptions rather than catching | Raise exceptions rather than catching
| Python | agpl-3.0 | PointyShinyBurning/cpgintegrate | import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
try:
df = processor(file)
except Exception:
df = ... | import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
df = processor(file)
yield (df
.assign(Source=getattr(file, 'n... | <commit_before>import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
try:
df = processor(file)
except Exception:
... | import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
df = processor(file)
yield (df
.assign(Source=getattr(file, 'n... | import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
try:
df = processor(file)
except Exception:
df = ... | <commit_before>import pandas
import traceback
import typing
def process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:
def get_frames():
for file in file_iterator:
try:
df = processor(file)
except Exception:
... |
ad37b36b40b9e59b380049855012b30f1c5c1a28 | scripts/master/optional_arguments.py | scripts/master/optional_arguments.py | # Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
class ListPropertie... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
class ListPropertie... | Fix ListProperties to be compatible with buildbot 0.8.4p1. | Fix ListProperties to be compatible with buildbot 0.8.4p1.
The duplicated code will be removed once 0.7.12 is removed.
Review URL: http://codereview.chromium.org/7193037
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@91477 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
class ListPropertie... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
class ListPropertie... | <commit_before># Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
clas... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
class ListPropertie... | # Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
class ListPropertie... | <commit_before># Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility classes to enhance process.properties.Properties usefulness."""
from buildbot.process.properties import WithProperties
clas... |
9df966ba388d05e66e64d7692ab971e51cd9762a | csv-to-json.py | csv-to-json.py | import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
socket = contex... | import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
socket = contex... | Use official URL for collector | Use official URL for collector
| Python | bsd-2-clause | andreas23/emdn | import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
socket = contex... | import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
socket = contex... | <commit_before>import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
s... | import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
socket = contex... | import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
socket = contex... | <commit_before>import simplejson as json
import zmq
import sys
import base64
import zlib
from jsonsig import *
fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',')
(pk, sk) = pysodium.crypto_sign_keypair()
context = zmq.Context()
s... |
f5513d6fa736c8e1ffc8490c61f05c33ec42616c | config/main.py | config/main.py | # -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "08696", "35504"]
| # -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "35504"]
| Update representative importance, remove Reinhold Mitterlehner | Update representative importance, remove Reinhold Mitterlehner
| Python | mit | AKVorrat/ueberwachungspaket.at,AKVorrat/ueberwachungspaket.at,AKVorrat/ueberwachungspaket.at | # -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "08696", "35504"]
Update representative importance, remove Reinhold Mitterlehner | # -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "35504"]
| <commit_before># -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "08696", "35504"]
<commit_msg>Update representative importance, remove Reinhold Mitterlehner<commit_after> | # -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "35504"]
| # -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "08696", "35504"]
Update representative importance, remove Reinhold Mitterlehner# -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570... | <commit_before># -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
IMPORTANT_REPS = ["05375", "02819", "51570", "02941", "08696", "35504"]
<commit_msg>Update representative importance, remove Reinhold Mitterlehner<commit_after># -*- coding: utf-8 -*-
PROJECT_NAME = "Stoppt das Überwachungspaket!"
I... |
c360289fe00722ff2f85390e2d9c40c4e9338893 | test/test_function.py | test/test_function.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet:
@pytest.mark.parametrize(["value", "expe... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet(object):
@pytest.mark.parametrize(["value... | Change class definitions from old style to new style | Change class definitions from old style to new style
| Python | mit | thombashi/pytablewriter | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet:
@pytest.mark.parametrize(["value", "expe... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet(object):
@pytest.mark.parametrize(["value... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet:
@pytest.mark.parametrize(... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet(object):
@pytest.mark.parametrize(["value... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet:
@pytest.mark.parametrize(["value", "expe... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import print_function
from __future__ import unicode_literals
from pytablewriter._function import convert_idx_to_alphabet
import pytest
class Test_convert_idx_to_alphabet:
@pytest.mark.parametrize(... |
391d5ef0d13c9f7401ee3576ff578515c07c5f77 | spacy/tests/regression/test_issue1434.py | spacy/tests/regression/test_issue1434.py | from __future__ import unicode_literals
from spacy.tokens import Doc
from spacy.vocab import Vocab
from spacy.matcher import Matcher
from spacy.lang.lex_attrs import LEX_ATTRS
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getters=LEX_ATTRS)
... | from __future__ import unicode_literals
from ...vocab import Vocab
from ...lang.lex_attrs import LEX_ATTRS
from ...tokens import Doc
from ...matcher import Matcher
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getters=LEX_ATTRS)
hello_worl... | Normalize imports in regression test | Normalize imports in regression test
| Python | mit | honnibal/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,honnibal/spaCy,explosion/s... | from __future__ import unicode_literals
from spacy.tokens import Doc
from spacy.vocab import Vocab
from spacy.matcher import Matcher
from spacy.lang.lex_attrs import LEX_ATTRS
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getters=LEX_ATTRS)
... | from __future__ import unicode_literals
from ...vocab import Vocab
from ...lang.lex_attrs import LEX_ATTRS
from ...tokens import Doc
from ...matcher import Matcher
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getters=LEX_ATTRS)
hello_worl... | <commit_before>from __future__ import unicode_literals
from spacy.tokens import Doc
from spacy.vocab import Vocab
from spacy.matcher import Matcher
from spacy.lang.lex_attrs import LEX_ATTRS
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getter... | from __future__ import unicode_literals
from ...vocab import Vocab
from ...lang.lex_attrs import LEX_ATTRS
from ...tokens import Doc
from ...matcher import Matcher
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getters=LEX_ATTRS)
hello_worl... | from __future__ import unicode_literals
from spacy.tokens import Doc
from spacy.vocab import Vocab
from spacy.matcher import Matcher
from spacy.lang.lex_attrs import LEX_ATTRS
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getters=LEX_ATTRS)
... | <commit_before>from __future__ import unicode_literals
from spacy.tokens import Doc
from spacy.vocab import Vocab
from spacy.matcher import Matcher
from spacy.lang.lex_attrs import LEX_ATTRS
def test_issue1434():
'''Test matches occur when optional element at end of short doc'''
vocab = Vocab(lex_attr_getter... |
36b24c21124ce8756b122b197f1f930732caa61f | tornadowebapi/resource.py | tornadowebapi/resource.py | from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitlets are accepted... | from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitlets are accepted... | Allow back None as identifier | Allow back None as identifier
| Python | bsd-3-clause | simphony/tornado-webapi | from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitlets are accepted... | from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitlets are accepted... | <commit_before>from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitle... | from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitlets are accepted... | from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitlets are accepted... | <commit_before>from tornadowebapi.traitlets import HasTraits
class Resource(HasTraits):
"""A model representing a resource in our system.
Must be reimplemented for the specific resource in our domain,
as well as specifying its properties with traitlets.
The following metadata in the specified traitle... |
952ef8d596916b7e753c1179552a270430a21122 | tests/test_lattice.py | tests/test_lattice.py | import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
def test_create_lattice():
l = rml.lattice.Lattice(DUMMY_NAME)
assert(len(l)) == 0
assert l.name == DUMMY_NAME
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
def test_lattice_with_one_element():
l ... | import pytest
import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
@pytest.fixture
def simple_element():
element_length = 1.5
e = rml.element.Element('dummy_element', element_length)
return e
@pytest.fixture
def simple_element_and_lattice(simple_element):
l = rml.lattice.Lattice(DUMMY_NAME)
... | Test getting elements with different family names. | Test getting elements with different family names.
| Python | apache-2.0 | razvanvasile/RML,willrogers/pml,willrogers/pml | import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
def test_create_lattice():
l = rml.lattice.Lattice(DUMMY_NAME)
assert(len(l)) == 0
assert l.name == DUMMY_NAME
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
def test_lattice_with_one_element():
l ... | import pytest
import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
@pytest.fixture
def simple_element():
element_length = 1.5
e = rml.element.Element('dummy_element', element_length)
return e
@pytest.fixture
def simple_element_and_lattice(simple_element):
l = rml.lattice.Lattice(DUMMY_NAME)
... | <commit_before>import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
def test_create_lattice():
l = rml.lattice.Lattice(DUMMY_NAME)
assert(len(l)) == 0
assert l.name == DUMMY_NAME
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
def test_lattice_with_one_el... | import pytest
import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
@pytest.fixture
def simple_element():
element_length = 1.5
e = rml.element.Element('dummy_element', element_length)
return e
@pytest.fixture
def simple_element_and_lattice(simple_element):
l = rml.lattice.Lattice(DUMMY_NAME)
... | import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
def test_create_lattice():
l = rml.lattice.Lattice(DUMMY_NAME)
assert(len(l)) == 0
assert l.name == DUMMY_NAME
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
def test_lattice_with_one_element():
l ... | <commit_before>import rml.lattice
import rml.element
DUMMY_NAME = 'dummy'
def test_create_lattice():
l = rml.lattice.Lattice(DUMMY_NAME)
assert(len(l)) == 0
assert l.name == DUMMY_NAME
def test_non_negative_lattice():
l = rml.lattice.Lattice()
assert(len(l)) >= 0
def test_lattice_with_one_el... |
cde822bc87efa47cc3fae6fbb9462ae6a362afbc | fedmsg.d/endpoints.py | fedmsg.d/endpoints.py | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | Add debian endpoint as comment to file. | Add debian endpoint as comment to file.
| Python | lgpl-2.1 | fedora-infra/fedmsg,vivekanand1101/fedmsg,cicku/fedmsg,cicku/fedmsg,pombredanne/fedmsg,chaiku/fedmsg,vivekanand1101/fedmsg,cicku/fedmsg,mathstuf/fedmsg,vivekanand1101/fedmsg,chaiku/fedmsg,fedora-infra/fedmsg,pombredanne/fedmsg,mathstuf/fedmsg,maxamillion/fedmsg,maxamillion/fedmsg,mathstuf/fedmsg,chaiku/fedmsg,pombredan... | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | <commit_before># This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any l... | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | # This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#... | <commit_before># This file is part of fedmsg.
# Copyright (C) 2012 Red Hat, Inc.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any l... |
45896c766f0bd34d00fa0c3d99b94f650b9f8cd7 | ddsc_api/views.py | ddsc_api/views.py | # (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root(APIView):
... | # (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root(APIView):
... | Fix and add ddsc-site urls. | Fix and add ddsc-site urls.
| Python | mit | ddsc/ddsc-api,ddsc/ddsc-api | # (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root(APIView):
... | # (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root(APIView):
... | <commit_before># (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root... | # (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root(APIView):
... | # (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root(APIView):
... | <commit_before># (c) Nelen & Schuurmans. MIT licensed, see LICENSE.rst.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, division
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework.response import Response
class Root... |
759e6b66ebd601fb1902f6bee2cbc980d61baab8 | unitTestUtils/parseXML.py | unitTestUtils/parseXML.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | Add a print with file where mistake is | Add a print with file where mistake is
| Python | apache-2.0 | alexkernphysiker/j-pet-framework,JPETTomography/j-pet-framework,JPETTomography/j-pet-framework,alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,alexkernphysiker/j-pet-framework,JPETTomography/j-pet-framework | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xm... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xml'):
tr... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from xml.etree.ElementTree import ParseError
import xml.etree.ElementTree as ET
import glob
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def parse():
for infile in glob.glob('*.xm... |
8d9b2bdbf47b51e3ada3b5e14fcc27bcaafce4fb | dbsync/logs.py | dbsync/logs.py | """
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler is not None:
... | """
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler is not None:
... | Allow file paths to be given to set_log_target. | Allow file paths to be given to set_log_target.
| Python | mit | bintlabs/python-sync-db | """
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler is not None:
... | """
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler is not None:
... | <commit_before>"""
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler ... | """
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler is not None:
... | """
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler is not None:
... | <commit_before>"""
.. module:: dbsync.logs
:synopsis: Logging facilities for the library.
"""
import logging
#: All the library loggers
loggers = set()
log_handler = None
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.WARNING)
loggers.add(logger)
if log_handler ... |
55d10f77f963eb0cdbe29e04fe910f65c4edaec4 | erpnext/buying/doctype/supplier/supplier_dashboard.py | erpnext/buying/doctype/supplier/supplier_dashboard.py | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_name'
},
't... | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_name',
'Bank... | Add linked bank accounts to supplier dashboard | fix: Add linked bank accounts to supplier dashboard
| Python | agpl-3.0 | gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_name'
},
't... | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_name',
'Bank... | <commit_before>from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_... | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_name',
'Bank... | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_name'
},
't... | <commit_before>from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
'fieldname': 'supplier',
'non_standard_fieldnames': {
'Payment Entry': 'party_... |
2f2eff3374372cabc6962cd7332aefbaa67bd7ec | examples/facebook-cli.py | examples/facebook-cli.py | from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.com/oauth/access... | from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.com/oauth/access... | Update facebook.cli example to use short syntax | Update facebook.cli example to use short syntax
| Python | mit | maxcountryman/rauth,arifgursel/rauth,isouzasoares/rauth,litl/rauth,arifgursel/rauth,isouzasoares/rauth,litl/rauth,arifgursel/rauth,maxcountryman/rauth | from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.com/oauth/access... | from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.com/oauth/access... | <commit_before>from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.c... | from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.com/oauth/access... | from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.com/oauth/access... | <commit_before>from rauth.service import OAuth2Service
import re
import webbrowser
# Get a real consumer key & secret from:
# https://developers.facebook.com/apps
facebook = OAuth2Service(
name='facebook',
authorize_url='https:/graph.facebook.com/oauth/authorize',
access_token_url='https:/graph.facebook.c... |
9c21cdf5fc94cf16079465559c58bbe69feec6e8 | fhir_io_hapi/__init__.py | fhir_io_hapi/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get import hello_world
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get import hello_world
... | Test post_save of AccessToken as step 1 in writing a fhir consent directive. | Test post_save of AccessToken as step 1 in writing a fhir consent directive.
| Python | apache-2.0 | ekivemark/BlueButtonFHIR_API,ekivemark/BlueButtonFHIR_API,ekivemark/BlueButtonFHIR_API,ekivemark/BlueButtonFHIR_API | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get import hello_world
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get import hello_world
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get impo... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get import hello_world
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get import hello_world
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
"""
django-fhir
FILE: __init__.py
Created: 1/6/16 5:07 PM
"""
__author__ = 'Mark Scrimshire:@ekivemark'
# Hello World is here to test the loading of the module from fhir.settings
# from .settings import *
from .views.get impo... |
fea95164d03950f0255b1e6567f36040c67da173 | gnotty/bots/rss.py | gnotty/bots/rss.py |
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain a sequence of R... |
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain a sequence of R... | Allow overridable message formatting in the RSS bot. | Allow overridable message formatting in the RSS bot.
| Python | bsd-2-clause | spaceone/gnotty,stephenmcd/gnotty,spaceone/gnotty,stephenmcd/gnotty,spaceone/gnotty,stephenmcd/gnotty |
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain a sequence of R... |
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain a sequence of R... | <commit_before>
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain ... |
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain a sequence of R... |
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain a sequence of R... | <commit_before>
try:
from feedparser import parse
except ImportError:
parse = None
from gnotty.bots import events
class RSSMixin(object):
"""
Mixin for bots that consume RSS feeds and post them to the
channel. Feeds are defined by the ``feeds`` keyword arg to
``__init__``, and should contain ... |
b20db32f0f00cf0451e2602697e81b129a149801 | scheduler_partner.py | scheduler_partner.py | """
Scheduler Partner interface (v2 extension).
"""
from novaclient import base
from novaclient.openstack.common.gettextutils import _
from novaclient import utils
class SchedulerPartner(base.Resource):
def __repr__(self):
return "<SchedulerPartner: %s>" % self.name
class SchedulerPartnerManager(base.Man... | Add create action for os-scheduler-partner | Add create action for os-scheduler-partner
| Python | mit | daitr-gu/scheduler-api-client | Add create action for os-scheduler-partner | """
Scheduler Partner interface (v2 extension).
"""
from novaclient import base
from novaclient.openstack.common.gettextutils import _
from novaclient import utils
class SchedulerPartner(base.Resource):
def __repr__(self):
return "<SchedulerPartner: %s>" % self.name
class SchedulerPartnerManager(base.Man... | <commit_before><commit_msg>Add create action for os-scheduler-partner<commit_after> | """
Scheduler Partner interface (v2 extension).
"""
from novaclient import base
from novaclient.openstack.common.gettextutils import _
from novaclient import utils
class SchedulerPartner(base.Resource):
def __repr__(self):
return "<SchedulerPartner: %s>" % self.name
class SchedulerPartnerManager(base.Man... | Add create action for os-scheduler-partner"""
Scheduler Partner interface (v2 extension).
"""
from novaclient import base
from novaclient.openstack.common.gettextutils import _
from novaclient import utils
class SchedulerPartner(base.Resource):
def __repr__(self):
return "<SchedulerPartner: %s>" % self.nam... | <commit_before><commit_msg>Add create action for os-scheduler-partner<commit_after>"""
Scheduler Partner interface (v2 extension).
"""
from novaclient import base
from novaclient.openstack.common.gettextutils import _
from novaclient import utils
class SchedulerPartner(base.Resource):
def __repr__(self):
r... | |
abadd7880d690cebfea865f8afd81c6fc585884c | scripts/bedpe2bed.py | scripts/bedpe2bed.py | import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length between two pairs of... | import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length between two pairs of... | Add minimum fragment length filtering. | Add minimum fragment length filtering.
| Python | apache-2.0 | kauralasoo/Blood_ATAC,kauralasoo/Blood_ATAC,kauralasoo/Blood_ATAC | import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length between two pairs of... | import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length between two pairs of... | <commit_before>import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length betwe... | import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length between two pairs of... | import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length between two pairs of... | <commit_before>import sys
import os
import argparse
import fileinput
import subprocess
parser = argparse.ArgumentParser(description = "Convert BEDPE into a BED file of fragments.", formatter_class = argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--maxFragmentLength", help = "Maximum fragment length betwe... |
1d15a2463f0149531f8cb6913ed3093a0e2220b4 | espresso/response.py | espresso/response.py | import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, message, channel=Non... | import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, message, channel=Non... | Fix templating in _another_ debug statement | Fix templating in _another_ debug statement
| Python | bsd-3-clause | ratchetrobotics/espresso | import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, message, channel=Non... | import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, message, channel=Non... | <commit_before>import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, messa... | import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, message, channel=Non... | import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, message, channel=Non... | <commit_before>import logging
class Response(object):
"""The object sent back to the callback
Contains methods for calling senders and responders on Espresso
"""
def __init__(self, robot, msg, match):
self.robot = robot
self.msg = msg
self.match = match
def send(self, messa... |
0f54780e142cb6bd15df2ed702bd4fa4b2d3fe79 | keys.py | keys.py | #!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
) | #!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
) | Use spaces instead of tabs | Use spaces instead of tabs
| Python | mit | bman4789/weatherBot,bman4789/weatherBot,BrianMitchL/weatherBot | #!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
)Use spaces instead of tabs | #!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
) | <commit_before>#!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
)<commit_msg>Use spaces instead of... | #!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
) | #!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
)Use spaces instead of tabs#!/usr/bin/env python
... | <commit_before>#!/usr/bin/env python
#keys.py
keys = dict(
consumer_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
access_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
)<commit_msg>Use spaces instead of... |
305b3a83999e7c9d5a80de5aa89e3162d4090d64 | controllers/default.py | controllers/default.py | def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return dict()
def POST(resource,resource_id):
if ... | def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resource,resourc... | Refactor treenexus logic into a function | Refactor treenexus logic into a function
| Python | bsd-2-clause | OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,leto/new_opentree_api,OpenTreeOfLife/phylesystem-api,leto/new_opentree_api | def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return dict()
def POST(resource,resource_id):
if ... | def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resource,resourc... | <commit_before>def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return dict()
def POST(resource,resource_i... | def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resource,resourc... | def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return dict()
def POST(resource,resource_id):
if ... | <commit_before>def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return dict()
def POST(resource,resource_i... |
15914cc8bd29392f204bec021b8cc34bf8507daa | saleor/integrations/management/commands/update_integrations.py | saleor/integrations/management/commands/update_integrations.py | from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from saleor.integrations.feeds import SaleorFeed
from saleor.integrations import utils
class Command(BaseCommand):
help = 'Updates integration feeds. '
feed_classes = {'saleor': SaleorFeed}
def add_argu... | from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from ....integrations.feeds import SaleorFeed
from ....integrations import utils
class Command(BaseCommand):
help = ('Updates integration feeds.'
'If feed name not provided, updates all available fee... | Fix imports style and made feed_name optional | Fix imports style and made feed_name optional
| Python | bsd-3-clause | KenMutemi/saleor,UITools/saleor,jreigel/saleor,KenMutemi/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,jreigel/saleor,HyperManTT/ECommerceSaleor,tfroehlich82/saleor,tfroehlich82/saleor,maferelo/saleor,itbabu/saleor,KenMutemi/saleor,mociepka/saleor,UITools/saleor,car3oon/saleor,tfroehlich82/saleor,car3oon/saleor,UIToo... | from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from saleor.integrations.feeds import SaleorFeed
from saleor.integrations import utils
class Command(BaseCommand):
help = 'Updates integration feeds. '
feed_classes = {'saleor': SaleorFeed}
def add_argu... | from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from ....integrations.feeds import SaleorFeed
from ....integrations import utils
class Command(BaseCommand):
help = ('Updates integration feeds.'
'If feed name not provided, updates all available fee... | <commit_before>from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from saleor.integrations.feeds import SaleorFeed
from saleor.integrations import utils
class Command(BaseCommand):
help = 'Updates integration feeds. '
feed_classes = {'saleor': SaleorFeed}
... | from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from ....integrations.feeds import SaleorFeed
from ....integrations import utils
class Command(BaseCommand):
help = ('Updates integration feeds.'
'If feed name not provided, updates all available fee... | from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from saleor.integrations.feeds import SaleorFeed
from saleor.integrations import utils
class Command(BaseCommand):
help = 'Updates integration feeds. '
feed_classes = {'saleor': SaleorFeed}
def add_argu... | <commit_before>from __future__ import unicode_literals
from django.core.management import CommandError, BaseCommand
from saleor.integrations.feeds import SaleorFeed
from saleor.integrations import utils
class Command(BaseCommand):
help = 'Updates integration feeds. '
feed_classes = {'saleor': SaleorFeed}
... |
1a804bba0ee553cd87d29599284c1b422ad28196 | server/crashmanager/management/commands/cleanup_old_crashes.py | server/crashmanager/management/commands/cleanup_old_crashes.py | from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
CLEANUP_CRASHES_AFTER_DAYS = 14
CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 3
class Command(NoArgsCommand):
help = "Cleanup ol... | from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
from django.conf import settings
class Command(NoArgsCommand):
help = "Cleanup old crash entries."
def handle_noar... | Refactor cleanup command to use settings.py | Refactor cleanup command to use settings.py
| Python | mpl-2.0 | MozillaSecurity/FuzzManager,lazyparser/FuzzManager,cihatix/FuzzManager,cihatix/FuzzManager,lazyparser/FuzzManager,sigma-random/FuzzManager,cihatix/FuzzManager,cihatix/FuzzManager,MozillaSecurity/FuzzManager,sigma-random/FuzzManager,MozillaSecurity/FuzzManager,lazyparser/FuzzManager,sigma-random/FuzzManager,lazyparser/F... | from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
CLEANUP_CRASHES_AFTER_DAYS = 14
CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 3
class Command(NoArgsCommand):
help = "Cleanup ol... | from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
from django.conf import settings
class Command(NoArgsCommand):
help = "Cleanup old crash entries."
def handle_noar... | <commit_before>from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
CLEANUP_CRASHES_AFTER_DAYS = 14
CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 3
class Command(NoArgsCommand):
hel... | from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
from django.conf import settings
class Command(NoArgsCommand):
help = "Cleanup old crash entries."
def handle_noar... | from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
CLEANUP_CRASHES_AFTER_DAYS = 14
CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 3
class Command(NoArgsCommand):
help = "Cleanup ol... | <commit_before>from django.core.management.base import NoArgsCommand
from crashmanager.models import CrashEntry, Bucket, Bug
from django.db.models.aggregates import Count
from datetime import datetime, timedelta
CLEANUP_CRASHES_AFTER_DAYS = 14
CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 3
class Command(NoArgsCommand):
hel... |
27c2878ab43ff1e38492e17971166e8fe3c8f1e1 | tests/unit/test_test_setup.py | tests/unit/test_test_setup.py | """Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups of this cookiec... | """Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups of this cookiec... | Make py_version and assertion more readable | Make py_version and assertion more readable
| Python | apache-2.0 | painless-software/painless-continuous-delivery,painless-software/painless-continuous-delivery,painless-software/painless-continuous-delivery,painless-software/painless-continuous-delivery | """Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups of this cookiec... | """Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups of this cookiec... | <commit_before>"""Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups ... | """Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups of this cookiec... | """Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups of this cookiec... | <commit_before>"""Tests for correctly generated, working setup."""
from os import system
from sys import version_info
from . import pytest_generate_tests # noqa, pylint: disable=unused-import
# pylint: disable=too-few-public-methods
class TestTestSetup(object):
"""
Tests for verifying generated test setups ... |
a1cf304f9941b811b33e1b2d786b6f38bc514546 | anafero/templatetags/anafero_tags.py | anafero/templatetags/anafero_tags.py | from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html")
def create_referral(url, obj=None):
if obj:
return {"url": url,... | from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html", takes_context=True)
def create_referral(context, url, obj=None):
if obj... | Add full context to the create_referral tag | Add full context to the create_referral tag | Python | mit | pinax/pinax-referrals,pinax/pinax-referrals | from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html")
def create_referral(url, obj=None):
if obj:
return {"url": url,... | from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html", takes_context=True)
def create_referral(context, url, obj=None):
if obj... | <commit_before>from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html")
def create_referral(url, obj=None):
if obj:
retu... | from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html", takes_context=True)
def create_referral(context, url, obj=None):
if obj... | from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html")
def create_referral(url, obj=None):
if obj:
return {"url": url,... | <commit_before>from django import template
from django.contrib.contenttypes.models import ContentType
from anafero.models import ReferralResponse, ACTION_DISPLAY
register = template.Library()
@register.inclusion_tag("anafero/_create_referral_form.html")
def create_referral(url, obj=None):
if obj:
retu... |
e709ea42801c7555d683c5d3eda4d22b164938eb | TSatPy/tests/discrete_test.py | TSatPy/tests/discrete_test.py | import unittest
from TSatPy import discrete
class TestDerivative(unittest.TestCase):
def test_derivative(self):
print 'aoue'
d = discrete.Derivative()
return
d.update(4)
print d.val, d
self.assertTrue(True)
if __name__ == "__main__":
unittest.main()
| import unittest
from mock import patch
from TSatPy import discrete
import time
class TestDerivative(unittest.TestCase):
@patch('time.time')
def test_derivative(self, mock_time, *args):
mock_time.return_value = 1234
d = discrete.Derivative()
self.assertEquals(None, d.last_time)
... | Test coverage for the discrete derivative class | Test coverage for the discrete derivative class
| Python | mit | MathYourLife/TSatPy-thesis,MathYourLife/TSatPy-thesis,MathYourLife/TSatPy-thesis,MathYourLife/TSatPy-thesis,MathYourLife/TSatPy-thesis | import unittest
from TSatPy import discrete
class TestDerivative(unittest.TestCase):
def test_derivative(self):
print 'aoue'
d = discrete.Derivative()
return
d.update(4)
print d.val, d
self.assertTrue(True)
if __name__ == "__main__":
unittest.main()
Test cover... | import unittest
from mock import patch
from TSatPy import discrete
import time
class TestDerivative(unittest.TestCase):
@patch('time.time')
def test_derivative(self, mock_time, *args):
mock_time.return_value = 1234
d = discrete.Derivative()
self.assertEquals(None, d.last_time)
... | <commit_before>import unittest
from TSatPy import discrete
class TestDerivative(unittest.TestCase):
def test_derivative(self):
print 'aoue'
d = discrete.Derivative()
return
d.update(4)
print d.val, d
self.assertTrue(True)
if __name__ == "__main__":
unittest.ma... | import unittest
from mock import patch
from TSatPy import discrete
import time
class TestDerivative(unittest.TestCase):
@patch('time.time')
def test_derivative(self, mock_time, *args):
mock_time.return_value = 1234
d = discrete.Derivative()
self.assertEquals(None, d.last_time)
... | import unittest
from TSatPy import discrete
class TestDerivative(unittest.TestCase):
def test_derivative(self):
print 'aoue'
d = discrete.Derivative()
return
d.update(4)
print d.val, d
self.assertTrue(True)
if __name__ == "__main__":
unittest.main()
Test cover... | <commit_before>import unittest
from TSatPy import discrete
class TestDerivative(unittest.TestCase):
def test_derivative(self):
print 'aoue'
d = discrete.Derivative()
return
d.update(4)
print d.val, d
self.assertTrue(True)
if __name__ == "__main__":
unittest.ma... |
c6d396e8ec29a3641ce1d994c386c9ebea353cd8 | shipyard2/shipyard2/rules/capnps.py | shipyard2/shipyard2/rules/capnps.py | """Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
*('--import-path=%s/codex' % path for path in ps['//bases:roots']),
]
| """Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
'--import-path=%s' %
':'.join(str(path / 'codex') for path in ps['//bases:roots']),
]
| Fix joining of capnp import paths | Fix joining of capnp import paths
| Python | mit | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | """Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
*('--import-path=%s/codex' % path for path in ps['//bases:roots']),
]
Fix joining of capnp import paths | """Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
'--import-path=%s' %
':'.join(str(path / 'codex') for path in ps['//bases:roots']),
]
| <commit_before>"""Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
*('--import-path=%s/codex' % path for path in ps['//bases:roots']),
]
<commit_msg>Fix joining of capnp im... | """Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
'--import-path=%s' %
':'.join(str(path / 'codex') for path in ps['//bases:roots']),
]
| """Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
*('--import-path=%s/codex' % path for path in ps['//bases:roots']),
]
Fix joining of capnp import paths"""Helpers for wr... | <commit_before>"""Helpers for writing rules that depends on //py/g1/third-party/capnp."""
__all__ = [
'make_global_options',
]
def make_global_options(ps):
return [
'compile_schemas',
*('--import-path=%s/codex' % path for path in ps['//bases:roots']),
]
<commit_msg>Fix joining of capnp im... |
ff6f0204655439e93bab69dc23a9d1d7d0262cb9 | dog/context.py | dog/context.py | __all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
| __all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
def tick(self, variant: bool = True) -> str:
if variant:
return self.emoji('green_tick')
else:
return self.emoji('red_tick')
def... | Add emoji shortcuts to Context | Add emoji shortcuts to Context
| Python | mit | slice/dogbot,sliceofcode/dogbot,sliceofcode/dogbot,slice/dogbot,slice/dogbot | __all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
Add emoji shortcuts to Context | __all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
def tick(self, variant: bool = True) -> str:
if variant:
return self.emoji('green_tick')
else:
return self.emoji('red_tick')
def... | <commit_before>__all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
<commit_msg>Add emoji shortcuts to Context<commit_after> | __all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
def tick(self, variant: bool = True) -> str:
if variant:
return self.emoji('green_tick')
else:
return self.emoji('red_tick')
def... | __all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
Add emoji shortcuts to Context__all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
d... | <commit_before>__all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(self):
return self.bot.pool
<commit_msg>Add emoji shortcuts to Context<commit_after>__all__ = ['Context']
from lifesaver import bot
class Context(bot.Context):
@property
def pool(s... |
e4e4f92df9401858bf7ac527c3adcf08a7da7c5f | github_fork_repos.py | github_fork_repos.py | #!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad person
# I prom... | #!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad person
# I prom... | Change org-name to what is now lowercase | Change org-name to what is now lowercase
| Python | mit | lsst-sqre/sqre-codekit,lsst-sqre/sqre-codekit | #!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad person
# I prom... | #!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad person
# I prom... | <commit_before>#!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad ... | #!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad person
# I prom... | #!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad person
# I prom... | <commit_before>#!/bin/env python
"""
Fork github repos
"""
# technical debt:
# --------------
from github3 import login
from getpass import getuser
import os
import sys
import time
token = ''
debug = os.getenv("DM_SQUARE_DEBUG")
user = getuser()
if debug:
print user
# I have cut and pasted code
# I am a bad ... |
393f813867dad176e0d5793f82a606c767145194 | koushihime/main/utils.py | koushihime/main/utils.py | # -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=24):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_time > limit_date)... | # -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=72):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_time > limit_date)... | Change dumplicate entry catching settings. | Change dumplicate entry catching settings.
| Python | artistic-2.0 | ethe/KoushiHime,kafuuchino/MoegirlUpdater,ethe/KoushiHime,ethe/KoushiHime,kafuuchino/MoegirlUpdater,kafuuchino/MoegirlUpdater | # -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=24):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_time > limit_date)... | # -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=72):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_time > limit_date)... | <commit_before># -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=24):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_tim... | # -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=72):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_time > limit_date)... | # -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=24):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_time > limit_date)... | <commit_before># -*- coding:utf-8 -*-
import datetime
from koushihime.main.models import PushRecord, WaitingQueue
def recent_have_pushed(title, hours=24):
limit_date = datetime.datetime.utcnow() - datetime.timedelta(hours=hours)
query = PushRecord.query.filter(PushRecord.title == title, PushRecord.pushed_tim... |
f3e39d2250a9c56a2beb6a1a9c1c4dafb97e8c7f | encoder/vgg.py | encoder/vgg.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
images: Images pl... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
images: Images pl... | Update to VGG laod from datadir | Update to VGG laod from datadir
| Python | mit | MarvinTeichmann/KittiBox,MarvinTeichmann/KittiBox | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
images: Images pl... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
images: Images pl... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
im... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
images: Images pl... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
images: Images pl... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_fcn import fcn8_vgg
import tensorflow as tf
def inference(hypes, images, train=True):
"""Build the MNIST model up to where it may be used for inference.
Args:
im... |
97c66e1cbbc6fd691c2fec4f4e72ba22892fa13c | base/components/accounts/backends.py | base/components/accounts/backends.py | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except IndexError:
... | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except IndexError:
... | Remove the try/except clause from get_user(). | Remove the try/except clause from get_user().
It doesn't seem like the code will -ever- hit the except clause as the
method that calls this has fallbacks of its own.
| Python | apache-2.0 | hello-base/web,hello-base/web,hello-base/web,hello-base/web | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except IndexError:
... | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except IndexError:
... | <commit_before>from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except Index... | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except IndexError:
... | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except IndexError:
... | <commit_before>from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
User = get_user_model()
class HelloBaseIDBackend(ModelBackend):
def authenticate(self, username=None):
try:
user = User.objects.filter(username=username)[0]
except Index... |
f8271a1c244ac38ce787d98a3f953e417a30e2d0 | 3-koodin-refaktorointi/code-examples/test_dependency_updater.py | 3-koodin-refaktorointi/code-examples/test_dependency_updater.py |
import shutil
from os import getcwd
from os.path import join, exists, abspath
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil.copytree('dependency_updater_test_data', tar... |
import shutil
from os import getcwd, chdir
from os.path import join, exists, abspath
from contextlib import contextmanager
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil... | Use context management protocol for test data fixtures | Use context management protocol for test data fixtures
| Python | bsd-2-clause | pkalliok/python-kurssi,pkalliok/python-kurssi |
import shutil
from os import getcwd
from os.path import join, exists, abspath
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil.copytree('dependency_updater_test_data', tar... |
import shutil
from os import getcwd, chdir
from os.path import join, exists, abspath
from contextlib import contextmanager
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil... | <commit_before>
import shutil
from os import getcwd
from os.path import join, exists, abspath
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil.copytree('dependency_updater_... |
import shutil
from os import getcwd, chdir
from os.path import join, exists, abspath
from contextlib import contextmanager
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil... |
import shutil
from os import getcwd
from os.path import join, exists, abspath
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil.copytree('dependency_updater_test_data', tar... | <commit_before>
import shutil
from os import getcwd
from os.path import join, exists, abspath
import dependency_updater
def destroy_testdata(target_path):
if exists(target_path): shutil.rmtree(target_path)
def create_testdata(target_path):
destroy_testdata(target_path)
shutil.copytree('dependency_updater_... |
4d0f243ce2042a15c41df011f1ba90cf3b8445d2 | gridfill/__init__.py | gridfill/__init__.py | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | Reset version number on v1.0.x maintenance branch | Reset version number on v1.0.x maintenance branch
| Python | mit | ajdawson/gridfill | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | <commit_before>"""Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitatio... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | """Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | <commit_before>"""Fill missing values in a grid."""
# Copyright (c) 2012-2014 Andrew Dawson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitatio... |
3983d7a7832fa6da6b19925cef0bce97a41c2f44 | events/hook.py | events/hook.py | from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = None
line = None
def setup(self):
if not self.name:
if self.line:
... | from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = ""
line = None
def setup(self):
if not self.name:
if self.line:
... | Make Hook.args default to the empty string | Make Hook.args default to the empty string
| Python | mit | frostyfrog/mark2,frostyfrog/mark2,SupaHam/mark2,SupaHam/mark2 | from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = None
line = None
def setup(self):
if not self.name:
if self.line:
... | from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = ""
line = None
def setup(self):
if not self.name:
if self.line:
... | <commit_before>from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = None
line = None
def setup(self):
if not self.name:
if self.lin... | from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = ""
line = None
def setup(self):
if not self.name:
if self.line:
... | from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = None
line = None
def setup(self):
if not self.name:
if self.line:
... | <commit_before>from events import Event, ACCEPTED
class Hook(Event):
contains = ('name', 'is_command', 'args')
requires = tuple()
requires_predicate = ('name',)
name = None
is_command = False
args = None
line = None
def setup(self):
if not self.name:
if self.lin... |
fda9d6fd0a8f437b06fa4e34396ca52f4874d32c | modules/pipeurlbuilder.py | modules/pipeurlbuilder.py | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | Fix to handle multiple path segments | Fix to handle multiple path segments
| Python | mit | nerevu/riko,nerevu/riko | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | <commit_before># pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- pat... | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | <commit_before># pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- pat... |
7302af8eb70d14360805910377241b974311d215 | taiga/projects/validators.py | taiga/projects/validators.py | from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from . import models
class ProjectExistsValidator:
def validate_project_id(self, attrs, source):
value = attrs[source]
if not models.Project.objects.filter(pk=value).exists():
msg = _("Ther... | # Copyright (C) 2015 Andrey Antukh <[email protected]>
# Copyright (C) 2015 Jesús Espino <[email protected]>
# Copyright (C) 2015 David Barragán <[email protected]>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | Add copyright and license terms | Add copyright and license terms
| Python | agpl-3.0 | xdevelsistemas/taiga-back-community,Rademade/taiga-back,dayatz/taiga-back,joshisa/taiga-back,jeffdwyatt/taiga-back,bdang2012/taiga-back-casting,Tigerwhit4/taiga-back,CMLL/taiga-back,xdevelsistemas/taiga-back-community,gam-phon/taiga-back,dayatz/taiga-back,astronaut1712/taiga-back,forging2012/taiga-back,joshisa/taiga-ba... | from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from . import models
class ProjectExistsValidator:
def validate_project_id(self, attrs, source):
value = attrs[source]
if not models.Project.objects.filter(pk=value).exists():
msg = _("Ther... | # Copyright (C) 2015 Andrey Antukh <[email protected]>
# Copyright (C) 2015 Jesús Espino <[email protected]>
# Copyright (C) 2015 David Barragán <[email protected]>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | <commit_before>from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from . import models
class ProjectExistsValidator:
def validate_project_id(self, attrs, source):
value = attrs[source]
if not models.Project.objects.filter(pk=value).exists():
... | # Copyright (C) 2015 Andrey Antukh <[email protected]>
# Copyright (C) 2015 Jesús Espino <[email protected]>
# Copyright (C) 2015 David Barragán <[email protected]>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from . import models
class ProjectExistsValidator:
def validate_project_id(self, attrs, source):
value = attrs[source]
if not models.Project.objects.filter(pk=value).exists():
msg = _("Ther... | <commit_before>from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from . import models
class ProjectExistsValidator:
def validate_project_id(self, attrs, source):
value = attrs[source]
if not models.Project.objects.filter(pk=value).exists():
... |
8eb3c6aa123cecec826c3c07f98b2d2b84c265af | scrapi/registry.py | scrapi/registry.py | import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __getitem__(self, key):
... | import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __hash__(self):
return ... | Make _Registry hashable so that django can import from scrapi | Make _Registry hashable so that django can import from scrapi
| Python | apache-2.0 | fabianvf/scrapi,felliott/scrapi,erinspace/scrapi,mehanig/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,felliott/scrapi,CenterForOpenScience/scrapi | import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __getitem__(self, key):
... | import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __hash__(self):
return ... | <commit_before>import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __getitem__(self... | import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __hash__(self):
return ... | import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __getitem__(self, key):
... | <commit_before>import sys
class _Registry(dict):
# These must be defined so that doctest gathering doesn't make
# pytest crash when trying to figure out what/where scrapi.registry is
__file__ = __file__
__name__ = __name__
def __init__(self):
dict.__init__(self)
def __getitem__(self... |
96cc3b85a34b0047a9483b571aa358df52bcaed0 | hitchdoc/recorder.py | hitchdoc/recorder.py | from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).first() is not None... | from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).first() is not None... | REFACTOR : Changed the name of step name from 'name' to 'step_name' to avoid clashing with a potential use of the word 'name' in kwargs. | REFACTOR : Changed the name of step name from 'name' to 'step_name' to avoid clashing with a potential use of the word 'name' in kwargs.
| Python | agpl-3.0 | hitchtest/hitchdoc | from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).first() is not None... | from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).first() is not None... | <commit_before>from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).firs... | from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).first() is not None... | from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).first() is not None... | <commit_before>from hitchdoc.database import Database
from hitchdoc import exceptions
import pickle
import base64
class Recorder(object):
def __init__(self, story, sqlite_filename):
self._story = story
self._db = Database(sqlite_filename)
if self._db.Recording.filter(name=story.name).firs... |
9409b9da1392514b7da5db4d44a32b47d8452e67 | play.py | play.py | import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.modulePath('xs.... | import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.setModulePath('... | Update to new namespace interface, walk components | Update to new namespace interface, walk components
| Python | apache-2.0 | jonfoster/pyxb2,jonfoster/pyxb-upstream-mirror,balanced/PyXB,pabigot/pyxb,balanced/PyXB,jonfoster/pyxb2,jonfoster/pyxb1,jonfoster/pyxb2,jonfoster/pyxb-upstream-mirror,CantemoInternal/pyxb,CantemoInternal/pyxb,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb1,CantemoInternal/pyxb,pabigot/pyxb,balanced/PyXB | import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.modulePath('xs.... | import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.setModulePath('... | <commit_before>import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.... | import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.setModulePath('... | import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.modulePath('xs.... | <commit_before>import PyWXSB.XMLSchema as xs
import PyWXSB.Namespace as Namespace
from PyWXSB.generate import PythonGenerator as Generator
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/kml21.xsd' ]
Namespace.XMLSchema.... |
f870254cfed6f5ea0f88dae910f5c80b7f325e9a | freeze/urls.py | freeze/urls.py | # -*- coding: utf-8 -*-
from django.conf.urls import url
from freeze import views
urlpatterns = [
url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
]
| # -*- coding: utf-8 -*-
if django.VERSION < (2, 0):
from django.conf.urls import include, url as path
else:
from django.urls import include, path
from freeze import views
urlpatterns = [
path("download-static-site/", views.download_static_site, name="freeze_download_static_site"),
path("generate-sta... | Support for newer versions of django | Support for newer versions of django | Python | mit | fabiocaccamo/django-freeze,fabiocaccamo/django-freeze,fabiocaccamo/django-freeze | # -*- coding: utf-8 -*-
from django.conf.urls import url
from freeze import views
urlpatterns = [
url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
]
Support for n... | # -*- coding: utf-8 -*-
if django.VERSION < (2, 0):
from django.conf.urls import include, url as path
else:
from django.urls import include, path
from freeze import views
urlpatterns = [
path("download-static-site/", views.download_static_site, name="freeze_download_static_site"),
path("generate-sta... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import url
from freeze import views
urlpatterns = [
url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
]... | # -*- coding: utf-8 -*-
if django.VERSION < (2, 0):
from django.conf.urls import include, url as path
else:
from django.urls import include, path
from freeze import views
urlpatterns = [
path("download-static-site/", views.download_static_site, name="freeze_download_static_site"),
path("generate-sta... | # -*- coding: utf-8 -*-
from django.conf.urls import url
from freeze import views
urlpatterns = [
url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
]
Support for n... | <commit_before># -*- coding: utf-8 -*-
from django.conf.urls import url
from freeze import views
urlpatterns = [
url(r'^download-static-site/$', views.download_static_site, name='freeze_download_static_site'),
url(r'^generate-static-site/$', views.generate_static_site, name='freeze_generate_static_site'),
]... |
0348ac3e341cbdba75eed29828c8b7c0a25a9a4a | services/flickr.py | services/flickr.py | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | Move Flickr over to its newly-secured API domain | Move Flickr over to its newly-secured API domain
| Python | bsd-3-clause | foauth/foauth.org,foauth/foauth.org,foauth/foauth.org | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | <commit_before>import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr.com/services/o... | <commit_before>import foauth.providers
class Flickr(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.flickr.com/'
docs_url = 'http://www.flickr.com/services/api/'
category = 'Pictures'
# URLs to interact with the API
request_token_url = 'http://www.flickr... |
5a4cf095a3eda5127ca54f8d293162740b836158 | services/heroku.py | services/heroku.py | import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'https://id.heroku.... | import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'https://id.heroku.... | Rewrite Heroku's scope handling a bit to better match reality | Rewrite Heroku's scope handling a bit to better match reality
| Python | bsd-3-clause | foauth/foauth.org,foauth/foauth.org,foauth/foauth.org | import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'https://id.heroku.... | import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'https://id.heroku.... | <commit_before>import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'htt... | import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'https://id.heroku.... | import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'https://id.heroku.... | <commit_before>import foauth.providers
class Heroku(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://heroku.com/'
docs_url = 'https://devcenter.heroku.com/articles/platform-api-reference'
category = 'Code'
# URLs to interact with the API
authorize_url = 'htt... |
93d33a8b3c618cb809640cfa010a4a34a43bf91f | api/scripts/add_adaptive_tests.py | api/scripts/add_adaptive_tests.py | import json, sqlite3, csv, sys
connection = sqlite3.connect('./db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenarios = []
... | import json, sqlite3, csv, sys
connection = sqlite3.connect('../db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenarios = []
... | Fix adaptive tests loading script | Fix adaptive tests loading script
| Python | agpl-3.0 | sgmap/pix,sgmap/pix,sgmap/pix,sgmap/pix | import json, sqlite3, csv, sys
connection = sqlite3.connect('./db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenarios = []
... | import json, sqlite3, csv, sys
connection = sqlite3.connect('../db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenarios = []
... | <commit_before>import json, sqlite3, csv, sys
connection = sqlite3.connect('./db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenari... | import json, sqlite3, csv, sys
connection = sqlite3.connect('../db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenarios = []
... | import json, sqlite3, csv, sys
connection = sqlite3.connect('./db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenarios = []
... | <commit_before>import json, sqlite3, csv, sys
connection = sqlite3.connect('./db/dev.sqlite3')
filename = sys.argv[1]
if filename.endswith('json'):
with open(filename) as f:
scenarios = json.load(f)['scenarios']
else:
with open(filename) as csvfile:
reader = csv.reader(csvfile)
scenari... |
33facaa6e656ecc30233d831ca8c8d1f2abc6d03 | src/tmserver/extensions/__init__.py | src/tmserver/extensions/__init__.py | from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask.ext.uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask.ext.redis import FlaskRedis
redis_store = FlaskRedis()
| from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask_uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask_redis import FlaskRedis
redis_store = FlaskRedis()
| Update depracted flask extension code | Update depracted flask extension code
| Python | agpl-3.0 | TissueMAPS/TmServer | from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask.ext.uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask.ext.redis import FlaskRedis
redis_store = FlaskRedis()
Update depracted flask extension code | from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask_uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask_redis import FlaskRedis
redis_store = FlaskRedis()
| <commit_before>from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask.ext.uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask.ext.redis import FlaskRedis
redis_store = FlaskRedis()
<commit_msg>Update depracted flask extension... | from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask_uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask_redis import FlaskRedis
redis_store = FlaskRedis()
| from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask.ext.uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask.ext.redis import FlaskRedis
redis_store = FlaskRedis()
Update depracted flask extension codefrom auth import jwt
... | <commit_before>from auth import jwt
from spark import Spark
spark = Spark()
from gc3pie import GC3Pie
gc3pie = GC3Pie()
from flask.ext.uwsgi_websocket import GeventWebSocket
websocket = GeventWebSocket()
from flask.ext.redis import FlaskRedis
redis_store = FlaskRedis()
<commit_msg>Update depracted flask extension... |
5e54e38ec6fc06aac08f3b900fe728b353b6a052 | gpioCleanup.py | gpioCleanup.py | import RPi.GPIO as GPIO
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
| import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
| Add gpio clean up tool | Add gpio clean up tool
| Python | mit | azmiik/tweetBooth | import RPi.GPIO as GPIO
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
Add gpio clean up tool | import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
| <commit_before>import RPi.GPIO as GPIO
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
<commit_msg>Add gpio clean up tool<commit_after> | import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
| import RPi.GPIO as GPIO
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
Add gpio clean up toolimport RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GP... | <commit_before>import RPi.GPIO as GPIO
GPIO.setup(16, GPIO.IN)
GPIO.setup(20, GPIO.IN)
GPIO.setup(23, GPIO.IN)
GPIO.setup(18, GPIO.IN)
GPIO.setup(17, GPIO.IN)
GPIO.setup(27, GPIO.IN)
GPIO.setup(5, GPIO.IN)
GPIO.cleanup()
<commit_msg>Add gpio clean up tool<commit_after>import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
... |
923c994fe9a7b02e1939b83ebeefc296cd16b607 | lib/proc_query.py | lib/proc_query.py | import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
}
... | import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
}
... | Rename proc object config key from proc_entry to simply object. | Rename proc object config key from proc_entry to simply object.
| Python | mit | mk23/snmpy,mk23/snmpy | import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
}
... | import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
}
... | <commit_before>import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
... | import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
}
... | import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
}
... | <commit_before>import re
import snmpy
class proc_query(snmpy.plugin):
def create(self):
for key, val in sorted(self.conf['objects'].items()):
extra = {
'run': self.gather,
'start': val.get('start', 0),
'regex': re.compile(val['regex']),
... |
ec9c671bc4140590c17b00277c424f93e20a5a5e | hvac/api/secrets_engines/__init__.py | hvac/api/secrets_engines/__init__.py | """Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.pki import Pki
... | """Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.pki import Pki
... | Enable the consul secret engine | Enable the consul secret engine
| Python | apache-2.0 | ianunruh/hvac,ianunruh/hvac | """Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.pki import Pki
... | """Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.pki import Pki
... | <commit_before>"""Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.... | """Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.pki import Pki
... | """Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.pki import Pki
... | <commit_before>"""Vault secrets engines endpoints"""
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.... |
9d15915784a94056283845a4ec0fd08ac8849d13 | jobs/test_settings.py | jobs/test_settings.py | from decouple import config
from jobs.settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': 'db',
'PORT': 5432,
}
}
#DATABASES = {
# 'default': ... | from decouple import config
from jobs.settings import *
try:
host = config('DB_HOST')
except:
host = 'db'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': host,
... | Add logic for db host during runtime | Add logic for db host during runtime
| Python | mit | misachi/job_match,misachi/job_match,misachi/job_match | from decouple import config
from jobs.settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': 'db',
'PORT': 5432,
}
}
#DATABASES = {
# 'default': ... | from decouple import config
from jobs.settings import *
try:
host = config('DB_HOST')
except:
host = 'db'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': host,
... | <commit_before>from decouple import config
from jobs.settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': 'db',
'PORT': 5432,
}
}
#DATABASES = {
#... | from decouple import config
from jobs.settings import *
try:
host = config('DB_HOST')
except:
host = 'db'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': host,
... | from decouple import config
from jobs.settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': 'db',
'PORT': 5432,
}
}
#DATABASES = {
# 'default': ... | <commit_before>from decouple import config
from jobs.settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_db',
'USER': 'postgres',
'PASSWORD': 'pass1234',
'HOST': 'db',
'PORT': 5432,
}
}
#DATABASES = {
#... |
f6a2ee7af08ac69be539b4d364bc2692918633e0 | hello_world.py | hello_world.py | #!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello Derrick Naminda!"
| #!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello derricknaminda!"
| Change hello world to include my github username | Change hello world to include my github username
| Python | mpl-2.0 | derricknaminda/lesson_01 | #!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello Derrick Naminda!"
Change hello world to include my github username | #!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello derricknaminda!"
| <commit_before>#!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello Derrick Naminda!"
<commit_msg>Change hello world to include my github username<commit_after> | #!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello derricknaminda!"
| #!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello Derrick Naminda!"
Change hello world to include my github username#!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello derricknaminda!"
| <commit_before>#!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello Derrick Naminda!"
<commit_msg>Change hello world to include my github username<commit_after>#!/usr/bin/env python
"""Prints a ``Hello World`` statement."""
print "Hello derricknaminda!"
|
6fedddf54200d4fcd9a5fac4946311be0abb80f1 | hutmap/urls.py | hutmap/urls.py | from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
urlpatterns = patterns('',
url(r'', include((hut_patterns, 'huts', 'h... | from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
ur... | Use proper setting for static files in development | Use proper setting for static files in development
| Python | mit | muescha/hutmap,dylanfprice/hutmap,muescha/hutmap,dylanfprice/hutmap,dylanfprice/hutmap,dylanfprice/hutmap,muescha/hutmap,muescha/hutmap | from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
urlpatterns = patterns('',
url(r'', include((hut_patterns, 'huts', 'h... | from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
ur... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
urlpatterns = patterns('',
url(r'', include((hut_patte... | from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
ur... | from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
urlpatterns = patterns('',
url(r'', include((hut_patterns, 'huts', 'h... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.gis import admin
from huts.urls import hut_patterns, api_patterns
admin.autodiscover()
# main site
urlpatterns = patterns('',
url(r'', include((hut_patte... |
bc6c744d56ca451aa47b0e66558de844d154f32c | setup.py | setup.py | from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.5.3',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = 'A Siegfried-bas... | from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.6.0',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = 'A Siegfried-bas... | Update for 1.6.0 - TODO: add Windows | Update for 1.6.0 - TODO: add Windows | Python | mit | timothyryanwalsh/brunnhilde | from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.5.3',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = 'A Siegfried-bas... | from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.6.0',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = 'A Siegfried-bas... | <commit_before>from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.5.3',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = '... | from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.6.0',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = 'A Siegfried-bas... | from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.5.3',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = 'A Siegfried-bas... | <commit_before>from setuptools import setup
setup(
name = 'brunnhilde',
version = '1.5.3',
url = 'https://github.com/timothyryanwalsh/brunnhilde',
author = 'Tim Walsh',
author_email = '[email protected]',
py_modules = ['brunnhilde'],
scripts = ['brunnhilde.py'],
description = '... |
d92405ac96b104b0f2ae005fe9c1ae1d10d9f66c | backdrop/write/config/development.py | backdrop/write/config/development.py | DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError:
from deve... | DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError:
from deve... | Add dev credentials for transformer rabbitmq user | Add dev credentials for transformer rabbitmq user
| Python | mit | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError:
from deve... | DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError:
from deve... | <commit_before>DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError... | DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError:
from deve... | DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError:
from deve... | <commit_before>DATABASE_NAME = "backdrop"
MONGO_HOSTS = ['localhost']
MONGO_PORT = 27017
LOG_LEVEL = "DEBUG"
DATA_SET_AUTO_ID_KEYS = {
"lpa_volumes": ("key", "start_at", "end_at")
}
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
try:
from development_environment import *
except ImportError... |
05dd1182574c1f95a92c4523d18686e0482e6a68 | kboard/board/urls.py | kboard/board/urls.py | # Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new... | # Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new... | Delete 'borad_slug' parameter on 'new_comment' url | Delete 'borad_slug' parameter on 'new_comment' url
| Python | mit | guswnsxodlf/k-board,kboard/kboard,hyesun03/k-board,darjeeling/k-board,cjh5414/kboard,cjh5414/kboard,hyesun03/k-board,kboard/kboard,cjh5414/kboard,kboard/kboard,guswnsxodlf/k-board,hyesun03/k-board,guswnsxodlf/k-board | # Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new... | # Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new... | <commit_before># Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_... | # Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new... | # Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new... | <commit_before># Created by JHJ on 2016. 10. 5.
from django.conf.urls import url
from . import views
app_name = 'board'
urlpatterns = [
url(r'^$', views.board_list, name='board_list'),
url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'),
url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_... |
9f2ac5bf89c7a50281f6409f43bae5e513334e03 | sslify/middleware.py | sslify/middleware.py | from django.conf import settings
from django.core import mail
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settin... | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | Remove strange outbox requirement for SSLIFY_DISABLE | Remove strange outbox requirement for SSLIFY_DISABLE
I don't understand why that was a condition of the SSLIFY_DISABLE flag, so I removed it. | Python | unlicense | rdegges/django-sslify | from django.conf import settings
from django.core import mail
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settin... | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | <commit_before>from django.conf import settings
from django.core import mail
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take eff... | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | from django.conf import settings
from django.core import mail
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settin... | <commit_before>from django.conf import settings
from django.core import mail
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take eff... |
895f82d1ad3840b56f8b2c629e822b143494c990 | manoseimas/mps_v2/management/commands/precompute_word_counts.py | manoseimas/mps_v2/management/commands/precompute_word_counts.py | import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Procompute word counts for stenogram statements'
def handle(self, **options):
total = mpsv2_models.... | import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Precompute word counts for stenogram statements'
def handle(self, **options):
total = mpsv2_models.... | Fix a typo in precompute_word_count command help text. | Fix a typo in precompute_word_count command help text.
| Python | agpl-3.0 | ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt | import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Procompute word counts for stenogram statements'
def handle(self, **options):
total = mpsv2_models.... | import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Precompute word counts for stenogram statements'
def handle(self, **options):
total = mpsv2_models.... | <commit_before>import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Procompute word counts for stenogram statements'
def handle(self, **options):
total ... | import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Precompute word counts for stenogram statements'
def handle(self, **options):
total = mpsv2_models.... | import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Procompute word counts for stenogram statements'
def handle(self, **options):
total = mpsv2_models.... | <commit_before>import tqdm
from django.core.management.base import BaseCommand
import manoseimas.common.utils.words as words_utils
import manoseimas.mps_v2.models as mpsv2_models
class Command(BaseCommand):
help = 'Procompute word counts for stenogram statements'
def handle(self, **options):
total ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.