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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fcb060c598f3010de9e702ba419f8c8aa5c0097b | mixmind/database.py | mixmind/database.py | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
from . import app
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first be... | Clean up the upgrader logic and add a config option for it | Clean up the upgrader logic and add a config option for it
| Python | apache-2.0 | twschum/mix-mind,twschum/mix-mind,twschum/mix-mind,twschum/mix-mind | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
from . import app
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first be... | <commit_before>from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first befor... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
from . import app
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first be... | from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first before calling init_... | <commit_before>from flask_sqlalchemy import SQLAlchemy
from flask_alembic import Alembic
db = SQLAlchemy()
alembic = Alembic()
def init_db():
# import all modules here that might define models so that
# they will be registered properly on the metadata. Otherwise
# you will have to import them first befor... |
21e91efbf9cb064f1fcd19ba7a77ba81a6c843f5 | isso/db/preferences.py | isso/db/preferences.py | # -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24))),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' key VARCHAR PR... | # -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24)).decode('utf-8')),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' ... | Save the session-key as a unicode string in the db | Save the session-key as a unicode string in the db
The session-key should be saved as a string, not a byte string.
| Python | mit | posativ/isso,xuhdev/isso,Mushiyo/isso,jelmer/isso,princesuke/isso,jiumx60rus/isso,janusnic/isso,janusnic/isso,Mushiyo/isso,Mushiyo/isso,posativ/isso,mathstuf/isso,janusnic/isso,jiumx60rus/isso,WQuanfeng/isso,jelmer/isso,princesuke/isso,jelmer/isso,Mushiyo/isso,WQuanfeng/isso,xuhdev/isso,mathstuf/isso,xuhdev/isso,prince... | # -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24))),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' key VARCHAR PR... | # -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24)).decode('utf-8')),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' ... | <commit_before># -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24))),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' ... | # -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24)).decode('utf-8')),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' ... | # -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24))),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' key VARCHAR PR... | <commit_before># -*- encoding: utf-8 -*-
import os
import binascii
class Preferences:
defaults = [
("session-key", binascii.b2a_hex(os.urandom(24))),
]
def __init__(self, db):
self.db = db
self.db.execute([
'CREATE TABLE IF NOT EXISTS preferences (',
' ... |
4d5af4869871b45839952dd9f881635bd07595c1 | parsers/RPOnline.py | parsers/RPOnline.py | from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '1\.\d*$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntities=BeautifulSoup.HTML_... | from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '(?<!(vid|bid|iid))(-1\.\d*)$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntitie... | Exclude Videos article and non-scrapable info-galleries and picture-galleries via URL-pattern | Exclude Videos article and non-scrapable info-galleries and picture-galleries via URL-pattern
| Python | mit | catcosmo/newsdiffs,catcosmo/newsdiffs,catcosmo/newsdiffs | from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '1\.\d*$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntities=BeautifulSoup.HTML_... | from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '(?<!(vid|bid|iid))(-1\.\d*)$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntitie... | <commit_before>from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '1\.\d*$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntities=Beau... | from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '(?<!(vid|bid|iid))(-1\.\d*)$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntitie... | from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '1\.\d*$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntities=BeautifulSoup.HTML_... | <commit_before>from baseparser import BaseParser
from BeautifulSoup import BeautifulSoup, Tag
class RPOParser(BaseParser):
domains = ['www.rp-online.de']
feeder_pat = '1\.\d*$'
feeder_pages = ['http://www.rp-online.de/']
def _parse(self, html):
soup = BeautifulSoup(html, convertEntities=Beau... |
014f7d9ef9a10264f78f42a63ffa03dd9cd4e122 | test/test_texture.py | test/test_texture.py | import unittest
import os
import pywavefront.texture
import pywavefront.visualization # power of two test
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the image name should ... | import unittest
import os
import pywavefront.texture
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the image name should be the last component of the path."""
my_textu... | Remove tests depending on pyglet entirely | Remove tests depending on pyglet entirely
| Python | bsd-3-clause | greenmoss/PyWavefront | import unittest
import os
import pywavefront.texture
import pywavefront.visualization # power of two test
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the image name should ... | import unittest
import os
import pywavefront.texture
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the image name should be the last component of the path."""
my_textu... | <commit_before>import unittest
import os
import pywavefront.texture
import pywavefront.visualization # power of two test
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the ima... | import unittest
import os
import pywavefront.texture
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the image name should be the last component of the path."""
my_textu... | import unittest
import os
import pywavefront.texture
import pywavefront.visualization # power of two test
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the image name should ... | <commit_before>import unittest
import os
import pywavefront.texture
import pywavefront.visualization # power of two test
def prepend_dir(file):
return os.path.join(os.path.dirname(__file__), file)
class TestTexture(unittest.TestCase):
def testPathedImageName(self):
"""For Texture objects, the ima... |
29cf128a62f66d924980a5a48156045d88f644c5 | scripts/tabledef.py | scripts/tabledef.py | # -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database connection using... | # -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database connection using... | Increase size of `password` column | Increase size of `password` column | Python | mit | anfederico/Flaskex,anfederico/Flaskex,anfederico/Flaskex | # -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database connection using... | # -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database connection using... | <commit_before># -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database c... | # -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database connection using... | # -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database connection using... | <commit_before># -*- coding: utf-8 -*-
import sys
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///accounts.db'
Base = declarative_base()
def db_connect():
"""
Performs database c... |
b8a54a3bef04b43356d2472c59929ad15a0b6d4b | semantics/common.py | semantics/common.py | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import numpy as np
def get_exponent(v):
if isinstance(v, np.float32):
mask, shift, offset = 0x7f800000, 23, 127
else:
raise NotImplementedError('The value v can only be of type np.float32')
return ((v.view('i') & mask) >> shift) - off... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import gmpy2
from gmpy2 import mpq, mpfr
def ulp(v):
return mpq(2) ** v.as_mantissa_exp()[1]
def round(mode):
def decorator(f):
def wrapped(v1, v2):
with gmpy2.local_context(round=mode):
return f(v1, v2)
retu... | Use gmpy2 instead of numpy | Use gmpy2 instead of numpy
| Python | mit | admk/soap | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import numpy as np
def get_exponent(v):
if isinstance(v, np.float32):
mask, shift, offset = 0x7f800000, 23, 127
else:
raise NotImplementedError('The value v can only be of type np.float32')
return ((v.view('i') & mask) >> shift) - off... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import gmpy2
from gmpy2 import mpq, mpfr
def ulp(v):
return mpq(2) ** v.as_mantissa_exp()[1]
def round(mode):
def decorator(f):
def wrapped(v1, v2):
with gmpy2.local_context(round=mode):
return f(v1, v2)
retu... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import numpy as np
def get_exponent(v):
if isinstance(v, np.float32):
mask, shift, offset = 0x7f800000, 23, 127
else:
raise NotImplementedError('The value v can only be of type np.float32')
return ((v.view('i') & mask) ... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import gmpy2
from gmpy2 import mpq, mpfr
def ulp(v):
return mpq(2) ** v.as_mantissa_exp()[1]
def round(mode):
def decorator(f):
def wrapped(v1, v2):
with gmpy2.local_context(round=mode):
return f(v1, v2)
retu... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import numpy as np
def get_exponent(v):
if isinstance(v, np.float32):
mask, shift, offset = 0x7f800000, 23, 127
else:
raise NotImplementedError('The value v can only be of type np.float32')
return ((v.view('i') & mask) >> shift) - off... | <commit_before>#!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
import numpy as np
def get_exponent(v):
if isinstance(v, np.float32):
mask, shift, offset = 0x7f800000, 23, 127
else:
raise NotImplementedError('The value v can only be of type np.float32')
return ((v.view('i') & mask) ... |
84e41e39921b33fc9c84a99fe498587ca7ac30ae | settings_example.py | settings_example.py | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = '[email protected]'
# Restrict emails by su... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
# If this is set to a valid path, all CSV files extracted from emails will be
# stored in sub-folders within it.
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{... | Add CSV folder setting comment | Add CSV folder setting comment
| Python | mit | AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = '[email protected]'
# Restrict emails by su... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
# If this is set to a valid path, all CSV files extracted from emails will be
# stored in sub-folders within it.
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{... | <commit_before>import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = '[email protected]'
# Restri... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
# If this is set to a valid path, all CSV files extracted from emails will be
# stored in sub-folders within it.
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{... | import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = '[email protected]'
# Restrict emails by su... | <commit_before>import os
import re
from imap import EmailCheckError, EmailServer
from postgresql import DatabaseServer
CSV_FOLDER = os.getcwd()
# Values come from `EMAIL_SUBJECT_RE`.
CSV_NAME_FORMAT = '{year}-{month}-{day}T{hour}{minute}.csv'
# Restrict emails by sender.
EMAIL_FROM = '[email protected]'
# Restri... |
c2a090772e8aaa3a1f2239c0ca7abc0cb8978c88 | Tools/compiler/compile.py | Tools/compiler/compile.py | import sys
import getopt
from compiler import compile, visitor
def main():
VERBOSE = 0
DISPLAY = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqd')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVisitor.VERBOSE + 1
if k == '-q... | import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVis... | Add -c option to continue if one file has a SyntaxError | Add -c option to continue if one file has a SyntaxError
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | import sys
import getopt
from compiler import compile, visitor
def main():
VERBOSE = 0
DISPLAY = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqd')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVisitor.VERBOSE + 1
if k == '-q... | import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVis... | <commit_before>import sys
import getopt
from compiler import compile, visitor
def main():
VERBOSE = 0
DISPLAY = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqd')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVisitor.VERBOSE + 1
... | import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVis... | import sys
import getopt
from compiler import compile, visitor
def main():
VERBOSE = 0
DISPLAY = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqd')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVisitor.VERBOSE + 1
if k == '-q... | <commit_before>import sys
import getopt
from compiler import compile, visitor
def main():
VERBOSE = 0
DISPLAY = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqd')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVisitor.VERBOSE + 1
... |
9a0fd1daf7d35ae1b29e3d1dbbc11272fcb13847 | app/start.py | app/start.py | from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml_string = open(... | from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml_string = open(... | Enable sort keys in json dumps to make sure json is stable | Enable sort keys in json dumps to make sure json is stable
| Python | bsd-2-clause | c0d3m0nkey/xml-to-json-converter | from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml_string = open(... | from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml_string = open(... | <commit_before>from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml... | from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml_string = open(... | from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml_string = open(... | <commit_before>from lxml import objectify, etree
import simplejson as json
from converter.nsl.nsl_converter import NslConverter
from converter.nsl.other.nsl_other_converter import NslOtherConverter
import sys
xml = open("SEnsl_ssi.xml")
xml_string = xml.read()
xml_obj = objectify.fromstring(xml_string)
nsl_other_xml... |
8c9414aa3badd31a60ce88f37fed41e98c867d9f | windberg_web/__init__.py | windberg_web/__init__.py | # register a signal do update permissions every migration.
# This is based on app django_extensions update_permissions command
from south.signals import post_migrate
def update_permissions_after_migration(app,**kwargs):
"""
Update app permission just after every migration.
This is based on app django_exten... | Update custom permissions after migration | Update custom permissions after migration
| Python | bsd-3-clause | janLo/Windberg-web,janLo/Windberg-web | Update custom permissions after migration | # register a signal do update permissions every migration.
# This is based on app django_extensions update_permissions command
from south.signals import post_migrate
def update_permissions_after_migration(app,**kwargs):
"""
Update app permission just after every migration.
This is based on app django_exten... | <commit_before><commit_msg>Update custom permissions after migration<commit_after> | # register a signal do update permissions every migration.
# This is based on app django_extensions update_permissions command
from south.signals import post_migrate
def update_permissions_after_migration(app,**kwargs):
"""
Update app permission just after every migration.
This is based on app django_exten... | Update custom permissions after migration# register a signal do update permissions every migration.
# This is based on app django_extensions update_permissions command
from south.signals import post_migrate
def update_permissions_after_migration(app,**kwargs):
"""
Update app permission just after every migrati... | <commit_before><commit_msg>Update custom permissions after migration<commit_after># register a signal do update permissions every migration.
# This is based on app django_extensions update_permissions command
from south.signals import post_migrate
def update_permissions_after_migration(app,**kwargs):
"""
Updat... | |
b32520e0fb2ff72498b16ea75bea53fbbe96854f | tests/functional/services/api/images/test_post.py | tests/functional/services/api/images/test_post.py | class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
details = resp.body[... | class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
details = resp.body[... | Update failure key in test | Update failure key in test
Signed-off-by: Zane Burstein <[email protected]>
| Python | apache-2.0 | anchore/anchore-engine,anchore/anchore-engine,anchore/anchore-engine | class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
details = resp.body[... | class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
details = resp.body[... | <commit_before>class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
detai... | class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
details = resp.body[... | class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
details = resp.body[... | <commit_before>class TestOversizedImageReturns400:
# Expectation for this test is that the image with tag is greater than the value defined in config
def test_oversized_image_post(self, make_image_analysis_request):
resp = make_image_analysis_request("anchore/test_images:oversized_image")
detai... |
e195ab1f4e83febf7b3b7dff7e1b63b578986167 | tests.py | tests.py | from unittest import TestCase
from markdown import Markdown
from mdx_attr_cols import AttrColTreeProcessor
class TestAttrColTreeProcessor(TestCase):
def mk_processor(self, **conf):
md = Markdown()
return AttrColTreeProcessor(md, conf)
def test_config_defaults(self):
p = self.mk_proc... | from unittest import TestCase
import xmltodict
from markdown import Markdown
from markdown.util import etree
from mdx_attr_cols import AttrColTreeProcessor
class XmlTestCaseMixin(object):
def mk_doc(self, s):
return etree.fromstring(
"<div>" + s.strip() + "</div>")
def assertXmlEqual(s... | Check handling of simple rows. | Check handling of simple rows.
| Python | isc | CTPUG/mdx_attr_cols | from unittest import TestCase
from markdown import Markdown
from mdx_attr_cols import AttrColTreeProcessor
class TestAttrColTreeProcessor(TestCase):
def mk_processor(self, **conf):
md = Markdown()
return AttrColTreeProcessor(md, conf)
def test_config_defaults(self):
p = self.mk_proc... | from unittest import TestCase
import xmltodict
from markdown import Markdown
from markdown.util import etree
from mdx_attr_cols import AttrColTreeProcessor
class XmlTestCaseMixin(object):
def mk_doc(self, s):
return etree.fromstring(
"<div>" + s.strip() + "</div>")
def assertXmlEqual(s... | <commit_before>from unittest import TestCase
from markdown import Markdown
from mdx_attr_cols import AttrColTreeProcessor
class TestAttrColTreeProcessor(TestCase):
def mk_processor(self, **conf):
md = Markdown()
return AttrColTreeProcessor(md, conf)
def test_config_defaults(self):
p... | from unittest import TestCase
import xmltodict
from markdown import Markdown
from markdown.util import etree
from mdx_attr_cols import AttrColTreeProcessor
class XmlTestCaseMixin(object):
def mk_doc(self, s):
return etree.fromstring(
"<div>" + s.strip() + "</div>")
def assertXmlEqual(s... | from unittest import TestCase
from markdown import Markdown
from mdx_attr_cols import AttrColTreeProcessor
class TestAttrColTreeProcessor(TestCase):
def mk_processor(self, **conf):
md = Markdown()
return AttrColTreeProcessor(md, conf)
def test_config_defaults(self):
p = self.mk_proc... | <commit_before>from unittest import TestCase
from markdown import Markdown
from mdx_attr_cols import AttrColTreeProcessor
class TestAttrColTreeProcessor(TestCase):
def mk_processor(self, **conf):
md = Markdown()
return AttrColTreeProcessor(md, conf)
def test_config_defaults(self):
p... |
ab73b2132825e9415ff24306a9d89da10294d79e | icekit/utils/management/base.py | icekit/utils/management/base.py | import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (default is 1 min). The intent for the '
'ma... | import logging
import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
logger = logging.getLogger(__name__)
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (de... | Use `logging` instead of printing to stdout by default. | Use `logging` instead of printing to stdout by default.
| Python | mit | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit | import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (default is 1 min). The intent for the '
'ma... | import logging
import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
logger = logging.getLogger(__name__)
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (de... | <commit_before>import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (default is 1 min). The intent for the '
... | import logging
import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
logger = logging.getLogger(__name__)
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (de... | import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (default is 1 min). The intent for the '
'ma... | <commit_before>import time
from django import db
from django.core.management.base import BaseCommand
from optparse import make_option
class CronBaseCommand(BaseCommand):
help = ('Long running process (indefinitely) that executes task on a '
'specified interval (default is 1 min). The intent for the '
... |
4a3f56f895b3ed1c4f0f7ae7b012f9048f939d7f | runtests.py | runtests.py | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.extensions',
... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.extensions',
... | Comment out modules with broken tests. | Comment out modules with broken tests.
| Python | bsd-3-clause | rescrv/firmant | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.extensions',
... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.extensions',
... | <commit_before>#!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firman... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.extensions',
... | #!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firmant.extensions',
... | <commit_before>#!/usr/bin/python
import unittest
import doctest
import sys
from optparse import OptionParser
from firmant.utils import get_module
# Import this now to avoid it throwing errors.
import pytz
if __name__ == '__main__':
suite = unittest.TestSuite()
modules = ['firmant.du',
'firman... |
4625a1ed4115b85ce7d96a0d0ba486e589e9fe6c | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from optparse import OptionParser
from os.path import abspath, dirname
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args, **kwargs):
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
test_runner = DjangoTestSuiteRunner(
verbo... | #!/usr/bin/env python
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.test.utils import get_runner
from django.conf import settings
import django
if django.VERSION >= (1, 7):
django.setup()
def runtests():
TestRunner = get_runner(settings)
test_runner = TestRunn... | Make test runner only run basis tests | Make test runner only run basis tests
and not dependecies tests
| Python | mit | frecar/django-basis | #!/usr/bin/env python
import sys
from optparse import OptionParser
from os.path import abspath, dirname
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args, **kwargs):
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
test_runner = DjangoTestSuiteRunner(
verbo... | #!/usr/bin/env python
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.test.utils import get_runner
from django.conf import settings
import django
if django.VERSION >= (1, 7):
django.setup()
def runtests():
TestRunner = get_runner(settings)
test_runner = TestRunn... | <commit_before>#!/usr/bin/env python
import sys
from optparse import OptionParser
from os.path import abspath, dirname
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args, **kwargs):
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
test_runner = DjangoTestSuiteRunner... | #!/usr/bin/env python
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.test.utils import get_runner
from django.conf import settings
import django
if django.VERSION >= (1, 7):
django.setup()
def runtests():
TestRunner = get_runner(settings)
test_runner = TestRunn... | #!/usr/bin/env python
import sys
from optparse import OptionParser
from os.path import abspath, dirname
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args, **kwargs):
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
test_runner = DjangoTestSuiteRunner(
verbo... | <commit_before>#!/usr/bin/env python
import sys
from optparse import OptionParser
from os.path import abspath, dirname
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args, **kwargs):
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
test_runner = DjangoTestSuiteRunner... |
1648cec8667611aa7fec4bff12f873f8e6294f82 | scripts/bodyconf.py | scripts/bodyconf.py | #!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70]
]
| #!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70],
[0,10,20,30,40,50,60,70]
]
| Add whole image as an input | Add whole image as an input
| Python | mit | Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid | #!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70]
]
Add whole image as an input | #!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70],
[0,10,20,30,40,50,60,70]
]
| <commit_before>#!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70]
]
<commit_msg>Add whole image as an input<commit_after> | #!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70],
[0,10,20,30,40,50,60,70]
]
| #!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70]
]
Add whole image as an input#!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
... | <commit_before>#!/usr/bin/python2
# -*- coding: utf-8 -*-
pixval = {
'hair': 10,
'head': 20,
'upper': 30,
'arms': 40,
'lower': 50,
'legs': 60,
'feet': 70
}
groups = [
[10, 20],
[30, 40],
[50, 60],
[70]
]
<commit_msg>Add whole image as an input<commit_after>#!/usr/bin/python... |
00b9bee02f2b7c399da9cd3488790dd53ed7801e | jobsboard/jobs/forms.py | jobsboard/jobs/forms.py | from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated',]
| from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated', 'expiry']
| Hide expiry date field from job post create page | Hide expiry date field from job post create page
| Python | mit | pythonph/jobs-board,pythonph/jobs-board,pythonph/jobs-board | from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated',]
Hide expiry date field from job post create page | from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated', 'expiry']
| <commit_before>from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated',]
<commit_msg>Hide expiry date field from job post create page... | from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated', 'expiry']
| from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated',]
Hide expiry date field from job post create pagefrom django import forms
f... | <commit_before>from django import forms
from .models import Job
class JobForm(forms.ModelForm):
# class Meta:
# model = Job
# fields = ('title', 'creator',)
class Meta:
model = Job
exclude = ['created', 'updated',]
<commit_msg>Hide expiry date field from job post create page... |
c87a71035782da3a9f9b26c9fb6a30ce42855913 | board.py | board.py | import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.boardMatrix = numpy.... | import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.matrix = numpy.zeros... | Change from camelcase to underscores. | Change from camelcase to underscores.
| Python | mit | isaacarvestad/four-in-a-row | import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.boardMatrix = numpy.... | import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.matrix = numpy.zeros... | <commit_before>import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.board... | import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.matrix = numpy.zeros... | import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.boardMatrix = numpy.... | <commit_before>import numpy
"""
Board represents a four in a row game board.
Author: Isaac Arvestad
"""
class Board:
"""
Initializes the game with a certain number of rows
and columns.
"""
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
self.board... |
dfaff0553379f5686efc5da722e2ffac455a2d9f | administrator/serializers.py | administrator/serializers.py | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | Add is_active to category serializer | Add is_active to category serializer
| Python | apache-2.0 | belatrix/BackendAllStars | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | <commit_before>from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subc... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subcategories = Sub... | <commit_before>from categories.models import Category, Keyword, Subcategory
from rest_framework import serializers
class SubcategoryListSerializer(serializers.ModelSerializer):
class Meta:
model = Subcategory
fields = ('pk', 'name')
class CategorySerializer(serializers.ModelSerializer):
subc... |
0c79d2fee14d5d2bff51ade9d643df22dde7f301 | polyaxon/polyaxon/config_settings/scheduler/__init__.py | polyaxon/polyaxon/config_settings/scheduler/__init__.py | from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from .apps import *
| from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from polyaxon.config_settings.registry import *
from .apps import *
| Add registry settings to scheduler | Add registry settings to scheduler
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from .apps import *
Add registry settings to scheduler | from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from polyaxon.config_settings.registry import *
from .apps import *
| <commit_before>from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from .apps import *
<commit_msg>Add registry settings to scheduler<commit_after> | from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from polyaxon.config_settings.registry import *
from .apps import *
| from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from .apps import *
Add registry settings to schedulerfrom polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import ... | <commit_before>from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from polyaxon.config_settings.spawner import *
from .apps import *
<commit_msg>Add registry settings to scheduler<commit_after>from polyaxon.config_settings.k8s import *
from polyaxon.config_settings.dirs import *
from... |
2d5152e72e1813ee7bf040f4033d369d60a44cc2 | pipeline/compute_rpp/compute_rpp.py | pipeline/compute_rpp/compute_rpp.py | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can create a list of ... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.restoration import denoise
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path... | Update the pipeline to take into account the outlier rejection method to compute the RPP | Update the pipeline to take into account the outlier rejection method to compute the RPP
| Python | mit | glemaitre/power-profile,glemaitre/power-profile,clemaitre58/power-profile,clemaitre58/power-profile | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can create a list of ... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.restoration import denoise
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path... | <commit_before>import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can cr... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.restoration import denoise
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path... | import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can create a list of ... | <commit_before>import sys
import os
import numpy as np
from skcycling.utils import load_power_from_fit
from skcycling.power_profile import Rpp
# The first input argument corresponding to the data path
data_path = sys.argv[1]
# The second input argument is the storage directory
storage_path = sys.argv[2]
# We can cr... |
76a32bf058583072100246c92970fdbda9a45106 | locations/pipelines.py | locations/pipelines.py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy import signals
cl... | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy import signals
cl... | Handle geojson feature without latlon | Handle geojson feature without latlon
| Python | mit | iandees/all-the-places,iandees/all-the-places,iandees/all-the-places | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy import signals
cl... | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy import signals
cl... | <commit_before># -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy impo... | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy import signals
cl... | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy import signals
cl... | <commit_before># -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
from scrapy.xlib.pydispatch import dispatcher
from scrapy.exceptions import DropItem
from scrapy impo... |
69b816868337683a7dd90f24711e03c5eb982416 | kitchen/lib/__init__.py | kitchen/lib/__init__.py | import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = {}
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filename in os.listd... | import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = []
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filename in os.listd... | Use a sortable list instead of a dictionary of values for the return value | Use a sortable list instead of a dictionary of values for the return value
| Python | apache-2.0 | edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen | import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = {}
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filename in os.listd... | import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = []
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filename in os.listd... | <commit_before>import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = {}
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filen... | import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = []
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filename in os.listd... | import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = {}
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filename in os.listd... | <commit_before>import os
import json
from kitchen.settings import KITCHEN_LOCATION
def load_data(data_type):
retval = {}
nodes_dir = os.path.join(KITCHEN_LOCATION, data_type)
if not os.path.isdir(nodes_dir):
raise IOError('Invalid data type or kitchen location. Check your settings.')
for filen... |
286c8151c174f11df98d6cb421252c0d61337add | flake8_coding.py | flake8_coding.py | # -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
'--accept-enc... | # -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
'--accept-enc... | Update regexp to detect magic comment | Update regexp to detect magic comment
| Python | apache-2.0 | tk0miya/flake8-coding | # -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
'--accept-enc... | # -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
'--accept-enc... | <commit_before># -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
... | # -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
'--accept-enc... | # -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
'--accept-enc... | <commit_before># -*- coding: utf-8 -*-
import re
__version__ = '0.1.0'
class CodingChecker(object):
name = 'flake8_coding'
version = __version__
def __init__(self, tree, filename):
self.filename = filename
@classmethod
def add_options(cls, parser):
parser.add_option(
... |
7cb5a225738bfc1236ef5836aad50e216a7e7355 | apps/blog/license_urls.py | apps/blog/license_urls.py | """
URLCONF for the blog app.
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/$', views.license_detail, name='license_detail'),
# Related articles feed
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/... | """
URLCONF for the blog app (add-on urls for the license app).
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/articles/$', views.license_detail, name='license_articles_detail'),
# Relate... | Rework blog license add-on urls | Rework blog license add-on urls
| Python | agpl-3.0 | TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker | """
URLCONF for the blog app.
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/$', views.license_detail, name='license_detail'),
# Related articles feed
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/... | """
URLCONF for the blog app (add-on urls for the license app).
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/articles/$', views.license_detail, name='license_articles_detail'),
# Relate... | <commit_before>"""
URLCONF for the blog app.
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/$', views.license_detail, name='license_detail'),
# Related articles feed
url(r'^(?P<slug>[... | """
URLCONF for the blog app (add-on urls for the license app).
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/articles/$', views.license_detail, name='license_articles_detail'),
# Relate... | """
URLCONF for the blog app.
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/$', views.license_detail, name='license_detail'),
# Related articles feed
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/... | <commit_before>"""
URLCONF for the blog app.
"""
from django.conf.urls import url
from . import views, feeds
# URL patterns configuration
urlpatterns = (
# License index page
url(r'^(?P<slug>[-a-zA-Z0-9_]+)/$', views.license_detail, name='license_detail'),
# Related articles feed
url(r'^(?P<slug>[... |
5dfacded4f0dd8e7b5e7fe212fc6bfe017dcb2b5 | games.py | games.py | """
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}
],
... | """
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}
],
... | Use ISO formatted time stamps | Use ISO formatted time stamps
| Python | bsd-3-clause | siggame/ng-games,siggame/ng-games,siggame/ng-games | """
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}
],
... | """
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}
],
... | <commit_before>"""
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}... | """
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}
],
... | """
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}
],
... | <commit_before>"""
This module is for generating fake game data for use with the API.
An example of some game data::
{
"id": 1,
"logURL": "http://derp.nope/",
"winner": 0,
"updates": [
{
"status": "complete",
"time": "today"
}... |
e45d6439d3858e70fde8f1dad1d72d8c291e8979 | build-single-file-version.py | build-single-file-version.py | #! /usr/bin/env python
import os
import stat
import zipfile
import StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO.StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fname in os.listdir(package_dir):
fpath = os.path.join(package_dir, fnam... | #! /usr/bin/env python
import os
import stat
import zipfile
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO as StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fn... | Make the build script P2/3 compatible | Make the build script P2/3 compatible
| Python | mit | theinternetftw/xyppy | #! /usr/bin/env python
import os
import stat
import zipfile
import StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO.StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fname in os.listdir(package_dir):
fpath = os.path.join(package_dir, fnam... | #! /usr/bin/env python
import os
import stat
import zipfile
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO as StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fn... | <commit_before>#! /usr/bin/env python
import os
import stat
import zipfile
import StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO.StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fname in os.listdir(package_dir):
fpath = os.path.join(pa... | #! /usr/bin/env python
import os
import stat
import zipfile
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO as StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fn... | #! /usr/bin/env python
import os
import stat
import zipfile
import StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO.StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fname in os.listdir(package_dir):
fpath = os.path.join(package_dir, fnam... | <commit_before>#! /usr/bin/env python
import os
import stat
import zipfile
import StringIO
package_dir = 'xyppy'
python_directive = '#!/usr/bin/env python'
packed = StringIO.StringIO()
packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED)
for fname in os.listdir(package_dir):
fpath = os.path.join(pa... |
38964f0f840a7b60f5ce65ca2857789d92b133b5 | django_base64field/tests.py | django_base64field/tests.py | from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(max_length=13)
class Continent(models.Model):
ek = Base64Field()
name = model... | from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(
default='Fucker',
max_length=103
)
class Continent(models.Model)... | Make fields on model have defaults value | Make fields on model have defaults value
Like who cares for their default value
| Python | bsd-3-clause | Alir3z4/django-base64field | from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(max_length=13)
class Continent(models.Model):
ek = Base64Field()
name = model... | from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(
default='Fucker',
max_length=103
)
class Continent(models.Model)... | <commit_before>from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(max_length=13)
class Continent(models.Model):
ek = Base64Field()
... | from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(
default='Fucker',
max_length=103
)
class Continent(models.Model)... | from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(max_length=13)
class Continent(models.Model):
ek = Base64Field()
name = model... | <commit_before>from django.db import models
from django.test import TestCase
from django.utils.baseconv import base64
from django_base64field.fields import Base64Field
class Planet(models.Model):
ek = Base64Field()
name = models.CharField(max_length=13)
class Continent(models.Model):
ek = Base64Field()
... |
ee5af231a4faff8dd3aab7d6ae6984f95bfe892c | search/transforms.py | search/transforms.py | class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id",
"title": ... | class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id",
"title": ... | Move allowed data types out of search and fix for bills | Move allowed data types out of search and fix for bills
| Python | apache-2.0 | Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2 | class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id",
"title": ... | class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id",
"title": ... | <commit_before>class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id... | class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id",
"title": ... | class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id",
"title": ... | <commit_before>class Transforms:
convert_rules = {
"committee": {
"id": "id",
"title": "name",
"description": ["info", "about"]
},
"committee-meeting": {
"id": "id",
"title": "title",
"description": ["content", 0, "summary"],
"fulltext": ["content", 0, "body"]
},
"member": {
"id": "id... |
abd3542113baf801d76c740a2435c69fcda86b42 | src/DecodeTest.py | src/DecodeTest.py | import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
def test_decoder_... | import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
"""
"""
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
d... | Send and Connect frame tests | Send and Connect frame tests
| Python | mit | phan91/STOMP_agilis | import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
def test_decoder_... | import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
"""
"""
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
d... | <commit_before>import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
de... | import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
"""
"""
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
d... | import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
def test_decoder_... | <commit_before>import unittest
from Decode import Decoder
import Frames
class TestDecoder(unittest.TestCase):
def setUp(self):
self.decoder = Decoder()
def test_decoder_get_frame_class(self):
command = 'SEND'
self.assertEquals(self.decoder.get_frame_class(command), Frames.SEND)
de... |
3a2daedd8bb198f5ec3fd06a0061ae06e6fb139e | tests/test_arpreq.py | tests/test_arpreq.py | import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value):
return i... | import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value):
return i... | Add tests for ValueError and TypeError | Add tests for ValueError and TypeError
| Python | mit | sebschrader/python-arpreq,sebschrader/python-arpreq,sebschrader/python-arpreq,sebschrader/python-arpreq | import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value):
return i... | import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value):
return i... | <commit_before>import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value... | import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value):
return i... | import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value):
return i... | <commit_before>import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value... |
0fa33bb58d6b042e79c52a6f33454140a7150f64 | lithium/blog/views.py | lithium/blog/views.py | from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['queryset'] = Post.on... | from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['queryset'] = Post.on... | Allow users with the permission 'blog.can_read_private' to see posts from the future. | Allow users with the permission 'blog.can_read_private' to see posts from the future.
| Python | bsd-2-clause | kylef/lithium | from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['queryset'] = Post.on... | from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['queryset'] = Post.on... | <commit_before>from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['query... | from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['queryset'] = Post.on... | from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['queryset'] = Post.on... | <commit_before>from lithium.blog.models import Post
def decorator(request, view, author=None, tag=None, *args, **kwargs):
"""
A view decotator to change the queryset depending on whether
a user may read private posts.
"""
if request.user.has_perm('blog.can_read_private'):
kwargs['query... |
af88bfaece839d044ccb0781a15c8c538979051e | tests/test_object.py | tests/test_object.py | #!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1'
}
obj = mlbgame.object.Object(data)
self.assertIsInstance(obj.string... | #!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1',
'unicode': u'\xe7\x8c\xab'
}
obj = mlbgame.object.Object(data)
... | Add test for unicode characters | Add test for unicode characters
| Python | mit | panzarino/mlbgame,zachpanz88/mlbgame | #!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1'
}
obj = mlbgame.object.Object(data)
self.assertIsInstance(obj.string... | #!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1',
'unicode': u'\xe7\x8c\xab'
}
obj = mlbgame.object.Object(data)
... | <commit_before>#!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1'
}
obj = mlbgame.object.Object(data)
self.assertIsInst... | #!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1',
'unicode': u'\xe7\x8c\xab'
}
obj = mlbgame.object.Object(data)
... | #!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1'
}
obj = mlbgame.object.Object(data)
self.assertIsInstance(obj.string... | <commit_before>#!/usr/bin/env python
import unittest
import mlbgame
class TestObject(unittest.TestCase):
def test_object(self):
data = {
'string': 'string',
'int': '10',
'float': '10.1'
}
obj = mlbgame.object.Object(data)
self.assertIsInst... |
c14f9c661e485243660970d3a76014b8e6b7f1af | src-python/setup.py | src-python/setup.py | from distutils.core import setup
import py2exe
setup(console=['process.py'])
| from distutils.core import setup
import py2exe, sys
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
console = [{'script': "process.py"}],
zipfile = None,
)
| Add options to generate single executable file | Add options to generate single executable file | Python | mit | yaa110/Adobe-Air-Registry-Modifier | from distutils.core import setup
import py2exe
setup(console=['process.py'])
Add options to generate single executable file | from distutils.core import setup
import py2exe, sys
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
console = [{'script': "process.py"}],
zipfile = None,
)
| <commit_before>from distutils.core import setup
import py2exe
setup(console=['process.py'])
<commit_msg>Add options to generate single executable file<commit_after> | from distutils.core import setup
import py2exe, sys
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
console = [{'script': "process.py"}],
zipfile = None,
)
| from distutils.core import setup
import py2exe
setup(console=['process.py'])
Add options to generate single executable filefrom distutils.core import setup
import py2exe, sys
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
console = [{'script': "process.py"}],
... | <commit_before>from distutils.core import setup
import py2exe
setup(console=['process.py'])
<commit_msg>Add options to generate single executable file<commit_after>from distutils.core import setup
import py2exe, sys
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
... |
df8ae0415f9bf10c04472fb3009e91d7c3d7e24f | teuthology/sentry.py | teuthology/sentry.py | from raven import Client
client = None
def get_client(ctx):
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
| from raven import Client
client = None
def get_client(ctx):
global client
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
| Make client a global variable | Make client a global variable
| Python | mit | robbat2/teuthology,ceph/teuthology,tchaikov/teuthology,zhouyuan/teuthology,dmick/teuthology,michaelsevilla/teuthology,dreamhost/teuthology,SUSE/teuthology,t-miyamae/teuthology,caibo2014/teuthology,yghannam/teuthology,SUSE/teuthology,SUSE/teuthology,tchaikov/teuthology,michaelsevilla/teuthology,dmick/teuthology,ktdreyer... | from raven import Client
client = None
def get_client(ctx):
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
Make client a global variable | from raven import Client
client = None
def get_client(ctx):
global client
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
| <commit_before>from raven import Client
client = None
def get_client(ctx):
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
<commit_msg>Make client a global variable<commit_after> | from raven import Client
client = None
def get_client(ctx):
global client
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
| from raven import Client
client = None
def get_client(ctx):
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
Make client a global variablefrom raven import Client
client = None
def get_client(ctx):
global c... | <commit_before>from raven import Client
client = None
def get_client(ctx):
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client
<commit_msg>Make client a global variable<commit_after>from raven import Client
client ... |
2e3b38d102c7e15ed121651c1eac26acd9c7f399 | grapdashboard.py | grapdashboard.py | from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
column=1,... | from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
column=1,... | Add links to admin dashboard | Add links to admin dashboard
| Python | bsd-3-clause | uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam | from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
column=1,... | from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
column=1,... | <commit_before>from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
... | from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
column=1,... | from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
column=1,... | <commit_before>from django.utils.translation import ugettext_lazy as _
from grappelli.dashboard import modules, Dashboard
class UQAMDashboard(Dashboard):
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
self.children.append(modules.AppList(
title=_('Catalogue'),
... |
bd68b6e44ec65ba8f1f0afeea3a1dce08f579690 | src/bots/chuck.py | src/bots/chuck.py | import re
import requests
import logging
from base import BaseBot
logger = logging.getLogger(__name__)
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/random' % CHUCK_API_URL.rstrip('/')).json()
return fact['... | import re
import requests
import logging
from base import BaseBot
from HTMLParser import HTMLParser
logger = logging.getLogger(__name__)
html_parser = HTMLParser()
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/rand... | Fix for html escaped characters | Fix for html escaped characters
| Python | mit | orangeblock/slack-bot | import re
import requests
import logging
from base import BaseBot
logger = logging.getLogger(__name__)
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/random' % CHUCK_API_URL.rstrip('/')).json()
return fact['... | import re
import requests
import logging
from base import BaseBot
from HTMLParser import HTMLParser
logger = logging.getLogger(__name__)
html_parser = HTMLParser()
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/rand... | <commit_before>import re
import requests
import logging
from base import BaseBot
logger = logging.getLogger(__name__)
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/random' % CHUCK_API_URL.rstrip('/')).json()
... | import re
import requests
import logging
from base import BaseBot
from HTMLParser import HTMLParser
logger = logging.getLogger(__name__)
html_parser = HTMLParser()
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/rand... | import re
import requests
import logging
from base import BaseBot
logger = logging.getLogger(__name__)
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/random' % CHUCK_API_URL.rstrip('/')).json()
return fact['... | <commit_before>import re
import requests
import logging
from base import BaseBot
logger = logging.getLogger(__name__)
CHUCK_API_URL = 'http://api.icndb.com'
CHUCK_REGEX = re.compile(r'^!chuck')
def random_chuck_fact():
try:
fact = requests.get('%s/jokes/random' % CHUCK_API_URL.rstrip('/')).json()
... |
532d9ea686793ebef8b6412a038ab58b54ca0ca6 | lib/disco/schemes/scheme_discodb.py | lib/disco/schemes/scheme_discodb.py | import __builtin__
from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = settings['DISCO_DAT... | from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = settings['DISCO_DATA']
ddfs_dat... | Use __builtins__ directly instead of import __builtin__. | Use __builtins__ directly instead of import __builtin__.
| Python | bsd-3-clause | simudream/disco,seabirdzh/disco,ErikDubbelboer/disco,simudream/disco,oldmantaiter/disco,ktkt2009/disco,beni55/disco,mwilliams3/disco,discoproject/disco,mozilla/disco,mwilliams3/disco,pooya/disco,pooya/disco,oldmantaiter/disco,discoproject/disco,pombredanne/disco,seabirdzh/disco,discoproject/disco,ErikDubbelboer/disco,o... | import __builtin__
from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = settings['DISCO_DAT... | from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = settings['DISCO_DATA']
ddfs_dat... | <commit_before>import __builtin__
from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = sett... | from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = settings['DISCO_DATA']
ddfs_dat... | import __builtin__
from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = settings['DISCO_DAT... | <commit_before>import __builtin__
from disco import util
from discodb import DiscoDB, Q
def open(url, task=None):
if task:
disco_data = task.disco_data
ddfs_data = task.ddfs_data
else:
from disco.settings import DiscoSettings
settings = DiscoSettings()
disco_data = sett... |
cfdae6dcd3cc3f12e2c98fc3c6a51f146f185e98 | rollbar/contrib/starlette/middleware.py | rollbar/contrib/starlette/middleware.py | import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
class ReporterMiddl... | import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
class ReporterMiddl... | Update comment and optional instructions | Update comment and optional instructions
| Python | mit | rollbar/pyrollbar | import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
class ReporterMiddl... | import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
class ReporterMiddl... | <commit_before>import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
clas... | import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
class ReporterMiddl... | import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
class ReporterMiddl... | <commit_before>import sys
from starlette.requests import Request
from starlette.types import Receive, Scope, Send
import rollbar
from .requests import store_current_request
from rollbar.contrib.asgi import ReporterMiddleware as ASGIReporterMiddleware
from rollbar.lib._async import RollbarAsyncError, try_report
clas... |
60e10d1e25a68f63a232b5c3fe1c23284baef63e | rnacentral/portal/utils/go_terms.py | rnacentral/portal/utils/go_terms.py | MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA": None,
"ot... | MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA": None,
"ot... | Add a guess about tRNA | Add a guess about tRNA
| Python | apache-2.0 | RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode | MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA": None,
"ot... | MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA": None,
"ot... | <commit_before>MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA"... | MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA": None,
"ot... | MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA": None,
"ot... | <commit_before>MAPPING = {
"RNase_MRP_RNA": None,
"RNase_P_RNA": None,
"SRP_RNA": None,
"Y_RNA": None,
"antisense_RNA": None,
"autocatalytically_spliced_intron": None,
"guide_RNA": None,
"hammerhead_ribozyme": None,
"lncRNA": None,
"miRNA": None,
"misc_RNA": None,
"ncRNA"... |
10db23db0026c7e0987fb2481f1abebf5509b43c | tests/_test_selenium_marionette.py | tests/_test_selenium_marionette.py | import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from capybara.selen... | import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from capybara.selen... | Rename local Firefox options variable | Rename local Firefox options variable
| Python | mit | elliterate/capybara.py,elliterate/capybara.py,elliterate/capybara.py | import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from capybara.selen... | import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from capybara.selen... | <commit_before>import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from... | import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from capybara.selen... | import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from capybara.selen... | <commit_before>import capybara
from capybara.tests.suite import DriverSuite
@capybara.register_driver("selenium_marionette")
def init_selenium_marionette_driver(app):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.options import Options
from... |
1ceff95a8d11fea8881f26e41594bb35f2aafd5d | pipeline/middleware.py | pipeline/middleware.py | from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import MiddlewareMixin
clas... | from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import MiddlewareMixin
clas... | Fix 691 - HTML not getting decoded properly by Middleware in Django 2.2 | Fix 691 - HTML not getting decoded properly by Middleware in Django 2.2
| Python | mit | cyberdelia/django-pipeline,beedesk/django-pipeline,d9pouces/django-pipeline,jazzband/django-pipeline,cyberdelia/django-pipeline,beedesk/django-pipeline,jazzband/django-pipeline,d9pouces/django-pipeline,d9pouces/django-pipeline,jazzband/django-pipeline,beedesk/django-pipeline,cyberdelia/django-pipeline | from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import MiddlewareMixin
clas... | from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import MiddlewareMixin
clas... | <commit_before>from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import Middlew... | from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import MiddlewareMixin
clas... | from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import MiddlewareMixin
clas... | <commit_before>from __future__ import unicode_literals
from django.core.exceptions import MiddlewareNotUsed
from django.utils.encoding import DjangoUnicodeDecodeError
from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
from django.utils.deprecation import Middlew... |
bf254d3f3cff2f3f3f9de1f8a904143813b01240 | passphrase/passphrase.py | passphrase/passphrase.py | #!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
with cd(_dir + "... | #!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
with cd(_dir + "... | Handle a missing dictionary exception | Handle a missing dictionary exception
| Python | bsd-3-clause | Version2beta/passphrase | #!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
with cd(_dir + "... | #!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
with cd(_dir + "... | <commit_before>#!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
w... | #!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
with cd(_dir + "... | #!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
with cd(_dir + "... | <commit_before>#!/usr/bin/python
import argparse
from glob import glob
import random
import os.path
from contextlib import contextmanager
@contextmanager
def cd(path):
old_dir = os.getcwd()
os.chdir(path)
yield
os.chdir(old_dir)
_dir = os.path.dirname(os.path.abspath(__file__))
def available_languages():
w... |
86377a2a0618957d9707441049cad24f0de684ca | scripts/round2_submit.py | scripts/round2_submit.py | #!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
Please ensure that `visualize=False`, else there might be unexpected errors in your submission
"""
env = RunEnv(visualize=False)
client = Client()
# Create enviro... | #!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
NOTE: For testing your submission scripts, you first need to ensure that redis-server is running in the background
and you can locally run the grading service by r... | Add a little bit more documentation for round2submission script | Add a little bit more documentation for round2submission script
| Python | mit | stanfordnmbl/osim-rl,vzhuang/osim-rl | #!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
Please ensure that `visualize=False`, else there might be unexpected errors in your submission
"""
env = RunEnv(visualize=False)
client = Client()
# Create enviro... | #!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
NOTE: For testing your submission scripts, you first need to ensure that redis-server is running in the background
and you can locally run the grading service by r... | <commit_before>#!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
Please ensure that `visualize=False`, else there might be unexpected errors in your submission
"""
env = RunEnv(visualize=False)
client = Client()
... | #!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
NOTE: For testing your submission scripts, you first need to ensure that redis-server is running in the background
and you can locally run the grading service by r... | #!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
Please ensure that `visualize=False`, else there might be unexpected errors in your submission
"""
env = RunEnv(visualize=False)
client = Client()
# Create enviro... | <commit_before>#!/usr/bin/env python
import opensim as osim
from osim.redis.client import Client
from osim.env import *
import numpy as np
import argparse
import os
"""
Please ensure that `visualize=False`, else there might be unexpected errors in your submission
"""
env = RunEnv(visualize=False)
client = Client()
... |
ceb5dfe96df6dc98d580b95296924f9c0ff50c5f | mrbelvedereci/trigger/models.py | mrbelvedereci/trigger/models.py | from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Repository')
t... | from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Repository', relat... | Add Repository.triggers backref to look up Triggers | Add Repository.triggers backref to look up Triggers
| Python | bsd-3-clause | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Repository')
t... | from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Repository', relat... | <commit_before>from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Rep... | from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Repository', relat... | from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Repository')
t... | <commit_before>from __future__ import unicode_literals
from django.db import models
TRIGGER_TYPES = (
('manual', 'Manual'),
('commit', 'Commit'),
('tag', 'Tag'),
('pr', 'Pull Request'),
)
class Trigger(models.Model):
name = models.CharField(max_length=255)
repo = models.ForeignKey('github.Rep... |
25e4fa7ade76e120afdfa1b737f8d34a6ec744b5 | constants.py | constants.py | '''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY = 4096
EOF_TEXT ... | '''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY = 4096
EOF_TEXT ... | Allow "-" as a char in a filename | Allow "-" as a char in a filename
| Python | mit | transceptor-technology/trender | '''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY = 4096
EOF_TEXT ... | '''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY = 4096
EOF_TEXT ... | <commit_before>'''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY =... | '''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY = 4096
EOF_TEXT ... | '''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY = 4096
EOF_TEXT ... | <commit_before>'''Constants used by TRender.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
LINE_IF = 1
LINE_ELSE = 2
LINE_ELIF = 4
LINE_END = 8
LINE_MACRO = 16
LINE_COMMENT = 32
LINE_BLOCK = 64
LINE_FOR = 128
LINE_PASTE = 256
LINE_TEXT = 512
LINE_INCLUDE = 1024
LINE_EXTEND = 2048
LINE_EMPTY =... |
3c1747f52c7d0d150803ba938398e9fd3172efc0 | Orange/canvas/report/__init__.py | Orange/canvas/report/__init__.py | def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) else str(number... | import itertools
def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbe... | Add option to limit the number of lookups | report.clipped_list: Add option to limit the number of lookups
| Python | bsd-2-clause | cheral/orange3,marinkaz/orange3,qPCR4vir/orange3,kwikadi/orange3,marinkaz/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,qPCR4vir/orange3,qPCR4vir/orange3,kwikadi/orange3,kwikadi/orange3,cheral/orange3,cheral/orange3,marinkaz/orange3,marinkaz/orange3,kwikadi/orange3,kwikadi/orange3,marinkaz/orange3,kwikadi/or... | def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) else str(number... | import itertools
def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbe... | <commit_before>def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) ... | import itertools
def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbe... | def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) else str(number... | <commit_before>def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) ... |
bf81f681bd15ccfd009a901a652f5fde6a885d9b | Orange/canvas/report/__init__.py | Orange/canvas/report/__init__.py | def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) else str(number... | import itertools
def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbe... | Add option to limit the number of lookups | report.clipped_list: Add option to limit the number of lookups
| Python | bsd-2-clause | marinkaz/orange3,marinkaz/orange3,cheral/orange3,cheral/orange3,marinkaz/orange3,kwikadi/orange3,kwikadi/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,qPCR4vir/orange3,qPCR4vir/orange3,kwikadi/orange3,cheral/orange3,qPCR4vir/orange3,marinkaz/orange3,marinkaz/orange3,cheral/orange3,kwikadi/orange3,qPCR4vir/or... | def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) else str(number... | import itertools
def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbe... | <commit_before>def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) ... | import itertools
def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbe... | def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) else str(number... | <commit_before>def plural(s, number):
return s.format(number=number, s="s" if number % 100 != 1 else "")
def plural_w(s, number, capitalize=False):
numbers = ("zero", "one", "two", "three", "four", "five", "six", "seven",
"nine", "ten")
number_str = numbers[number] if number < len(numbers) ... |
ee7a4cbe1e6745d627e58142e4a1c1bb7b972e3a | services/dns/__init__.py | services/dns/__init__.py | import os
from fabric.api import put, task
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
# Bootstrap... | import os
from fabric.api import put, task, sudo
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
# Boo... | Install initscript link into /etc/init.d. Allows for system integration while the original file can still be modified | Install initscript link into /etc/init.d. Allows for system integration while the original file can still be modified
| Python | mit | alex/braid,alex/braid | import os
from fabric.api import put, task
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
# Bootstrap... | import os
from fabric.api import put, task, sudo
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
# Boo... | <commit_before>import os
from fabric.api import put, task
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
... | import os
from fabric.api import put, task, sudo
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
# Boo... | import os
from fabric.api import put, task
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
# Bootstrap... | <commit_before>import os
from fabric.api import put, task
from fablib import authbind, requires_root
from fablib.twisted import service
@task
@requires_root
def install():
# TODO:
# - Setup zone files (incl. PYTHONPATH in script if needed)
# - Rename dns to t-names or whatever (locations, scripts,...)
... |
f3a327d8fc5f43ad82f0696cef4a14e6dd2533ea | ognskylines/commands/gateway.py | ognskylines/commands/gateway.py | import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable logging
log_handlers = [logging.StreamHandler()]
... | import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(skylines_host='127.0.0.1', skylines_port=5597, logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable loggin... | Add arguments skylines-host and -port | manage.py: Add arguments skylines-host and -port
| Python | agpl-3.0 | kerel-fs/ogn-skylines-gateway,kerel-fs/ogn-skylines-gateway | import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable logging
log_handlers = [logging.StreamHandler()]
... | import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(skylines_host='127.0.0.1', skylines_port=5597, logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable loggin... | <commit_before>import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable logging
log_handlers = [logging.St... | import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(skylines_host='127.0.0.1', skylines_port=5597, logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable loggin... | import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable logging
log_handlers = [logging.StreamHandler()]
... | <commit_before>import logging
from ognskylines.gateway import ognSkylinesGateway
from ognskylines.dbutils import session
from manager import Manager
gateway_manager = Manager()
@gateway_manager.command
def run(logfile=''):
"""Run the ogn-->skylines gateway."""
# Enable logging
log_handlers = [logging.St... |
2288ff574db552dd5c078102f9bbed1b0c3b6490 | forms.py | forms.py | from flask.ext.wtf import Form, TextField, PasswordField, BooleanField, validators
from models import User
class LoginForm(Form):
username = TextField('username', [validators.Required()])
password = PasswordField('password', [validators.Required()])
remember = BooleanField('remember')
def __init__(se... | from flask.ext.wtf import Form
from wtforms.fields import TextField, PasswordField, BooleanField
from wtforms.validators import Required
from models import User
class LoginForm(Form):
username = TextField('username', [Required()])
password = PasswordField('password', [Required()])
remember = BooleanField(... | Update Flask-WTF imports to >0.9.0-style | Update Flask-WTF imports to >0.9.0-style
| Python | mit | mahrz/kernkrieg,mahrz/kernkrieg,mahrz/kernkrieg | from flask.ext.wtf import Form, TextField, PasswordField, BooleanField, validators
from models import User
class LoginForm(Form):
username = TextField('username', [validators.Required()])
password = PasswordField('password', [validators.Required()])
remember = BooleanField('remember')
def __init__(se... | from flask.ext.wtf import Form
from wtforms.fields import TextField, PasswordField, BooleanField
from wtforms.validators import Required
from models import User
class LoginForm(Form):
username = TextField('username', [Required()])
password = PasswordField('password', [Required()])
remember = BooleanField(... | <commit_before>from flask.ext.wtf import Form, TextField, PasswordField, BooleanField, validators
from models import User
class LoginForm(Form):
username = TextField('username', [validators.Required()])
password = PasswordField('password', [validators.Required()])
remember = BooleanField('remember')
... | from flask.ext.wtf import Form
from wtforms.fields import TextField, PasswordField, BooleanField
from wtforms.validators import Required
from models import User
class LoginForm(Form):
username = TextField('username', [Required()])
password = PasswordField('password', [Required()])
remember = BooleanField(... | from flask.ext.wtf import Form, TextField, PasswordField, BooleanField, validators
from models import User
class LoginForm(Form):
username = TextField('username', [validators.Required()])
password = PasswordField('password', [validators.Required()])
remember = BooleanField('remember')
def __init__(se... | <commit_before>from flask.ext.wtf import Form, TextField, PasswordField, BooleanField, validators
from models import User
class LoginForm(Form):
username = TextField('username', [validators.Required()])
password = PasswordField('password', [validators.Required()])
remember = BooleanField('remember')
... |
ef6bfe9a1ef25979a8e78a0c05012974c2d0d974 | opentreemap/opentreemap/util.py | opentreemap/opentreemap/util.py | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, **kwargs2)
return routed
def json_from_request(request):
"""
A... | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_request(request... | Fix route function to support positional args | Fix route function to support positional args
| Python | agpl-3.0 | maurizi/otm-core,recklessromeo/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,maurizi/otm-core,maurizi/otm-core,recklessromeo/otm-core,maurizi/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,r... | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, **kwargs2)
return routed
def json_from_request(request):
"""
A... | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_request(request... | <commit_before>from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, **kwargs2)
return routed
def json_from_request(request)... | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, *args2, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, *args2, **kwargs2)
return routed
def json_from_request(request... | from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, **kwargs2)
return routed
def json_from_request(request):
"""
A... | <commit_before>from django.views.decorators.csrf import csrf_exempt
import json
def route(**kwargs):
@csrf_exempt
def routed(request, **kwargs2):
method = request.method
req_method = kwargs[method]
return req_method(request, **kwargs2)
return routed
def json_from_request(request)... |
db295ff62ac945e03b97e405077e0fa501e4b1c4 | src/setup.py | src/setup.py | import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.2',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_requires,
url='htt... | import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.3',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_requires,
url='htt... | Update Version to 0.0.3 caused by pypi's limit | Update: Update Version to 0.0.3 caused by pypi's limit
| Python | mit | winkidney/cmdtree,winkidney/cmdtree | import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.2',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_requires,
url='htt... | import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.3',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_requires,
url='htt... | <commit_before>import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.2',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_require... | import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.3',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_requires,
url='htt... | import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.2',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_requires,
url='htt... | <commit_before>import os
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.dirname(__file__))
install_requires = (
"argparse",
"six>=1.10.0",
)
setup(
name='cmdtree',
version='0.0.2',
packages=find_packages(HERE, include=['cmdtree']),
install_requires=install_require... |
890647cc0cd952ed1a52bdd96f7e9dd8c28810c9 | socketlabs/socketlabs.py | socketlabs/socketlabs.py | import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username=None, password=None, serverid=None):
self._username = username
self._password = password
self._serverid = serverid
def failedMessages(sel... | import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username, password, serverid):
if username is None:
raise RuntimeError("username not defined")
if password is None:
raise RuntimeError(... | Add checks for username/password/serverid being defined | Add checks for username/password/serverid being defined
| Python | mit | MattHealy/socketlabs-python | import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username=None, password=None, serverid=None):
self._username = username
self._password = password
self._serverid = serverid
def failedMessages(sel... | import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username, password, serverid):
if username is None:
raise RuntimeError("username not defined")
if password is None:
raise RuntimeError(... | <commit_before>import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username=None, password=None, serverid=None):
self._username = username
self._password = password
self._serverid = serverid
def fai... | import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username, password, serverid):
if username is None:
raise RuntimeError("username not defined")
if password is None:
raise RuntimeError(... | import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username=None, password=None, serverid=None):
self._username = username
self._password = password
self._serverid = serverid
def failedMessages(sel... | <commit_before>import requests
from . constants import BASE_URL
from . exceptions import SocketLabsUnauthorized
class SocketLabs():
def __init__(self, username=None, password=None, serverid=None):
self._username = username
self._password = password
self._serverid = serverid
def fai... |
ea83b615ef6fcaf71eb5e5d656585056757ac64f | {{cookiecutter.app_name}}/views.py | {{cookiecutter.app_name}}/views.py | from django.core.urlresolvers import reverse_lazy
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cookiecutter.model_n... | from django.core.urlresolvers import reverse
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cookiecutter.model_name }... | Use get_success_url to work around reverse_lazy issue on Python3. | Use get_success_url to work around reverse_lazy issue on Python3.
| Python | bsd-3-clause | janusnic/cookiecutter-django-crud,wildfish/cookiecutter-django-crud,cericoda/cookiecutter-django-crud,janusnic/cookiecutter-django-crud,wildfish/cookiecutter-django-crud,cericoda/cookiecutter-django-crud | from django.core.urlresolvers import reverse_lazy
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cookiecutter.model_n... | from django.core.urlresolvers import reverse
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cookiecutter.model_name }... | <commit_before>from django.core.urlresolvers import reverse_lazy
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cooki... | from django.core.urlresolvers import reverse
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cookiecutter.model_name }... | from django.core.urlresolvers import reverse_lazy
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cookiecutter.model_n... | <commit_before>from django.core.urlresolvers import reverse_lazy
from vanilla import ListView, CreateView, DetailView, UpdateView, DeleteView
from .forms import {{ cookiecutter.model_name }}Form
from .models import {{ cookiecutter.model_name }}
class {{ cookiecutter.model_name }}CRUDView(object):
model = {{ cooki... |
216f0bb3680b86ac2dfc8c506b791db4e34eeee6 | nextactions/board.py | nextactions/board.py | from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.com/1/boards/' + ... | from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.com/1/boards/' + ... | Tidy matching lists by name | Tidy matching lists by name
| Python | mit | stevecshanks/trello-next-actions | from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.com/1/boards/' + ... | from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.com/1/boards/' + ... | <commit_before>from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.co... | from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.com/1/boards/' + ... | from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.com/1/boards/' + ... | <commit_before>from nextactions.list import List
class Board:
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.nextActionList = []
def getLists(self):
json = self._trello.get(
'https://api.trello.co... |
b7f153a383dad71f272d8ef211deeb1c1a149f51 | kerze.py | kerze.py | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
fillcolor(FARBE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESSE*30)
left(90)
forward... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | Resolve NameError, add changeable turtle shape constant. | Resolve NameError, add changeable turtle shape constant.
| Python | mit | luforst/adventskranz | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
fillcolor(FARBE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESSE*30)
left(90)
forward... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | <commit_before>from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
fillcolor(FARBE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESSE*30)
left(... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
fillcolor(FARBE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESSE*30)
left(90)
forward... | <commit_before>from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
fillcolor(FARBE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESSE*30)
left(... |
f6fed4cd1fe4f8363d9060c7a80aa2b077f0e57a | smst/__init__.py | smst/__init__.py | # _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.2.0'
| # _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.3.0'
| Update the version to 0.3.0. | Update the version to 0.3.0.
| Python | agpl-3.0 | bzamecnik/sms-tools,bzamecnik/sms-tools,bzamecnik/sms-tools | # _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.2.0'
Update the version to... | # _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.3.0'
| <commit_before># _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.2.0'
<commi... | # _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.3.0'
| # _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.2.0'
Update the version to... | <commit_before># _ _
# ___ _ __ ___ ___ | |_ ___ ___ | |___
# / __| '_ ` _ \/ __| | __/ _ \ / _ \| / __|
# \__ \ | | | | \__ \ | || (_) | (_) | \__ \
# |___/_| |_| |_|___/ \__\___/ \___/|_|___/
#
# ~ Spectral Modeling Synthesis Tools ~
#
__version__ = '0.2.0'
<commi... |
99a41171c6030cfd88b66979d2f62bb18b51041a | sqlobject/tests/test_exceptions.py | sqlobject/tests/test_exceptions.py | from sqlobject import *
from sqlobject.dberrors import DuplicateEntryError
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)
def test_exce... | from sqlobject import *
from sqlobject.dberrors import *
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)
class TestExceptionWithNonexist... | Add a test for pgcode | Add a test for pgcode
git-svn-id: ace7fa9e7412674399eb986d17112e1377537c44@4665 95a46c32-92d2-0310-94a5-8d71aeb3d4b3
| Python | lgpl-2.1 | sqlobject/sqlobject,drnlm/sqlobject,drnlm/sqlobject,sqlobject/sqlobject | from sqlobject import *
from sqlobject.dberrors import DuplicateEntryError
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)
def test_exce... | from sqlobject import *
from sqlobject.dberrors import *
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)
class TestExceptionWithNonexist... | <commit_before>from sqlobject import *
from sqlobject.dberrors import DuplicateEntryError
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)... | from sqlobject import *
from sqlobject.dberrors import *
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)
class TestExceptionWithNonexist... | from sqlobject import *
from sqlobject.dberrors import DuplicateEntryError
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)
def test_exce... | <commit_before>from sqlobject import *
from sqlobject.dberrors import DuplicateEntryError
from sqlobject.tests.dbtest import *
########################################
## Table aliases and self-joins
########################################
class TestException(SQLObject):
name = StringCol(unique=True, length=100)... |
6a3fbb7280c1078b574736eae3c6a3e4e42d3f46 | seaborn/__init__.py | seaborn/__init__.py | # Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .timeseri... | # Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .matrix i... | Remove top-level import of timeseries module | Remove top-level import of timeseries module
| Python | bsd-3-clause | arokem/seaborn,mwaskom/seaborn,mwaskom/seaborn,arokem/seaborn,anntzer/seaborn,anntzer/seaborn | # Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .timeseri... | # Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .matrix i... | <commit_before># Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *... | # Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .matrix i... | # Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .timeseri... | <commit_before># Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *... |
95f48c85aee59906fc498c8c44c34551fca32a43 | tests/blueprints/metrics/test_metrics.py | tests/blueprints/metrics/test_metrics.py | """
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
def test_metrics(make_admin_app):
client = _get_test_client(make_admin_app, True)
response = client.get('/metrics')
assert response.status_code == 200
assert response.content_type == 'text/plain; versi... | """
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import pytest
from ...conftest import database_recreated
# To be overridden by test parametrization
@pytest.fixture
def config_overrides():
return {}
@pytest.fixture
def client(config_overrides, make_admin_app,... | Adjust metrics test to set up/tear down database | Adjust metrics test to set up/tear down database
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | """
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
def test_metrics(make_admin_app):
client = _get_test_client(make_admin_app, True)
response = client.get('/metrics')
assert response.status_code == 200
assert response.content_type == 'text/plain; versi... | """
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import pytest
from ...conftest import database_recreated
# To be overridden by test parametrization
@pytest.fixture
def config_overrides():
return {}
@pytest.fixture
def client(config_overrides, make_admin_app,... | <commit_before>"""
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
def test_metrics(make_admin_app):
client = _get_test_client(make_admin_app, True)
response = client.get('/metrics')
assert response.status_code == 200
assert response.content_type == 'te... | """
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import pytest
from ...conftest import database_recreated
# To be overridden by test parametrization
@pytest.fixture
def config_overrides():
return {}
@pytest.fixture
def client(config_overrides, make_admin_app,... | """
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
def test_metrics(make_admin_app):
client = _get_test_client(make_admin_app, True)
response = client.get('/metrics')
assert response.status_code == 200
assert response.content_type == 'text/plain; versi... | <commit_before>"""
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
def test_metrics(make_admin_app):
client = _get_test_client(make_admin_app, True)
response = client.get('/metrics')
assert response.status_code == 200
assert response.content_type == 'te... |
60704cb85f4e512e0acd9b144d6599c3b3763820 | testing/test_detail_page.py | testing/test_detail_page.py | import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic_id=input)
... | import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic_id=input)
... | Update format placeholder to be 2.6 compatible | Update format placeholder to be 2.6 compatible
| Python | mit | mindriot101/k2catalogue | import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic_id=input)
... | import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic_id=input)
... | <commit_before>import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic... | import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic_id=input)
... | import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic_id=input)
... | <commit_before>import pytest
try:
from unittest import mock
except ImportError:
import mock
from k2catalogue import detail_object
@pytest.mark.parametrize('input,expected', [
(1, '1.html'),
(2, '2.html'),
(201, '201.html'),
])
def test_detail_url(input, expected):
epic_object = mock.Mock(epic... |
6c9f4aa7d179632acee5bc2d0828198a3a58b295 | app.py | app.py | from flask import Flask, render_template, request, jsonify
from werkzeug.utils import secure_filename
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upload.html')
... | from flask import Flask, render_template, request, jsonify
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upload.html')
elif request.method == 'POST':
fi... | Use random file names inplace of the original file names | Use random file names inplace of the original file names
| Python | mit | citruspi/Alexandria,citruspi/Alexandria | from flask import Flask, render_template, request, jsonify
from werkzeug.utils import secure_filename
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upload.html')
... | from flask import Flask, render_template, request, jsonify
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upload.html')
elif request.method == 'POST':
fi... | <commit_before>from flask import Flask, render_template, request, jsonify
from werkzeug.utils import secure_filename
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upl... | from flask import Flask, render_template, request, jsonify
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upload.html')
elif request.method == 'POST':
fi... | from flask import Flask, render_template, request, jsonify
from werkzeug.utils import secure_filename
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upload.html')
... | <commit_before>from flask import Flask, render_template, request, jsonify
from werkzeug.utils import secure_filename
import os
app = Flask(__name__)
app.config.from_object('config.Debug')
@app.route('/upload', methods=['GET', 'POST'])
def upload():
if request.method == 'GET':
return render_template('upl... |
b9f54aa03896f3e9135be6b64ccf696656125a49 | st2common/st2common/runners/__init__.py | st2common/st2common/runners/__init__.py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | Add BACKENDS_NAMESPACE constant so it's consistent with auth backends. | Add BACKENDS_NAMESPACE constant so it's consistent with auth backends.
| Python | apache-2.0 | StackStorm/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2 | Add BACKENDS_NAMESPACE constant so it's consistent with auth backends. | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | <commit_before><commit_msg>Add BACKENDS_NAMESPACE constant so it's consistent with auth backends.<commit_after> | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | Add BACKENDS_NAMESPACE constant so it's consistent with auth backends.# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under... | <commit_before><commit_msg>Add BACKENDS_NAMESPACE constant so it's consistent with auth backends.<commit_after># Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
... | |
3aba89dce81a47bbd2fbe99f46636108e243641b | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -------------------... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -------------------... | Update documentation links to Django 1.9 | Update documentation links to Django 1.9
| Python | mit | bittner/django-analytical,jcassee/django-analytical,pjdelport/django-analytical | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -------------------... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -------------------... | <commit_before># -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration ----... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -------------------... | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration -------------------... | <commit_before># -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# directory.
import os
import sys
sys.path.append(os.path.join(os.path.abspath('.'), '_ext'))
sys.path.append(os.path.dirname(os.path.abspath('.')))
import analytical
# -- General configuration ----... |
f7b48c9193511f693cc2ec17d46253077d06dcc3 | LR/lr/lib/__init__.py | LR/lr/lib/__init__.py | from model_parser import ModelParser, getFileString
__all__=['ModelParser', 'getFileString']
| # !/usr/bin/python
# Copyright 2011 Lockheed Martin
'''
Base couchdb threshold change handler class.
Created on August 18, 2011
@author: jpoyau
'''
from model_parser import ModelParser, getFileString
from couch_change_monitor import *
__all__=["ModelParser",
"getFileString",
"MonitorCh... | Add the new change feed module to __all__ | Add the new change feed module to __all__
| Python | apache-2.0 | jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,Learni... | from model_parser import ModelParser, getFileString
__all__=['ModelParser', 'getFileString']
Add the new change feed module to __all__ | # !/usr/bin/python
# Copyright 2011 Lockheed Martin
'''
Base couchdb threshold change handler class.
Created on August 18, 2011
@author: jpoyau
'''
from model_parser import ModelParser, getFileString
from couch_change_monitor import *
__all__=["ModelParser",
"getFileString",
"MonitorCh... | <commit_before>from model_parser import ModelParser, getFileString
__all__=['ModelParser', 'getFileString']
<commit_msg>Add the new change feed module to __all__<commit_after> | # !/usr/bin/python
# Copyright 2011 Lockheed Martin
'''
Base couchdb threshold change handler class.
Created on August 18, 2011
@author: jpoyau
'''
from model_parser import ModelParser, getFileString
from couch_change_monitor import *
__all__=["ModelParser",
"getFileString",
"MonitorCh... | from model_parser import ModelParser, getFileString
__all__=['ModelParser', 'getFileString']
Add the new change feed module to __all__# !/usr/bin/python
# Copyright 2011 Lockheed Martin
'''
Base couchdb threshold change handler class.
Created on August 18, 2011
@author: jpoyau
'''
from model_parser import ModelPar... | <commit_before>from model_parser import ModelParser, getFileString
__all__=['ModelParser', 'getFileString']
<commit_msg>Add the new change feed module to __all__<commit_after># !/usr/bin/python
# Copyright 2011 Lockheed Martin
'''
Base couchdb threshold change handler class.
Created on August 18, 2011
@author: jpoy... |
e6e3cd2b8e6ad64bce9fe6614c3d532fcbfa3359 | OpenSearchInNewTab.py | OpenSearchInNewTab.py | import sublime_plugin
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name('Find Results ') | import sublime_plugin
default_name = 'Find Results'
alt_name = 'Find Results '
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name(alt_name)
# the... | Add text commands hook for other plugins | Add text commands hook for other plugins | Python | mit | everyonesdesign/OpenSearchInNewTab | import sublime_plugin
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name('Find Results ')Add text commands hook for other plugins | import sublime_plugin
default_name = 'Find Results'
alt_name = 'Find Results '
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name(alt_name)
# the... | <commit_before>import sublime_plugin
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name('Find Results ')<commit_msg>Add text commands hook for other ... | import sublime_plugin
default_name = 'Find Results'
alt_name = 'Find Results '
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name(alt_name)
# the... | import sublime_plugin
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name('Find Results ')Add text commands hook for other pluginsimport sublime_plugi... | <commit_before>import sublime_plugin
class OpenSearchInNewTab(sublime_plugin.EventListener):
def on_deactivated(self, view):
if view.name() == 'Find Results':
# set a name with space
# so it won't be bothered
# during new search
view.set_name('Find Results ')<commit_msg>Add text commands hook for other ... |
bf97326c668580eef49fc4323a249a1c3cd1b126 | src/formatter.py | src/formatter.py | from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = Settings(name.l... | from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = Settings(name.l... | Apply options defined in user settings to the formatting command | Apply options defined in user settings to the formatting command
| Python | mit | Rypac/sublime-format | from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = Settings(name.l... | from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = Settings(name.l... | <commit_before>from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = ... | from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = Settings(name.l... | from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = Settings(name.l... | <commit_before>from .command import Command
from .settings import Settings
class Formatter(object):
def __init__(self, name=None, source=None, binary=None):
self.__name = name
self.__source = 'source.' + (source if source else name.lower())
self.__binary = binary
self.__settings = ... |
b5cc400ccc89fb790ef2e505b1b3bd934087cc48 | src/dbbrankingparser/httpclient.py | src/dbbrankingparser/httpclient.py | """
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Firefox/38.0 Icewea... | """
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Firefox/38.0 Icewea... | Revert "Use HTTPS to retrieve ranking from DBB" | Revert "Use HTTPS to retrieve ranking from DBB"
Not using HTTPS avoids certificate errors.
This ranking data is not sensitive, so it should be fine to continue as
before the original change.
| Python | mit | homeworkprod/dbb-ranking-parser | """
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Firefox/38.0 Icewea... | """
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Firefox/38.0 Icewea... | <commit_before>"""
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Fire... | """
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Firefox/38.0 Icewea... | """
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Firefox/38.0 Icewea... | <commit_before>"""
dbbrankingparser.httpclient
~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTTP client utilities
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from urllib.request import Request, urlopen
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) '
'Gecko/20100101 Fire... |
2fad10bde71a56ee3a5046a4ffc0db2d3becb319 | src/shared/ident.py | src/shared/ident.py | class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, rhs):
return self.playerId == rhs.playerId and self.subId == other.subId
def __ne__(self, rhs):
return not (self == rhs)
def __hash__(self):
... | class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, other):
return self.playerId == other.playerId and self.subId == other.subId
def __ne__(self, other):
return not (self == other)
def __hash__(self... | Fix a couple trivial bugs. | Fix a couple trivial bugs.
| Python | mit | CheeseLord/warts,CheeseLord/warts | class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, rhs):
return self.playerId == rhs.playerId and self.subId == other.subId
def __ne__(self, rhs):
return not (self == rhs)
def __hash__(self):
... | class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, other):
return self.playerId == other.playerId and self.subId == other.subId
def __ne__(self, other):
return not (self == other)
def __hash__(self... | <commit_before>class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, rhs):
return self.playerId == rhs.playerId and self.subId == other.subId
def __ne__(self, rhs):
return not (self == rhs)
def __hash... | class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, other):
return self.playerId == other.playerId and self.subId == other.subId
def __ne__(self, other):
return not (self == other)
def __hash__(self... | class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, rhs):
return self.playerId == rhs.playerId and self.subId == other.subId
def __ne__(self, rhs):
return not (self == rhs)
def __hash__(self):
... | <commit_before>class UnitId:
def __init__(self, playerId, unitSubId):
self.playerId = playerId
self.subId = unitSubId
def __eq__(self, rhs):
return self.playerId == rhs.playerId and self.subId == other.subId
def __ne__(self, rhs):
return not (self == rhs)
def __hash... |
a4f1e0d23ee9e7a3395b6e04d5124ee2ca1e28da | trac/versioncontrol/web_ui/__init__.py | trac/versioncontrol/web_ui/__init__.py | from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
| from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
| Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file) | Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file)
git-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@2214 af82e41b-90c4-0310-8c96-b1721e28e2e2
| Python | bsd-3-clause | rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac | from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file... | from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
| <commit_before>from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
<commit_msg>Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.... | from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
| from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file... | <commit_before>from trac.versioncontrol.web_ui.browser import *
from trac.versioncontrol.web_ui.changeset import *
from trac.versioncontrol.web_ui.log import *
<commit_msg>Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.... |
6f6a84a002980b4d6c0c497fba2416c9e0f319fb | admin_tools/checks.py | admin_tools/checks.py | from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.TemplateLoader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/latest/configuratio... | from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.Loader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/latest/configuration.html',... | Fix class name in template loader check | Fix class name in template loader check | Python | mit | django-admin-tools/django-admin-tools,django-admin-tools/django-admin-tools,django-admin-tools/django-admin-tools | from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.TemplateLoader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/latest/configuratio... | from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.Loader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/latest/configuration.html',... | <commit_before>from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.TemplateLoader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/late... | from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.Loader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/latest/configuration.html',... | from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.TemplateLoader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/latest/configuratio... | <commit_before>from django.core.checks import register, Warning
from django.template.loader import get_template, TemplateDoesNotExist
W001 = Warning(
'You must add "admin_tools.template_loaders.TemplateLoader" in your '
'template loaders variable, see: '
'https://django-admin-tools.readthedocs.org/en/late... |
ee01e4574ec1a365e87c879a01216249f75c0da8 | src/commoner/registration/admin.py | src/commoner/registration/admin.py | from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
pass
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
| from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
list_filter = ('complete',)
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
| Allow filtering of registrations by complete status. | Allow filtering of registrations by complete status.
| Python | agpl-3.0 | cc-archive/commoner,cc-archive/commoner | from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
pass
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
Allow filtering of registrations by complete status. | from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
list_filter = ('complete',)
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
| <commit_before>from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
pass
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
<commit_msg>Allow filtering of registrations by complete status.<commit_after> | from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
list_filter = ('complete',)
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
| from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
pass
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
Allow filtering of registrations by complete status.from django.contrib import admin
from commone... | <commit_before>from django.contrib import admin
from commoner.registration.models import PartialRegistration
class PartialRegistrationAdmin(admin.ModelAdmin):
pass
admin.site.register(PartialRegistration, PartialRegistrationAdmin)
<commit_msg>Allow filtering of registrations by complete status.<commit_after>from... |
bc4543a7663516d689d00feb5a392ff4004117ad | src/python/setup.py | src/python/setup.py | from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.4.0",
description="OpenHistogram log-linear histogram library",
... | from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.3.2",
description="OpenHistogram log-linear histogram library",
... | Revert "Bump Python binding to 0.4.0" | Revert "Bump Python binding to 0.4.0"
This reverts commit d46e582186ee0fdc30f52319b2bb2cfca1a7d59b.
| Python | bsd-3-clause | circonus-labs/libcircllhist,circonus-labs/libcircllhist,circonus-labs/libcircllhist | from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.4.0",
description="OpenHistogram log-linear histogram library",
... | from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.3.2",
description="OpenHistogram log-linear histogram library",
... | <commit_before>from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.4.0",
description="OpenHistogram log-linear histogram... | from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.3.2",
description="OpenHistogram log-linear histogram library",
... | from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.4.0",
description="OpenHistogram log-linear histogram library",
... | <commit_before>from setuptools import setup, find_packages
with open('README.md') as file:
long_description = file.read()
setup(
name="circllhist",
long_description=long_description,
long_description_content_type='text/markdown',
version="0.4.0",
description="OpenHistogram log-linear histogram... |
2cf7f70e352f8427cfb7d1dba309ee7d7e0ce5f4 | markitup/urls.py | markitup/urls.py | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from markitup.views import apply_filter
urlpatterns = patterns(
'',
url(r'preview/$', apply_filter, name='markitup_preview')
)
| from __future__ import unicode_literals
from django.conf.urls import url
from markitup.views import apply_filter
urlpatterns = [
url(r'preview/$', apply_filter, name='markitup_preview'),
]
| Use plain Python list for urlpatterns. | Use plain Python list for urlpatterns.
| Python | bsd-3-clause | zsiciarz/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,carljm/django-markitup,carljm/django-markitup,zsiciarz/django-markitup | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from markitup.views import apply_filter
urlpatterns = patterns(
'',
url(r'preview/$', apply_filter, name='markitup_preview')
)
Use plain Python list for urlpatterns. | from __future__ import unicode_literals
from django.conf.urls import url
from markitup.views import apply_filter
urlpatterns = [
url(r'preview/$', apply_filter, name='markitup_preview'),
]
| <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, url
from markitup.views import apply_filter
urlpatterns = patterns(
'',
url(r'preview/$', apply_filter, name='markitup_preview')
)
<commit_msg>Use plain Python list for urlpatterns.<commit_after> | from __future__ import unicode_literals
from django.conf.urls import url
from markitup.views import apply_filter
urlpatterns = [
url(r'preview/$', apply_filter, name='markitup_preview'),
]
| from __future__ import unicode_literals
from django.conf.urls import patterns, url
from markitup.views import apply_filter
urlpatterns = patterns(
'',
url(r'preview/$', apply_filter, name='markitup_preview')
)
Use plain Python list for urlpatterns.from __future__ import unicode_literals
from django.conf... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, url
from markitup.views import apply_filter
urlpatterns = patterns(
'',
url(r'preview/$', apply_filter, name='markitup_preview')
)
<commit_msg>Use plain Python list for urlpatterns.<commit_after>from __future__ ... |
bdc0466c63347280fbd8bc8c30fb07f294200194 | client/third_party/idna/__init__.py | client/third_party/idna/__init__.py | # Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
def encode(host, uts46):
return unicode(host)
| # Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
# See https://pypi.org/project/idna/
from encodings import idna
def encode(host, uts46=False): # pylint: disable=unused-argument
# Used by urllib3
return idna.ToASCII(host)
def decode(host):
# Us... | Change idna stub to use python's default | [client] Change idna stub to use python's default
Fix a regression from 690b8ae29be2ca3b4782fa6ad0e7f2454443c38d which broke
select bots running inside docker.
The new stub is still simpler than https://pypi.org/project/idna/ and lighter
weight but much better than ignoring the "xn-" encoding as this was done
previou... | Python | apache-2.0 | luci/luci-py,luci/luci-py,luci/luci-py,luci/luci-py | # Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
def encode(host, uts46):
return unicode(host)
[client] Change idna stub to use python's default
Fix a regression from 690b8ae29be2ca3b4782fa6ad0e7f2454443c38d which broke
select bots running inside docker... | # Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
# See https://pypi.org/project/idna/
from encodings import idna
def encode(host, uts46=False): # pylint: disable=unused-argument
# Used by urllib3
return idna.ToASCII(host)
def decode(host):
# Us... | <commit_before># Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
def encode(host, uts46):
return unicode(host)
<commit_msg>[client] Change idna stub to use python's default
Fix a regression from 690b8ae29be2ca3b4782fa6ad0e7f2454443c38d which broke
select... | # Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
# See https://pypi.org/project/idna/
from encodings import idna
def encode(host, uts46=False): # pylint: disable=unused-argument
# Used by urllib3
return idna.ToASCII(host)
def decode(host):
# Us... | # Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
def encode(host, uts46):
return unicode(host)
[client] Change idna stub to use python's default
Fix a regression from 690b8ae29be2ca3b4782fa6ad0e7f2454443c38d which broke
select bots running inside docker... | <commit_before># Emulate the bare minimum for idna for the Swarming bot.
# In practice, we do not need it, and it's very large.
def encode(host, uts46):
return unicode(host)
<commit_msg>[client] Change idna stub to use python's default
Fix a regression from 690b8ae29be2ca3b4782fa6ad0e7f2454443c38d which broke
select... |
e64f1add0c36f33c15c93118b653de8752c576d5 | webserver/codemanagement/validators.py | webserver/codemanagement/validators.py | from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[A-Za-z][\w\-\.]+... | from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[\w\-\.]+$')
de... | Check submission names more leniently | Check submission names more leniently
Fixes #55
| Python | bsd-3-clause | siggame/webserver,siggame/webserver,siggame/webserver | from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[A-Za-z][\w\-\.]+... | from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[\w\-\.]+$')
de... | <commit_before>from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[A... | from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[\w\-\.]+$')
de... | from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[A-Za-z][\w\-\.]+... | <commit_before>from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError
from dulwich.repo import check_ref_format
import re
sha1_validator = RegexValidator(regex="^[a-f0-9]{40}$",
message="Must be valid sha1 sum")
tag_regex = re.compile(r'^[A... |
9e2eef4f246c446fbcf05ce29ae309b9a554d46b | app/views/schemas.py | app/views/schemas.py | from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@dataclass
class Meme... | from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@dataclass
class Meme... | Support layout on template endpoints | Support layout on template endpoints
| Python | mit | jacebrowning/memegen,jacebrowning/memegen | from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@dataclass
class Meme... | from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@dataclass
class Meme... | <commit_before>from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@datac... | from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@dataclass
class Meme... | from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@dataclass
class Meme... | <commit_before>from dataclasses import dataclass
from datetime import datetime
@dataclass
class AuthResponse:
email: str
image_access: bool
search_access: bool
created: datetime
modified: datetime
@dataclass
class FontResponse:
filename: str
id: str
alias: str
_self: str
@datac... |
8a8d36d1f39cf893328b008cb11ef8e4a3fe71b5 | txlege84/topics/management/commands/bootstraptopics.py | txlege84/topics/management/commands/bootstraptopics.py | from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading hot list topics..... | from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading hot list topics..... | Rename Criminal Justice to Law & Order, per Emily's request | Rename Criminal Justice to Law & Order, per Emily's request
| Python | mit | texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84 | from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading hot list topics..... | from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading hot list topics..... | <commit_before>from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading ho... | from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading hot list topics..... | from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading hot list topics..... | <commit_before>from django.core.management.base import BaseCommand
from topics.models import Topic
class Command(BaseCommand):
help = u'Bootstrap the topic lists in the database.'
def handle(self, *args, **kwargs):
self.load_topics()
def load_topics(self):
self.stdout.write(u'Loading ho... |
14adf187c6b76c77259f140dad4fb1d502ec6779 | compass-api/G4SE/api/serializers.py | compass-api/G4SE/api/serializers.py | from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
class Meta:
model = AllRecords
class RecordSerializer(serializers.ModelSerializer):
cl... | from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
login_name = serializers.HiddenField(default=None)
class Meta:
model = AllRecords
class... | Exclude user name from api | Exclude user name from api
| Python | mit | geometalab/G4SE-Compass,geometalab/G4SE-Compass,geometalab/G4SE-Compass,geometalab/G4SE-Compass | from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
class Meta:
model = AllRecords
class RecordSerializer(serializers.ModelSerializer):
cl... | from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
login_name = serializers.HiddenField(default=None)
class Meta:
model = AllRecords
class... | <commit_before>from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
class Meta:
model = AllRecords
class RecordSerializer(serializers.ModelSeria... | from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
login_name = serializers.HiddenField(default=None)
class Meta:
model = AllRecords
class... | from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
class Meta:
model = AllRecords
class RecordSerializer(serializers.ModelSerializer):
cl... | <commit_before>from .models import Record, HarvestedRecord, AllRecords
from django.contrib.auth.models import User
from rest_framework import serializers
import datetime
class AllRecordsSerializer(serializers.ModelSerializer):
class Meta:
model = AllRecords
class RecordSerializer(serializers.ModelSeria... |
962b674053ecf52730315550675c29fa8ba8ec12 | openprovider/data/exception_map.py | openprovider/data/exception_map.py | # coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
}
def from_code(code):
"""
Return the specific exception class for the given code, or OpenproviderError
if no specific exception class is avai... | # coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
4005: ServiceUnavailable, # Temprorarily unavailable due to maintenance
}
def from_code(code):
"""
Return the specific except... | Add maintenance response to exception map | Add maintenance response to exception map
| Python | mit | AntagonistHQ/openprovider.py | # coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
}
def from_code(code):
"""
Return the specific exception class for the given code, or OpenproviderError
if no specific exception class is avai... | # coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
4005: ServiceUnavailable, # Temprorarily unavailable due to maintenance
}
def from_code(code):
"""
Return the specific except... | <commit_before># coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
}
def from_code(code):
"""
Return the specific exception class for the given code, or OpenproviderError
if no specific exceptio... | # coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
4005: ServiceUnavailable, # Temprorarily unavailable due to maintenance
}
def from_code(code):
"""
Return the specific except... | # coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
}
def from_code(code):
"""
Return the specific exception class for the given code, or OpenproviderError
if no specific exception class is avai... | <commit_before># coding=utf-8
from openprovider.exceptions import *
MAPPING = {
307: BadRequest, # Invalid domain extension
501: BadRequest, # Domain name too short
}
def from_code(code):
"""
Return the specific exception class for the given code, or OpenproviderError
if no specific exceptio... |
8fe04b096348ab81d31f59030a22b943e548dc1f | mfnd/todotask.py | mfnd/todotask.py | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.description = de... | #!/usr/bin/env python3
"""
Module handles tasks in the to-do list
"""
class TodoTask:
"""
Class represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.descri... | Remove unneccessary variables from class 'TodoTask' | refactor: Remove unneccessary variables from class 'TodoTask'
| Python | mit | mes32/mfnd | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.description = de... | #!/usr/bin/env python3
"""
Module handles tasks in the to-do list
"""
class TodoTask:
"""
Class represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.descri... | <commit_before>#!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.d... | #!/usr/bin/env python3
"""
Module handles tasks in the to-do list
"""
class TodoTask:
"""
Class represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.descri... | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.description = de... | <commit_before>#!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description, position = None, completionStatus = 'todo'):
"""
Initialize a to-do list task item
"""
self.d... |
3cd25ea433518ec9b25a5e646e63413ebd0ffcd4 | parse.py | parse.py | import sys
indentation = 0
repl = [
('%', '_ARSCL', '['),
('$', '_ARSCR', ']'),
('#', '_EQOP', '='),
('<', '_PARL', '('),
('>', '_PARR', ')'),
]
sin = sys.argv[1]
for r in repl:
sin = sin.replace(r[0], r[1])
for r in repl:
sin = sin.replace(r[1], r[2])
sin = sin.replace('\\n', '\n')
fo... | import sys
import simplejson as json
indentation = 0
lang_def = None
with open('language.json') as lang_def_file:
lang_def = json.loads(lang_def_file.read())
if lang_def is None:
print("error reading json language definition")
exit(1)
repl = lang_def['rules']
sin = sys.argv[1]
for r in repl:
sin =... | Read json language rep and try to eval/exec stdin | Read json language rep and try to eval/exec stdin
| Python | unlicense | philipdexter/build-a-lang | import sys
indentation = 0
repl = [
('%', '_ARSCL', '['),
('$', '_ARSCR', ']'),
('#', '_EQOP', '='),
('<', '_PARL', '('),
('>', '_PARR', ')'),
]
sin = sys.argv[1]
for r in repl:
sin = sin.replace(r[0], r[1])
for r in repl:
sin = sin.replace(r[1], r[2])
sin = sin.replace('\\n', '\n')
fo... | import sys
import simplejson as json
indentation = 0
lang_def = None
with open('language.json') as lang_def_file:
lang_def = json.loads(lang_def_file.read())
if lang_def is None:
print("error reading json language definition")
exit(1)
repl = lang_def['rules']
sin = sys.argv[1]
for r in repl:
sin =... | <commit_before>import sys
indentation = 0
repl = [
('%', '_ARSCL', '['),
('$', '_ARSCR', ']'),
('#', '_EQOP', '='),
('<', '_PARL', '('),
('>', '_PARR', ')'),
]
sin = sys.argv[1]
for r in repl:
sin = sin.replace(r[0], r[1])
for r in repl:
sin = sin.replace(r[1], r[2])
sin = sin.replace('... | import sys
import simplejson as json
indentation = 0
lang_def = None
with open('language.json') as lang_def_file:
lang_def = json.loads(lang_def_file.read())
if lang_def is None:
print("error reading json language definition")
exit(1)
repl = lang_def['rules']
sin = sys.argv[1]
for r in repl:
sin =... | import sys
indentation = 0
repl = [
('%', '_ARSCL', '['),
('$', '_ARSCR', ']'),
('#', '_EQOP', '='),
('<', '_PARL', '('),
('>', '_PARR', ')'),
]
sin = sys.argv[1]
for r in repl:
sin = sin.replace(r[0], r[1])
for r in repl:
sin = sin.replace(r[1], r[2])
sin = sin.replace('\\n', '\n')
fo... | <commit_before>import sys
indentation = 0
repl = [
('%', '_ARSCL', '['),
('$', '_ARSCR', ']'),
('#', '_EQOP', '='),
('<', '_PARL', '('),
('>', '_PARR', ')'),
]
sin = sys.argv[1]
for r in repl:
sin = sin.replace(r[0], r[1])
for r in repl:
sin = sin.replace(r[1], r[2])
sin = sin.replace('... |
b39db786b73cc00676d35cd14b42c70d63b21ba3 | readthedocs/projects/templatetags/projects_tags.py | readthedocs/projects/templatetags/projects_tags.py | from django import template
register = template.Library()
@register.filter
def sort_version_aware(versions):
"""
Takes a list of versions objects and sort them caring about version schemes
"""
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
fallback = Nor... | from django import template
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
register = template.Library()
def make_version(version):
ver = mkversion(version)
if not ver:
if version.slug == 'latest':
return NormalizedVersion('99999.0', error_on_huge_m... | Fix version sorting to make latest and stable first. | Fix version sorting to make latest and stable first. | Python | mit | CedarLogic/readthedocs.org,GovReady/readthedocs.org,emawind84/readthedocs.org,attakei/readthedocs-oauth,sunnyzwh/readthedocs.org,rtfd/readthedocs.org,SteveViss/readthedocs.org,wanghaven/readthedocs.org,clarkperkins/readthedocs.org,asampat3090/readthedocs.org,wanghaven/readthedocs.org,fujita-shintaro/readthedocs.org,ats... | from django import template
register = template.Library()
@register.filter
def sort_version_aware(versions):
"""
Takes a list of versions objects and sort them caring about version schemes
"""
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
fallback = Nor... | from django import template
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
register = template.Library()
def make_version(version):
ver = mkversion(version)
if not ver:
if version.slug == 'latest':
return NormalizedVersion('99999.0', error_on_huge_m... | <commit_before>from django import template
register = template.Library()
@register.filter
def sort_version_aware(versions):
"""
Takes a list of versions objects and sort them caring about version schemes
"""
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
... | from django import template
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
register = template.Library()
def make_version(version):
ver = mkversion(version)
if not ver:
if version.slug == 'latest':
return NormalizedVersion('99999.0', error_on_huge_m... | from django import template
register = template.Library()
@register.filter
def sort_version_aware(versions):
"""
Takes a list of versions objects and sort them caring about version schemes
"""
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
fallback = Nor... | <commit_before>from django import template
register = template.Library()
@register.filter
def sort_version_aware(versions):
"""
Takes a list of versions objects and sort them caring about version schemes
"""
from distutils2.version import NormalizedVersion
from projects.utils import mkversion
... |
eda9d0d607a23d40b0844e9c20b87debf605cfab | powerline/bindings/qtile/widget.py | powerline/bindings/qtile/widget.py | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
class Powerli... | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
class Powerli... | Move the closing parenthesis to the next line | Move the closing parenthesis to the next line
| Python | mit | junix/powerline,cyrixhero/powerline,russellb/powerline,dragon788/powerline,Liangjianghao/powerline,Liangjianghao/powerline,Luffin/powerline,darac/powerline,EricSB/powerline,kenrachynski/powerline,S0lll0s/powerline,xfumihiro/powerline,cyrixhero/powerline,xxxhycl2010/powerline,bartvm/powerline,xfumihiro/powerline,lukw00/... | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
class Powerli... | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
class Powerli... | <commit_before># vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
... | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
class Powerli... | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
class Powerli... | <commit_before># vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
from libqtile.bar import CALCULATED
from libqtile.widget import TextBox
from powerline import Powerline
class QTilePowerline(Powerline):
def do_setup(self, obj):
obj.powerline = self
... |
3aae172eae884bfb5f29be21cc70b032a574dfc1 | setup.py | setup.py | import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>0.2.5',
'sphinx>1.4',
]
# Need a fallback for th... | import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>=0.2.6',
'sphinx>=1.5',
]
# Need a fallback for ... | Upgrade dependencies a wee bit | Upgrade dependencies a wee bit
| Python | apache-2.0 | jeff-allen-mongo/mut,jeff-allen-mongo/mut | import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>0.2.5',
'sphinx>1.4',
]
# Need a fallback for th... | import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>=0.2.6',
'sphinx>=1.5',
]
# Need a fallback for ... | <commit_before>import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>0.2.5',
'sphinx>1.4',
]
# Need a ... | import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>=0.2.6',
'sphinx>=1.5',
]
# Need a fallback for ... | import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>0.2.5',
'sphinx>1.4',
]
# Need a fallback for th... | <commit_before>import sys
from setuptools import setup, find_packages
import mut
REQUIRES = [
'boto>=2.39,<2.40',
'certifi',
'docopt>=0.6,<0.7',
'docutils',
'dominate>=2.1,<2.2',
'libgiza>=0.2.13,<0.3',
'PyYAML',
'requests>2.9,<2.10',
'rstcloth>0.2.5',
'sphinx>1.4',
]
# Need a ... |
1d928cbc7b2cfcf1ffd2ec27f83ee33f0af39dfe | setuptools/py27compat.py | setuptools/py27compat.py | """
Compatibility Support for Python 2.7 and earlier
"""
import sys
import platform
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if sys.version_info < (3,):
def get_all_headers(message, key):
retur... | """
Compatibility Support for Python 2.7 and earlier
"""
import platform
import six
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if six.PY2:
def get_all_headers(message, key):
return message.gethea... | Use six to detect Python 2 | Use six to detect Python 2
| Python | mit | pypa/setuptools,pypa/setuptools,pypa/setuptools | """
Compatibility Support for Python 2.7 and earlier
"""
import sys
import platform
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if sys.version_info < (3,):
def get_all_headers(message, key):
retur... | """
Compatibility Support for Python 2.7 and earlier
"""
import platform
import six
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if six.PY2:
def get_all_headers(message, key):
return message.gethea... | <commit_before>"""
Compatibility Support for Python 2.7 and earlier
"""
import sys
import platform
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if sys.version_info < (3,):
def get_all_headers(message, key)... | """
Compatibility Support for Python 2.7 and earlier
"""
import platform
import six
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if six.PY2:
def get_all_headers(message, key):
return message.gethea... | """
Compatibility Support for Python 2.7 and earlier
"""
import sys
import platform
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if sys.version_info < (3,):
def get_all_headers(message, key):
retur... | <commit_before>"""
Compatibility Support for Python 2.7 and earlier
"""
import sys
import platform
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if sys.version_info < (3,):
def get_all_headers(message, key)... |
0dd80314ae29d615b287819ae075deda435f3fe8 | setup.py | setup.py | from setuptools import setup
setup(
name='statbank',
version='0.2.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=['statbank'],
... | from setuptools import setup
setup(
name='gisgroup-statbank',
version='0.0.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=['statb... | Rename pypi package to gisgroup-statbank | Rename pypi package to gisgroup-statbank
| Python | mit | gisgroup/statbank-python | from setuptools import setup
setup(
name='statbank',
version='0.2.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=['statbank'],
... | from setuptools import setup
setup(
name='gisgroup-statbank',
version='0.0.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=['statb... | <commit_before>from setuptools import setup
setup(
name='statbank',
version='0.2.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=[... | from setuptools import setup
setup(
name='gisgroup-statbank',
version='0.0.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=['statb... | from setuptools import setup
setup(
name='statbank',
version='0.2.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=['statbank'],
... | <commit_before>from setuptools import setup
setup(
name='statbank',
version='0.2.1',
description='Statbank API client library',
url='http://github.com/gisgroup/statbank-python',
author='Gis Group ApS',
author_email='[email protected], [email protected]',
license='MIT',
packages=[... |
a76fe727f9d6a7b95da2c3307ee7317a6426bd67 | simple_model/__init__.py | simple_model/__init__.py | from .builder import model_builder
from .models import DynamicModel, Model
__all__ = ('DynamicModel', 'Model', 'model_builder')
| from .builder import model_builder
from .models import Model
__all__ = ('Model', 'model_builder')
| Remove remaining links to DynamicModel | Remove remaining links to DynamicModel
| Python | mit | lamenezes/simple-model | from .builder import model_builder
from .models import DynamicModel, Model
__all__ = ('DynamicModel', 'Model', 'model_builder')
Remove remaining links to DynamicModel | from .builder import model_builder
from .models import Model
__all__ = ('Model', 'model_builder')
| <commit_before>from .builder import model_builder
from .models import DynamicModel, Model
__all__ = ('DynamicModel', 'Model', 'model_builder')
<commit_msg>Remove remaining links to DynamicModel<commit_after> | from .builder import model_builder
from .models import Model
__all__ = ('Model', 'model_builder')
| from .builder import model_builder
from .models import DynamicModel, Model
__all__ = ('DynamicModel', 'Model', 'model_builder')
Remove remaining links to DynamicModelfrom .builder import model_builder
from .models import Model
__all__ = ('Model', 'model_builder')
| <commit_before>from .builder import model_builder
from .models import DynamicModel, Model
__all__ = ('DynamicModel', 'Model', 'model_builder')
<commit_msg>Remove remaining links to DynamicModel<commit_after>from .builder import model_builder
from .models import Model
__all__ = ('Model', 'model_builder')
|
51337c5fa3fe21ccfadbc26f19aa9f2574663fdc | setup.py | setup.py | from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.1.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
| from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.2.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
| Update version after Apache configuration | Update version after Apache configuration
| Python | mit | wilbertom/flask-reverse-proxy | from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.1.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
Update version after Apache configuration | from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.2.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
| <commit_before>from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.1.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
<commit_msg>Update version after Apache co... | from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.2.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
| from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.1.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
Update version after Apache configurationfrom distutils.c... | <commit_before>from distutils.core import setup
setup(
name='flask-reverse-proxy',
version='0.1.0.0',
packages=['flask_reverse_proxy'],
url='',
license='',
author='Wilberto Morales',
author_email='[email protected]',
description=''
)
<commit_msg>Update version after Apache co... |
8eb61667984cad09086f442ef299c582d0208a8f | setup.py | setup.py | from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.5",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
license="BSD",
... | from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.6",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
license="BSD",
... | Update to v0.1.6 to add in function moves | Update to v0.1.6 to add in function moves
| Python | bsd-3-clause | shafferm/fast_sparCC | from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.5",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
license="BSD",
... | from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.6",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
license="BSD",
... | <commit_before>from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.5",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
... | from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.6",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
license="BSD",
... | from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.5",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
license="BSD",
... | <commit_before>from setuptools import setup, find_packages
__author__ = 'shafferm'
setup(
name="fast_sparCC",
version="v0.1.5",
author="Michael Shaffer",
author_email="[email protected]",
description="A fast command line interface to find correlations in biom tables with SparCC.",
... |
3cfe9cd12e2ac57dd702ad208347e213b627b8be | setup.py | setup.py | from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__version__,
p... | from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__version__,
p... | Change Development Status to Beta, add Python 3.4 support flag. | Change Development Status to Beta, add Python 3.4 support flag.
| Python | mit | 1045347128/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost | from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__version__,
p... | from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__version__,
p... | <commit_before>from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__v... | from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__version__,
p... | from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__version__,
p... | <commit_before>from setuptools import setup, find_packages
import flask_boost
entry_points = {
"console_scripts": [
"boost = flask_boost.cli:main",
]
}
with open("requirements.txt") as f:
requires = [l for l in f.read().splitlines() if l]
setup(
name='Flask-Boost',
version=flask_boost.__v... |
c4ab1ebcbc9d452972732ef5b15c0cf1b09bd8bc | changes/jobs/sync_repo.py | changes/jobs/sync_repo.py | from datetime import datetime
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_attempt = datetime.utcnow()
... | from datetime import datetime
from flask import current_app
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_at... | Use app logging instead of celery | Use app logging instead of celery
| Python | apache-2.0 | wfxiang08/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes | from datetime import datetime
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_attempt = datetime.utcnow()
... | from datetime import datetime
from flask import current_app
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_at... | <commit_before>from datetime import datetime
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_attempt = datetim... | from datetime import datetime
from flask import current_app
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_at... | from datetime import datetime
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_attempt = datetime.utcnow()
... | <commit_before>from datetime import datetime
from changes.config import db, queue
from changes.models import Repository
def sync_repo(repo_id):
repo = Repository.query.get(repo_id)
if not repo:
return
vcs = repo.get_vcs()
if vcs is None:
return
repo.last_update_attempt = datetim... |
5bef5472b55b36c1c9174ef861e92f057249ca9a | zou/app/models/preview_file.py | zou/app/models/preview_file.py | from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
neither a wo... | from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
neither a wo... | Add path field to preview file | Add path field to preview file
| Python | agpl-3.0 | cgwire/zou | from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
neither a wo... | from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
neither a wo... | <commit_before>from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
... | from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
neither a wo... | from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
neither a wo... | <commit_before>from sqlalchemy_utils import UUIDType
from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class PreviewFile(db.Model, BaseMixin, SerializerMixin):
"""
Describes a file which is aimed at being reviewed. It is not a publication
... |
51e434dfb11aaa35a93b1ca83777b6fc10ce609c | setup.py | setup.py | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepath",
long_... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(
name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepath",
long_d... | Add classifiers and fix URL | Add classifiers and fix URL
| Python | bsd-3-clause | morepath/more.transaction | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepath",
long_... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(
name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepath",
long_d... | <commit_before>import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepat... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(
name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepath",
long_d... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepath",
long_... | <commit_before>import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(name='more.transaction',
version='0.8.dev0',
description="transaction integration for Morepat... |
69e34aff3a25b33fa804ca97e327ad4f818f7d14 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.2',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.4',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | Add additional filestring param for parser.Parse method. | version2.4: Add additional filestring param for parser.Parse method.
| Python | mit | imjoey/pyhaproxy | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.2',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.4',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | <commit_before>from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.2',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
... | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.4',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.2',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
'pyhapr... | <commit_before>from setuptools import setup, find_packages
setup(
name='pyhaproxy',
version='0.2.2',
keywords=('haproxy', 'parse'),
description='A Python library to parse haproxy configuration file',
license='MIT License',
install_requires=[],
include_package_data=True,
package_data={
... |
ba41dc9bff21558d1712fe06751f867806d8abd6 | setup.py | setup.py | from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.0',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_data={'lemonway':... | from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.1',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_data={'lemonway':... | ADD - newversion of python_lemonway with improvements of MoneyIn | ADD - newversion of python_lemonway with improvements of MoneyIn
| Python | mit | brightforme/python-lemonway | from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.0',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_data={'lemonway':... | from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.1',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_data={'lemonway':... | <commit_before>from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.0',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_da... | from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.1',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_data={'lemonway':... | from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.0',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_data={'lemonway':... | <commit_before>from distutils.core import setup
setup(
name='python_lemonway',
version='0.1.0',
author='Pierre Pigeau',
author_email='[email protected]',
packages=['lemonway'],
url='',
license='LICENSE.txt',
description='',
long_description=open('README.rst').read(),
package_da... |
c60e104777b9f7aed79974efd3fa77855e6c7c0a | setup.py | setup.py | # -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nose-notify",
... | # -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nose-notify",
... | Add Python 3 to supported platforms | Add Python 3 to supported platforms
| Python | bsd-3-clause | passy/nose-notify | # -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nose-notify",
... | # -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nose-notify",
... | <commit_before># -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nos... | # -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nose-notify",
... | # -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nose-notify",
... | <commit_before># -*- coding: utf-8 -*-
"""
nose-notify
~~~~~~~~~~~
A nose plugin to display testsuite progress in the notify osd.
:copyright: 2010, Pascal Hartig <[email protected]>
:license: BSD, see LICENSE for more details
"""
from setuptools import setup
from nosenotify import __version__
setup(
name="nos... |
c7e5e221f8ca333ecdf757747cbc7fbbaf1f860a | ipkg/utils.py | ipkg/utils.py | import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(self):
if... | import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(self):
if... | Make DictFile remove its meta data file when calling clear() | Make DictFile remove its meta data file when calling clear()
| Python | mit | pmuller/ipkg | import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(self):
if... | import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(self):
if... | <commit_before>import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(se... | import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(self):
if... | import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(self):
if... | <commit_before>import os
import json
import logging
LOGGER = logging.getLogger(__name__)
class DictFile(dict):
"""A ``dict``, storable as a JSON file.
"""
def __init__(self, file_path):
super(DictFile, self).__init__()
self.__file_path = file_path
self.reload()
def reload(se... |
c2503a459b64efaa02d611f27384c7a808c4d24d | setup.py | setup.py | from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL client built up... | from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL client built up... | Add extras_requires for tornado support | Add extras_requires for tornado support
| Python | bsd-3-clause | gmr/queries,gmr/queries | from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL client built up... | from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL client built up... | <commit_before>from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL ... | from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL client built up... | from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL client built up... | <commit_before>from setuptools import setup
import platform
# Make the install_requires
target = platform.python_implementation()
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
description="Simplified PostgreSQL ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.