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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
40f1c31098bd09e98d50727d08becf0d55ca8409 | __init__.py | __init__.py | from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] ... | from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] ... | Add upload file size limit | Add upload file size limit
| Python | mit | ehhop/ehhapp-formulary,ehhop/ehhapp-formulary,ehhop/ehhapp-formulary | from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] ... | from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] ... | <commit_before>from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['U... | from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] ... | from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] ... | <commit_before>from __future__ import print_function
import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
UPLOAD_FOLDER = '/app/input'
ALLOWED_EXTENSIONS = set(['txt','xls','xlsx','csv','tsv','md'])
app = Flask(__name__)
app.config['U... |
30bd8b9b4d18579cdf9b723f82f35987c1ad9176 | __main__.py | __main__.py | from scanresults import ScanResults
import sys
sr = ScanResults()
sr.add_files(*sys.argv[1:])
sr.train()
out = sr.sentences()
if out is not None:
print(out)
| from scanresults import ScanResults
import sys
from argparse import ArgumentParser
parser = ArgumentParser(description='Generate markov text from a corpus')
parser.add_argument('-t','--train', default=2, type=int, metavar='train_n',
help="The size of the Markov state prefix to train the corpus on")... | Enable command-line args for configuration | Enable command-line args for configuration
| Python | bsd-3-clause | darrenpmeyer/scanresults,darrenpmeyer/scanresults | from scanresults import ScanResults
import sys
sr = ScanResults()
sr.add_files(*sys.argv[1:])
sr.train()
out = sr.sentences()
if out is not None:
print(out)
Enable command-line args for configuration | from scanresults import ScanResults
import sys
from argparse import ArgumentParser
parser = ArgumentParser(description='Generate markov text from a corpus')
parser.add_argument('-t','--train', default=2, type=int, metavar='train_n',
help="The size of the Markov state prefix to train the corpus on")... | <commit_before>from scanresults import ScanResults
import sys
sr = ScanResults()
sr.add_files(*sys.argv[1:])
sr.train()
out = sr.sentences()
if out is not None:
print(out)
<commit_msg>Enable command-line args for configuration<commit_after> | from scanresults import ScanResults
import sys
from argparse import ArgumentParser
parser = ArgumentParser(description='Generate markov text from a corpus')
parser.add_argument('-t','--train', default=2, type=int, metavar='train_n',
help="The size of the Markov state prefix to train the corpus on")... | from scanresults import ScanResults
import sys
sr = ScanResults()
sr.add_files(*sys.argv[1:])
sr.train()
out = sr.sentences()
if out is not None:
print(out)
Enable command-line args for configurationfrom scanresults import ScanResults
import sys
from argparse import ArgumentParser
parser = ArgumentParser(descrip... | <commit_before>from scanresults import ScanResults
import sys
sr = ScanResults()
sr.add_files(*sys.argv[1:])
sr.train()
out = sr.sentences()
if out is not None:
print(out)
<commit_msg>Enable command-line args for configuration<commit_after>from scanresults import ScanResults
import sys
from argparse import Argume... |
5459dfc62e3a0d5b36b6d9405232382c1f8b663a | __init__.py | __init__.py | import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner, storage
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
| import os
import sys
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
| Remove unused imports and sort | Remove unused imports and sort
| Python | mpl-2.0 | jmlong1027/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,MITRECND/multiscanner,mitre/multiscanner,MITRECND/multiscanner,mitre/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner | import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner, storage
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
Remove unused imports and sort | import os
import sys
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
| <commit_before>import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner, storage
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
<commit_msg>Remove unused imports and sort<commit_after> | import os
import sys
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
| import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner, storage
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
Remove unused imports and sortimport os
import sys
sys.path.insert(0, ... | <commit_before>import sys
import os
sys.path.insert(0, os.path.dirname(__file__))
from . import multiscanner, storage
common = multiscanner.common
multiscan = multiscanner.multiscan
parse_reports = multiscanner.parse_reports
config_init = multiscanner.config_init
<commit_msg>Remove unused imports and sort<commit_after>... |
e8d99b27864d32ad149ffc276dfa78bfdff22c56 | __main__.py | __main__.py | #!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input(">> ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.parse_program()
... | #!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input("⧫ ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.parse_program()
... | Change prompt to a diamond | Change prompt to a diamond
| Python | mit | Zac-Garby/pluto-lang | #!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input(">> ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.parse_program()
... | #!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input("⧫ ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.parse_program()
... | <commit_before>#!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input(">> ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.pars... | #!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input("⧫ ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.parse_program()
... | #!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input(">> ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.parse_program()
... | <commit_before>#!/usr/bin/env python3
import token
import lexer as l
import parser as p
import evaluator as e
import context as c
def main(ctx):
string = input(">> ")
string = string.replace("\\n", "\n") + ";"
tokens = l.lex(string)
parser = p.Parser(tokens)
program = parser.pars... |
15307ebe2c19c1a3983b0894152ba81fdde34619 | exp/descriptivestats.py | exp/descriptivestats.py | import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mean())
# Median
print(z.median())
# Variance
pri... | import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
# Generate 1000 random numbers from a normal distribution
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mea... | Add comment on dist of first function | Add comment on dist of first function | Python | mit | charanpald/tyre-hug | import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mean())
# Median
print(z.median())
# Variance
pri... | import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
# Generate 1000 random numbers from a normal distribution
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mea... | <commit_before>import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mean())
# Median
print(z.median())
# V... | import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
# Generate 1000 random numbers from a normal distribution
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mea... | import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mean())
# Median
print(z.median())
# Variance
pri... | <commit_before>import pandas
import numpy
import matplotlib.pyplot as plt
def univariate_stats():
num_examples = 1000
z = pandas.Series(numpy.random.randn(num_examples))
# Minimum
print(z.min())
# Maximum
print(z.max())
# Mean
print(z.mean())
# Median
print(z.median())
# V... |
3999e9812a766066dcccf6a4d07174144cb9f72d | wurstmineberg.45s.py | wurstmineberg.45s.py | #!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {}|color=gray'.format(status['version']))
for w... | #!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {ver}|href=http://minecraft.gamepedia.com/{ver}... | Add Minecraft Wiki link to version item | Add Minecraft Wiki link to version item
| Python | mit | wurstmineberg/bitbar-server-status | #!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {}|color=gray'.format(status['version']))
for w... | #!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {ver}|href=http://minecraft.gamepedia.com/{ver}... | <commit_before>#!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {}|color=gray'.format(status['ve... | #!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {ver}|href=http://minecraft.gamepedia.com/{ver}... | #!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {}|color=gray'.format(status['version']))
for w... | <commit_before>#!/usr/local/bin/python3
import requests
people = requests.get('https://api.wurstmineberg.de/v2/people.json').json()
status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json()
print(len(status['list']))
print('---')
print('Version: {}|color=gray'.format(status['ve... |
d792201bc311a15e5df48259008331b771c59aca | flexx/ui/layouts/_layout.py | flexx/ui/layouts/_layout.py | """ Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layout. Other layout... | """ Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layout. Other layout... | Fix CSS problem when Flexx is enbedded in page-app | Fix CSS problem when Flexx is enbedded in page-app
| Python | bsd-2-clause | jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx,JohnLunzer/flexx,jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx | """ Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layout. Other layout... | """ Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layout. Other layout... | <commit_before>""" Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layou... | """ Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layout. Other layout... | """ Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layout. Other layout... | <commit_before>""" Layout widgets
"""
from . import Widget
class Layout(Widget):
""" Abstract class for widgets that organize their child widgets.
Panel widgets are layouts that do not take the natural size of their
content into account, making them more efficient and suited for
high-level layou... |
9e2f9b040d0dde3237daca1c483c8b2bf0170663 | archlinux/archpack_settings.py | archlinux/archpack_settings.py | #
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.6.1",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"sqlite",
... | #
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.7",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"sqlite",
... | Update Arch package to 2.7 | Update Arch package to 2.7
| Python | bsd-2-clause | bowlofstew/packages,biicode/packages,biicode/packages,bowlofstew/packages | #
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.6.1",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"sqlite",
... | #
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.7",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"sqlite",
... | <commit_before>#
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.6.1",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"... | #
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.7",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"sqlite",
... | #
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.6.1",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"sqlite",
... | <commit_before>#
# Biicode Arch Linux package settings.
#
# Check PKGBUILD_template docs for those settings and
# what they mean.
#
def settings():
return { "version": "2.6.1",
"release_number": "1",
"arch_deps": ["cmake>=3.0.2",
"zlib",
"glibc",
"... |
ecd33e00eb5eb8ff58358e01a6d618262e8381a6 | astropy/io/vo/setup_package.py | astropy/io/vo/setup_package.py | from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR])]
def get_pa... | from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR])]
def get_pa... | Update upstream version of vo | Update upstream version of vo
| Python | bsd-3-clause | larrybradley/astropy,MSeifert04/astropy,tbabej/astropy,dhomeier/astropy,tbabej/astropy,StuartLittlefair/astropy,mhvk/astropy,astropy/astropy,lpsinger/astropy,DougBurke/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,dhomeier/astropy,joergdietrich/astropy,MSeifert04/astropy,stargaser/astropy,pllim/astropy,Stu... | from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR])]
def get_pa... | from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR])]
def get_pa... | <commit_before>from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR]... | from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR])]
def get_pa... | from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR])]
def get_pa... | <commit_before>from distutils.core import Extension
from os.path import join
from astropy import setup_helpers
def get_extensions(build_type='release'):
VO_DIR = 'astropy/io/vo/src'
return [Extension(
"astropy.io.vo.tablewriter",
[join(VO_DIR, "tablewriter.c")],
include_dirs=[VO_DIR]... |
5abac5e7cdc1d67ec6ed0996a5b132fae20af530 | compare_text_of_urls.py | compare_text_of_urls.py | #!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two URLs with a spac... | #!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two URLs with a spac... | Use the URLs input in the UI boxes | Use the URLs input in the UI boxes
Parse JSON from two separate URL input boxes, instead of using one input
box and parsing one long string containing both URLs.
| Python | agpl-3.0 | scraperwiki/difference-tool,scraperwiki/difference-tool,scraperwiki/difference-tool,scraperwiki/difference-tool | #!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two URLs with a spac... | #!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two URLs with a spac... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two U... | #!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two URLs with a spac... | #!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two URLs with a spac... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
import json
import os
from os.path import join, dirname, abspath
import subprocess
import sys
from get_text_from_url import process_page
def main(argv=None):
if argv is None:
argv = sys.argv
arg = argv[1:]
# Enter two U... |
f81c36d4fe31815ed6692b573ad660067151d215 | zaqarclient/_i18n.py | zaqarclient/_i18n.py | # Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | # Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Drop use of 'oslo' namespace package | Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
pa... | Python | apache-2.0 | openstack/python-zaqarclient | # Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | # Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | <commit_before># Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | # Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | # Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | <commit_before># Copyright 2014 Red Hat, Inc
# All Rights .Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
c691c256682bec5f9a242ab71ab42d296bbf88a9 | nightreads/posts/admin.py | nightreads/posts/admin.py | from django.contrib import admin
# Register your models here.
| from django.contrib import admin
from .models import Post, Tag
admin.site.register(Post)
admin.site.register(Tag)
| Add `Post`, `Tag` models to Admin | Add `Post`, `Tag` models to Admin
| Python | mit | avinassh/nightreads,avinassh/nightreads | from django.contrib import admin
# Register your models here.
Add `Post`, `Tag` models to Admin | from django.contrib import admin
from .models import Post, Tag
admin.site.register(Post)
admin.site.register(Tag)
| <commit_before>from django.contrib import admin
# Register your models here.
<commit_msg>Add `Post`, `Tag` models to Admin<commit_after> | from django.contrib import admin
from .models import Post, Tag
admin.site.register(Post)
admin.site.register(Tag)
| from django.contrib import admin
# Register your models here.
Add `Post`, `Tag` models to Adminfrom django.contrib import admin
from .models import Post, Tag
admin.site.register(Post)
admin.site.register(Tag)
| <commit_before>from django.contrib import admin
# Register your models here.
<commit_msg>Add `Post`, `Tag` models to Admin<commit_after>from django.contrib import admin
from .models import Post, Tag
admin.site.register(Post)
admin.site.register(Tag)
|
4fe8a1c1b294f0d75a901d4e8e80f47f5583e44e | pages/lms/info.py | pages/lms/info.py | from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
SECTION_PATH = {... | from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
SECTION_PATH = {... | Fix for test failure introduced by basic auth changes | Fix for test failure introduced by basic auth changes
| Python | agpl-3.0 | edx/edx-e2e-tests,raeeschachar/edx-e2e-mirror,raeeschachar/edx-e2e-mirror,edx/edx-e2e-tests | from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
SECTION_PATH = {... | from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
SECTION_PATH = {... | <commit_before>from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
S... | from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
SECTION_PATH = {... | from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
SECTION_PATH = {... | <commit_before>from e2e_framework.page_object import PageObject
from ..lms import BASE_URL
class InfoPage(PageObject):
"""
Info pages for the main site.
These are basically static pages, so we use one page
object to represent them all.
"""
# Dictionary mapping section names to URL paths
S... |
417ab5241c852cdcd072143bc2444f20f2117623 | tests/execution_profiles/capture_profile.py | tests/execution_profiles/capture_profile.py | import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
print capture.capture(board_string)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
...mm...
..mrym..
.mgyrgm.
mygryg... | import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
board = capture.Board(board_string)
print capture.capture(board)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
... | Update capture profiler to new spec of providing board instead of string. | Update capture profiler to new spec of providing board instead of string.
| Python | mit | kobejohn/PQHelper | import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
print capture.capture(board_string)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
...mm...
..mrym..
.mgyrgm.
mygryg... | import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
board = capture.Board(board_string)
print capture.capture(board)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
... | <commit_before>import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
print capture.capture(board_string)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
...mm...
..mrym..
... | import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
board = capture.Board(board_string)
print capture.capture(board)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
... | import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
print capture.capture(board_string)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
...mm...
..mrym..
.mgyrgm.
mygryg... | <commit_before>import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
print capture.capture(board_string)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
...mm...
..mrym..
... |
c81eb510c72511c1f692f02f7bb63ef4caa51d27 | apps/concept/management/commands/update_concept_totals.py | apps/concept/management/commands/update_concept_totals.py | from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from education.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for concept in Concept.o... | from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from concept.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for concept in Concept.obj... | Add management functions for migration | Add management functions for migration
| Python | bsd-3-clause | mfitzp/smrtr,mfitzp/smrtr | from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from education.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for concept in Concept.o... | from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from concept.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for concept in Concept.obj... | <commit_before>from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from education.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for conce... | from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from concept.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for concept in Concept.obj... | from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from education.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for concept in Concept.o... | <commit_before>from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from education.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for conce... |
fb2cfe4759fb98de644932af17a247428b2cc0f5 | api/auth.py | api/auth.py | from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.lower()] = value
... | from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.lower()] = value
... | Fix Auth API key check causing error 500s | Fix Auth API key check causing error 500s
| Python | bsd-3-clause | nikdoof/test-auth | from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.lower()] = value
... | from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.lower()] = value
... | <commit_before>from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.low... | from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.lower()] = value
... | from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.lower()] = value
... | <commit_before>from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.low... |
a1d9312e1ac6f66aaf558652d890ac2a6bd67e40 | backend/loader/model/datafile.py | backend/loader/model/datafile.py | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | Add parent so we can track versions. | Add parent so we can track versions.
| Python | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | <commit_before>from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = [... | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | <commit_before>from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = [... |
8188008cf1bd41c1cbe0452ff635dd0319dfecd9 | derrida/books/urls.py | derrida/books/urls.py | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for autocomplete v... | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for autocomplete v... | Add trailing slash to url | Add trailing slash to url
| Python | apache-2.0 | Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for autocomplete v... | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for autocomplete v... | <commit_before>from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for... | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for autocomplete v... | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for autocomplete v... | <commit_before>from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from derrida.books.views import (
PublisherAutocomplete, LanguageAutocomplete, InstanceDetailView,
InstanceListView
)
urlpatterns = [
# TODO: come up with cleaner url patterns/names for... |
eaa17491581cbb52242fbe543dd09929f537a8bc | mysettings.py | mysettings.py | from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
GITHUB_URL = 'https://github.com/JetBrains/kotlin'
TWITTER_URL ... | from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
FREEZER_STATIC_IGNORE = ["*"]
GITHUB_URL = 'https://github.com/... | Add option to ignore static. | Add option to ignore static.
| Python | apache-2.0 | meilalina/kotlin-web-site,meilalina/kotlin-web-site,hltj/kotlin-web-site-cn,hltj/kotlin-web-site-cn,JetBrains/kotlin-web-site,JetBrains/kotlin-web-site,hltj/kotlin-web-site-cn,hltj/kotlin-web-site-cn,JetBrains/kotlin-web-site,JetBrains/kotlin-web-site,meilalina/kotlin-web-site,JetBrains/kotlin-web-site,meilalina/kotlin... | from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
GITHUB_URL = 'https://github.com/JetBrains/kotlin'
TWITTER_URL ... | from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
FREEZER_STATIC_IGNORE = ["*"]
GITHUB_URL = 'https://github.com/... | <commit_before>from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
GITHUB_URL = 'https://github.com/JetBrains/kotli... | from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
FREEZER_STATIC_IGNORE = ["*"]
GITHUB_URL = 'https://github.com/... | from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
GITHUB_URL = 'https://github.com/JetBrains/kotlin'
TWITTER_URL ... | <commit_before>from src.markdown.makrdown import jinja_aware_markdown
PREFERRED_URL_SCHEME = 'http'
SERVER_NAME = 'localhost:5000'
FLATPAGES_EXTENSION = '.md'
FLATPAGES_HTML_RENDERER = jinja_aware_markdown
FREEZER_IGNORE_404_NOT_FOUND = True
FLATPAGES_AUTO_RELOAD = True
GITHUB_URL = 'https://github.com/JetBrains/kotli... |
c90dbc5007b5627b264493c2d16af79cff9c2af0 | joku/checks.py | joku/checks.py | """
Specific checks.
"""
from discord.ext.commands import CheckFailure
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
| """
Specific checks.
"""
from discord.ext.commands import CheckFailure, check
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
def has_permissions(**perms):
def predicate(ctx):
if ctx.bot.owner_id == ctx... | Add better custom has_permission check. | Add better custom has_permission check.
| Python | mit | MJB47/Jokusoramame,MJB47/Jokusoramame,MJB47/Jokusoramame | """
Specific checks.
"""
from discord.ext.commands import CheckFailure
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
Add better custom has_permission check. | """
Specific checks.
"""
from discord.ext.commands import CheckFailure, check
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
def has_permissions(**perms):
def predicate(ctx):
if ctx.bot.owner_id == ctx... | <commit_before>"""
Specific checks.
"""
from discord.ext.commands import CheckFailure
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
<commit_msg>Add better custom has_permission check.<commit_after> | """
Specific checks.
"""
from discord.ext.commands import CheckFailure, check
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
def has_permissions(**perms):
def predicate(ctx):
if ctx.bot.owner_id == ctx... | """
Specific checks.
"""
from discord.ext.commands import CheckFailure
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
Add better custom has_permission check."""
Specific checks.
"""
from discord.ext.commands import ... | <commit_before>"""
Specific checks.
"""
from discord.ext.commands import CheckFailure
def is_owner(ctx):
if not ctx.bot.owner_id == ctx.message.author.id:
raise CheckFailure(message="You are not the owner.")
return True
<commit_msg>Add better custom has_permission check.<commit_after>"""
Specific chec... |
1b2f0be67a8372a652b786c8b183cd5edf1807cd | config/fuzz_pox_mesh.py | config/fuzz_pox_mesh.py | from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controller
command_lin... | from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer, Interactive
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controlle... | Swap back to Fuzzer, no monkey patching | Swap back to Fuzzer, no monkey patching
| Python | apache-2.0 | jmiserez/sts,jmiserez/sts,ucb-sts/sts,ucb-sts/sts | from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controller
command_lin... | from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer, Interactive
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controlle... | <commit_before>from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our control... | from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer, Interactive
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controlle... | from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controller
command_lin... | <commit_before>from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our control... |
644fbef7030f0685be7dd056606ab23daaefdc72 | app/gitlab.py | app/gitlab.py | from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Request Hook': 'me... | from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Request Hook': 'me... | Fix typo in error message variable | Fix typo in error message variable
| Python | apache-2.0 | pipex/gitbot,pipex/gitbot,pipex/gitbot | from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Request Hook': 'me... | from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Request Hook': 'me... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Req... | from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Request Hook': 'me... | from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Request Hook': 'me... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from .webhooks import WebHook
from werkzeug.exceptions import BadRequest, NotImplemented
EVENTS = {
'Push Hook': 'push',
'Tag Push Hook': 'tag_push',
'Issue Hook': 'issue',
'Note Hook': 'note',
'Merge Req... |
abb00ac993154071776488b5dcaef32cc2982f4c | test/functional/master/test_endpoints.py | test/functional/master/test_endpoints.py | import os
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def _start_master_only_and_post_a_new_job(self):
master = self.cluster.start_master()
... | import os
import tempfile
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def setUp(self):
super().setUp()
self._project_dir = tempfile.Tempora... | Fix broken functional tests on windows | Fix broken functional tests on windows
Something must have changed on the Appveyor side since this code
hasn't been touched recently. The issue was that a functional test
was referring to "/tmp" which is not valid on Windows. I'm surprised
this worked on Windows in the first place.
| Python | apache-2.0 | josephharrington/ClusterRunner,box/ClusterRunner,josephharrington/ClusterRunner,nickzuber/ClusterRunner,Medium/ClusterRunner,nickzuber/ClusterRunner,box/ClusterRunner,Medium/ClusterRunner | import os
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def _start_master_only_and_post_a_new_job(self):
master = self.cluster.start_master()
... | import os
import tempfile
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def setUp(self):
super().setUp()
self._project_dir = tempfile.Tempora... | <commit_before>import os
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def _start_master_only_and_post_a_new_job(self):
master = self.cluster.start_ma... | import os
import tempfile
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def setUp(self):
super().setUp()
self._project_dir = tempfile.Tempora... | import os
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def _start_master_only_and_post_a_new_job(self):
master = self.cluster.start_master()
... | <commit_before>import os
import yaml
from test.framework.functional.base_functional_test_case import BaseFunctionalTestCase
from test.functional.job_configs import BASIC_JOB
class TestMasterEndpoints(BaseFunctionalTestCase):
def _start_master_only_and_post_a_new_job(self):
master = self.cluster.start_ma... |
81833470d1eb831e27e9e34712b983efbc38a735 | solar_neighbourhood/prepare_data_add_kinematics.py | solar_neighbourhood/prepare_data_add_kinematics.py | """
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = tabletool.read(datafile)
# Set missing radial velocit... | """
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = Table.read(datafile)
# Set missing radial velocities ... | Convert entire table to cartesian | Convert entire table to cartesian
| Python | mit | mikeireland/chronostar,mikeireland/chronostar,mikeireland/chronostar,mikeireland/chronostar | """
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = tabletool.read(datafile)
# Set missing radial velocit... | """
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = Table.read(datafile)
# Set missing radial velocities ... | <commit_before>"""
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = tabletool.read(datafile)
# Set missing... | """
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = Table.read(datafile)
# Set missing radial velocities ... | """
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = tabletool.read(datafile)
# Set missing radial velocit... | <commit_before>"""
Add very large RV errors for stars with no known RVs.
Convert to cartesian.
"""
import numpy as np
import sys
sys.path.insert(0, '..')
from chronostar import tabletool
from astropy.table import Table
datafile = Table.read('../data/ScoCen_box_result.fits')
d = tabletool.read(datafile)
# Set missing... |
fedb3768539259568555d5a62d503c7995f4b9a2 | readthedocs/oauth/utils.py | readthedocs/oauth/utils.py | import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
project, created ... | import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
project, created ... | Handle orgs that you don’t own personally. | Handle orgs that you don’t own personally. | Python | mit | istresearch/readthedocs.org,CedarLogic/readthedocs.org,KamranMackey/readthedocs.org,SteveViss/readthedocs.org,stevepiercy/readthedocs.org,soulshake/readthedocs.org,kenshinthebattosai/readthedocs.org,takluyver/readthedocs.org,cgourlay/readthedocs.org,soulshake/readthedocs.org,attakei/readthedocs-oauth,hach-que/readthedo... | import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
project, created ... | import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
project, created ... | <commit_before>import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
pr... | import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
project, created ... | import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
project, created ... | <commit_before>import logging
from .models import GithubProject, GithubOrganization
log = logging.getLogger(__name__)
def make_github_project(user, org, privacy, repo_json):
if (repo_json['private'] is True and privacy == 'private' or
repo_json['private'] is False and privacy == 'public'):
pr... |
59b2d0418c787066c37904816925dad15b0b45cf | scanblog/scanning/admin.py | scanblog/scanning/admin.py | from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, ScanAdmin)
class... | from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, ScanAdmin)
class... | Use author display name in document list_filter | Use author display name in document list_filter
| Python | agpl-3.0 | yourcelf/btb,yourcelf/btb,flexpeace/btb,flexpeace/btb,yourcelf/btb,flexpeace/btb,flexpeace/btb,yourcelf/btb,flexpeace/btb,yourcelf/btb | from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, ScanAdmin)
class... | from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, ScanAdmin)
class... | <commit_before>from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, Sc... | from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, ScanAdmin)
class... | from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, ScanAdmin)
class... | <commit_before>from django.contrib import admin
from scanning.models import PendingScan, Document, DocumentPage, Scan, ScanPage, Transcription
class ScanPageInline(admin.TabularInline):
model = ScanPage
class ScanAdmin(admin.ModelAdmin):
model = Scan
inlines = [ScanPageInline]
admin.site.register(Scan, Sc... |
e4e10ee0ae5a18cfec0e15b7b85986b7f4fc4f9d | feder/institutions/viewsets.py | feder/institutions/viewsets.py | import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filters.CharFilter(m... | import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filters.CharFilter(m... | Fix prefetched fields in Institutions in API | Fix prefetched fields in Institutions in API
| Python | mit | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filters.CharFilter(m... | import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filters.CharFilter(m... | <commit_before>import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filte... | import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filters.CharFilter(m... | import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filters.CharFilter(m... | <commit_before>import django_filters
from rest_framework import filters, viewsets
from teryt_tree.rest_framework_ext.viewsets import custom_area_filter
from .models import Institution, Tag
from .serializers import InstitutionSerializer, TagSerializer
class InstitutionFilter(filters.FilterSet):
jst = django_filte... |
19c0e8d856049677bc7de2bc293a87a0aac306f8 | httpd/keystone.py | httpd/keystone.py | import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone.conf']
CONF(config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__file__)
if CONF.debug:
CONF.log_opt_... | import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone/keystone.conf']
CONF(project='keystone', default_config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__fil... | Fix wsgi config file access for HTTPD | Fix wsgi config file access for HTTPD
Bug 1051081
Change-Id: Ie1690c9b1b98ed3f5a78d935878369b7520b35c9
| Python | apache-2.0 | ging/keystone,cloudbau/keystone,cloudbau/keystone,JioCloud/keystone,townbull/keystone-dtrust,roopali8/keystone,maestro-hybrid-cloud/keystone,townbull/keystone-dtrust,rickerc/keystone_audit,rickerc/keystone_audit,jumpstarter-io/keystone,cloudbau/keystone,jamielennox/keystone,cbrucks/Federated_Keystone,jumpstarter-io/key... | import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone.conf']
CONF(config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__file__)
if CONF.debug:
CONF.log_opt_... | import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone/keystone.conf']
CONF(project='keystone', default_config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__fil... | <commit_before>import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone.conf']
CONF(config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__file__)
if CONF.debug:
... | import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone/keystone.conf']
CONF(project='keystone', default_config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__fil... | import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone.conf']
CONF(config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__file__)
if CONF.debug:
CONF.log_opt_... | <commit_before>import os
from paste import deploy
from keystone import config
from keystone.common import logging
LOG = logging.getLogger(__name__)
CONF = config.CONF
config_files = ['/etc/keystone.conf']
CONF(config_files=config_files)
conf = CONF.config_file[0]
name = os.path.basename(__file__)
if CONF.debug:
... |
671ca30892e3ebeb0a9140f95690853b4b92dc02 | post/views.py | post/views.py | from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_context(self, *... | from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_context(self, *... | Fix reverse since we deprecated post_object_list | Fix reverse since we deprecated post_object_list
| Python | bsd-3-clause | praekelt/jmbo-post,praekelt/jmbo-post | from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_context(self, *... | from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_context(self, *... | <commit_before>from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_... | from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_context(self, *... | from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_context(self, *... | <commit_before>from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from post.models import Post
from jmbo.generic.views import GenericObjectDetail, GenericObjectList
from jmbo.view_modifiers import DefaultViewModifier
class ObjectList(GenericObjectList):
def get_extra_... |
ee3b712611ed531843134ef4ce94cb45c726c127 | nap/extras/actions.py | nap/extras/actions.py |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... | Fix filename creation in csv export action | Fix filename creation in csv export action
| Python | bsd-3-clause | limbera/django-nap,MarkusH/django-nap |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... | <commit_before>
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opt... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... |
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opts = opts
... | <commit_before>
from django.http import StreamingHttpResponse
from django.utils.encoding import force_text
from .models import modelserialiser_factory
from .simplecsv import CSV
class ExportCsv(object):
def __init__(self, serialiser=None, label=None, **opts):
self.serialiser = serialiser
self.opt... |
63eaf0faf56a70fadbd37f0acac6f5e61c7b19eb | checkdns.py | checkdns.py | # coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216.58.222.46":
... | # coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216.58.22.46":
... | Change sleep function to the end to do repeat everytime | Change sleep function to the end to do repeat everytime
| Python | mit | felipebhz/checkdns | # coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216.58.222.46":
... | # coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216.58.22.46":
... | <commit_before># coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216... | # coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216.58.22.46":
... | # coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216.58.222.46":
... | <commit_before># coding=utf8
# 31.220.16.242
# 216.58.222.46
import socket
import time
import webbrowser
def checkdns():
print time.ctime()
retorno = True
try:
ip = socket.gethostbyname('google.com')
print ("O IP do host verificado é: " + ip)
if ip == "216... |
ab78bf2c47a8bec5c1d0c5a7951dba1c98f5c28e | check_gm.py | check_gm.py | #!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagerex/database@v%i/... | #!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagerex/database@v%i/... | Revert file to moneymanager master branch. | Revert file to moneymanager master branch.
| Python | mit | moneymanagerex/general-reports,moneymanagerex/general-reports | #!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagerex/database@v%i/... | #!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagerex/database@v%i/... | <commit_before>#!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagere... | #!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagerex/database@v%i/... | #!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagerex/database@v%i/... | <commit_before>#!/usr/bin/env python3
# vi:tabstop=4:expandtab:shiftwidth=4:softtabstop=4:autoindent:smarttab
import os, sys
import sqlite3
import urllib.request
err = False
for version in range (7, 14):
fname = 'tables_v1.sql' if version < 12 else 'tables.sql'
url = 'https://cdn.jsdelivr.net/gh/moneymanagere... |
175bbd2f181d067712d38beeca9df4063654103a | nlppln/frog_to_saf.py | nlppln/frog_to_saf.py | #!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output_dir):
if n... | #!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output_dir):
if n... | Update script to remove extension from filename | Update script to remove extension from filename
Before, the script added the extension .json to whatever the file
name was. Now, it removes the last extension and then appends .json.
| Python | apache-2.0 | WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln | #!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output_dir):
if n... | #!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output_dir):
if n... | <commit_before>#!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output... | #!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output_dir):
if n... | #!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output_dir):
if n... | <commit_before>#!/usr/bin/env python
import click
import os
import codecs
import json
from xtas.tasks._frog import parse_frog, frog_to_saf
@click.command()
@click.argument('input_files', nargs=-1, type=click.Path(exists=True))
@click.argument('output_dir', nargs=1, type=click.Path())
def frog2saf(input_files, output... |
7e4b66fe3df07afa431201de7a5a76d2eeb949a1 | app/main.py | app/main.py | #!/usr/bin/env python
from env_setup import setup_django
setup_django()
from env_setup import setup
setup()
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.django.templates import render_template
class MainApplicationConf... | #!/usr/bin/env python
import env_setup; env_setup.setup(); env_setup.setup_django()
from django.template import add_to_builtins
add_to_builtins('agar.django.templatetags')
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.dj... | Fix django custom template tag importing | Fix django custom template tag importing
| Python | mit | xuru/substrate,xuru/substrate,xuru/substrate | #!/usr/bin/env python
from env_setup import setup_django
setup_django()
from env_setup import setup
setup()
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.django.templates import render_template
class MainApplicationConf... | #!/usr/bin/env python
import env_setup; env_setup.setup(); env_setup.setup_django()
from django.template import add_to_builtins
add_to_builtins('agar.django.templatetags')
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.dj... | <commit_before>#!/usr/bin/env python
from env_setup import setup_django
setup_django()
from env_setup import setup
setup()
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.django.templates import render_template
class Main... | #!/usr/bin/env python
import env_setup; env_setup.setup(); env_setup.setup_django()
from django.template import add_to_builtins
add_to_builtins('agar.django.templatetags')
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.dj... | #!/usr/bin/env python
from env_setup import setup_django
setup_django()
from env_setup import setup
setup()
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.django.templates import render_template
class MainApplicationConf... | <commit_before>#!/usr/bin/env python
from env_setup import setup_django
setup_django()
from env_setup import setup
setup()
from webapp2 import RequestHandler, Route, WSGIApplication
from agar.env import on_production_server
from agar.config import Config
from agar.django.templates import render_template
class Main... |
aaba085cd2e97c8c23e6724da3313d42d12798f0 | app/grandchallenge/annotations/validators.py | app/grandchallenge/annotations/validators.py | from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.
"""
re... | from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.
"""
re... | Make sure request.user is a user | Make sure request.user is a user
| Python | apache-2.0 | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.
"""
re... | from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.
"""
re... | <commit_before>from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.... | from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.
"""
re... | from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.
"""
re... | <commit_before>from rest_framework import serializers
from django.conf import settings
def validate_grader_is_current_retina_user(grader, context):
"""
This method checks if the passed grader equals the request.user that is passed in the context.
Only applies to users that are in the retina_graders group.... |
ac6ce056e6b05531d81c550ae3e1e1d688ece4a0 | jwt_auth/serializers.py | jwt_auth/serializers.py | from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username', 'email', 'pa... | from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username', 'email', 'pa... | Make serializer commet more clear | [docs](jwt_auth): Make serializer commet more clear
| Python | mit | codertx/lightil | from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username', 'email', 'pa... | from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username', 'email', 'pa... | <commit_before>from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username... | from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username', 'email', 'pa... | from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username', 'email', 'pa... | <commit_before>from .models import User
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=20, min_length=8, trim_whitespace=False, write_only=True)
class Meta:
model = User
fields = ('id', 'nickname', 'username... |
d64460c8bbbe045dcdf9f737562a31d84044acce | rest/setup.py | rest/setup.py | #
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | #
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | Change package name to 'cirm' to avoid confusion. | Change package name to 'cirm' to avoid confusion.
| Python | apache-2.0 | informatics-isi-edu/microscopy,informatics-isi-edu/microscopy,informatics-isi-edu/microscopy,informatics-isi-edu/microscopy | #
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | #
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | <commit_before>#
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | #
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | #
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | <commit_before>#
# Copyright 2012 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... |
10d0b7c452c8d9d5893cfe612e0beaa738f61628 | easy_pjax/__init__.py | easy_pjax/__init__.py | #-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
try:
from djang... | #-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
has_add_to_builtins ... | Add to template builtins only if add_to_buitlins is available (Django <= 1.8) | Add to template builtins only if add_to_buitlins is available (Django <= 1.8)
| Python | bsd-3-clause | nigma/django-easy-pjax,nigma/django-easy-pjax,nigma/django-easy-pjax | #-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
try:
from djang... | #-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
has_add_to_builtins ... | <commit_before>#-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
try:... | #-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
has_add_to_builtins ... | #-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
try:
from djang... | <commit_before>#-*- coding: utf-8 -*-
"""
Register filter so it is available for use in the `extends` template tag
(The `extends` tag must come first in a template, so regular `load` is not
an option).
"""
from __future__ import absolute_import, division, print_function, unicode_literals
__version__ = "1.2.0"
try:... |
b6208c1f9b6f0afca1dff40a66d2c915594b1946 | blaze/io/server/tests/start_simple_server.py | blaze/io/server/tests/start_simple_server.py | """
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
import blaze
from blaze.io.server.app import app
blaze.catalog.load_config(sys.argv[1])
app.run(port=int(sys.argv[2]), use_reloader=False)
| """
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
if os.name == 'nt':
old_excepthook = sys.excepthook
# Exclude this from our autogenerated API docs.
undoc = lambda func: func
@undoc
def gui_excepthook(exctype, value, tb):
... | Add exception hook to help diagnose server test errors in python3 gui mode | Add exception hook to help diagnose server test errors in python3 gui mode
| Python | bsd-3-clause | caseyclements/blaze,dwillmer/blaze,jcrist/blaze,mrocklin/blaze,cowlicks/blaze,ContinuumIO/blaze,jcrist/blaze,xlhtc007/blaze,FrancescAlted/blaze,aterrel/blaze,nkhuyu/blaze,AbhiAgarwal/blaze,markflorisson/blaze-core,nkhuyu/blaze,FrancescAlted/blaze,ChinaQuants/blaze,markflorisson/blaze-core,alexmojaki/blaze,alexmojaki/bl... | """
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
import blaze
from blaze.io.server.app import app
blaze.catalog.load_config(sys.argv[1])
app.run(port=int(sys.argv[2]), use_reloader=False)
Add exception hook to help diagnose server test errors in ... | """
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
if os.name == 'nt':
old_excepthook = sys.excepthook
# Exclude this from our autogenerated API docs.
undoc = lambda func: func
@undoc
def gui_excepthook(exctype, value, tb):
... | <commit_before>"""
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
import blaze
from blaze.io.server.app import app
blaze.catalog.load_config(sys.argv[1])
app.run(port=int(sys.argv[2]), use_reloader=False)
<commit_msg>Add exception hook to help diag... | """
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
if os.name == 'nt':
old_excepthook = sys.excepthook
# Exclude this from our autogenerated API docs.
undoc = lambda func: func
@undoc
def gui_excepthook(exctype, value, tb):
... | """
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
import blaze
from blaze.io.server.app import app
blaze.catalog.load_config(sys.argv[1])
app.run(port=int(sys.argv[2]), use_reloader=False)
Add exception hook to help diagnose server test errors in ... | <commit_before>"""
Starts a Blaze server for tests.
$ start_test_server.py /path/to/catalog_config.yaml <portnumber>
"""
import sys, os
import blaze
from blaze.io.server.app import app
blaze.catalog.load_config(sys.argv[1])
app.run(port=int(sys.argv[2]), use_reloader=False)
<commit_msg>Add exception hook to help diag... |
95bde4f783a4d11627d8bc64e24b383e945bdf01 | src/web/tags.py | src/web/tags.py | # -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
#CDN_URL = 'https://cdn.crate.io'
CDN_URL = 'http://localhost:8001'
def media(context, m... | # -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
CDN_URL = 'https://cdn.crate.io'
def media(context, media_url):
"""
Get the path... | Revert local CDN location set by Jodok | Revert local CDN location set by Jodok
| Python | apache-2.0 | crate/crate-web,jomolinare/crate-web,crate/crate-web,crate/crate-web,jomolinare/crate-web,jomolinare/crate-web | # -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
#CDN_URL = 'https://cdn.crate.io'
CDN_URL = 'http://localhost:8001'
def media(context, m... | # -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
CDN_URL = 'https://cdn.crate.io'
def media(context, media_url):
"""
Get the path... | <commit_before># -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
#CDN_URL = 'https://cdn.crate.io'
CDN_URL = 'http://localhost:8001'
def m... | # -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
CDN_URL = 'https://cdn.crate.io'
def media(context, media_url):
"""
Get the path... | # -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
#CDN_URL = 'https://cdn.crate.io'
CDN_URL = 'http://localhost:8001'
def media(context, m... | <commit_before># -*- coding: utf-8 -*-
# vim: set fileencodings=utf-8
__docformat__ = "reStructuredText"
import json
import datetime
from django.template.base import Library
from django.utils.safestring import mark_safe
register = Library()
#CDN_URL = 'https://cdn.crate.io'
CDN_URL = 'http://localhost:8001'
def m... |
8d8002062a0ecbf3720870d7561670a8c7e98da2 | test/stores/test_auth_tokens_store.py | test/stores/test_auth_tokens_store.py | from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
def test_g... | from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
def test_g... | Fix test for auth tokens store | Fix test for auth tokens store
| Python | agpl-3.0 | cgwire/zou | from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
def test_g... | from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
def test_g... | <commit_before>from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
... | from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
def test_g... | from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
def test_g... | <commit_before>from test.base import ApiTestCase
from zou.app.stores import auth_tokens_store
class CommandsTestCase(ApiTestCase):
def setUp(self):
super(CommandsTestCase, self).setUp()
self.store = auth_tokens_store
self.store.clear()
def tearDown(self):
self.store.clear()
... |
7ba77209687ae1bb1344cc09e3539f7e21bfe599 | tests/test_utilities/test_csvstack.py | tests/test_utilities/test_csvstack.py | #!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "examples/dummy.c... | #!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "examples/dummy.c... | Improve test of csvstack --filenames. | Improve test of csvstack --filenames.
| Python | mit | unpingco/csvkit,snuggles08/csvkit,doganmeh/csvkit,aequitas/csvkit,themiurgo/csvkit,bradparks/csvkit__query_join_filter_CSV_cli,matterker/csvkit,archaeogeek/csvkit,metasoarous/csvkit,jpalvarezf/csvkit,kyeoh/csvkit,nriyer/csvkit,gepuro/csvkit,bmispelon/csvkit,KarrieK/csvkit,Tabea-K/csvkit,moradology/csvkit,tlevine/csvkit... | #!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "examples/dummy.c... | #!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "examples/dummy.c... | <commit_before>#!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "e... | #!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "examples/dummy.c... | #!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "examples/dummy.c... | <commit_before>#!/usr/bin/env python
import sys
import StringIO
import unittest
from csvkit import CSVKitReader
from csvkit.utilities.stack import CSVStack
class TestCSVStack(unittest.TestCase):
def test_explicit_grouping(self):
# stack two CSV files
args = ["--groups", "asd,sdf", "-n", "foo", "e... |
585317f3a03f55f6487a98446d4a9279f91714d2 | tests/test_vector2_scalar_multiplication.py | tests/test_vector2_scalar_multiplication.py | import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3, Vector2(0, 0))... | import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3, Vector2(0, 0))... | Add a test of the linearity of scalar multiplication | Add a test of the linearity of scalar multiplication
| Python | artistic-2.0 | ppb/ppb-vector,ppb/ppb-vector | import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3, Vector2(0, 0))... | import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3, Vector2(0, 0))... | <commit_before>import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3,... | import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3, Vector2(0, 0))... | import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3, Vector2(0, 0))... | <commit_before>import pytest # type: ignore
from hypothesis import given
from hypothesis.strategies import floats
from utils import vectors
from ppb_vector import Vector2
@pytest.mark.parametrize("x, y, expected", [
(Vector2(6, 1), 0, Vector2(0, 0)),
(Vector2(6, 1), 2, Vector2(12, 2)),
(Vector2(0, 0), 3,... |
aa5259efac8f7fbe8e2afd263198feaaa45fc4c3 | tingbot/platform_specific/__init__.py | tingbot/platform_specific/__init__.py | import platform
def is_tingbot():
"""return True if running as a tingbot. We can update this function to be more smart in future"""
return platform.machine().startswith('armv71')
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, register_button_callback
elif is_tingbot():
... | import platform, os
def is_tingbot():
"""
Return True if running as a tingbot.
"""
# TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps.
return 'TB_RUN_ON_LCD' in os.environ
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, regi... | Change test for running on Tingbot | Change test for running on Tingbot
| Python | bsd-2-clause | furbrain/tingbot-python | import platform
def is_tingbot():
"""return True if running as a tingbot. We can update this function to be more smart in future"""
return platform.machine().startswith('armv71')
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, register_button_callback
elif is_tingbot():
... | import platform, os
def is_tingbot():
"""
Return True if running as a tingbot.
"""
# TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps.
return 'TB_RUN_ON_LCD' in os.environ
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, regi... | <commit_before>import platform
def is_tingbot():
"""return True if running as a tingbot. We can update this function to be more smart in future"""
return platform.machine().startswith('armv71')
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, register_button_callback
elif ... | import platform, os
def is_tingbot():
"""
Return True if running as a tingbot.
"""
# TB_RUN_ON_LCD is an environment variable set by tbprocessd when running tingbot apps.
return 'TB_RUN_ON_LCD' in os.environ
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, regi... | import platform
def is_tingbot():
"""return True if running as a tingbot. We can update this function to be more smart in future"""
return platform.machine().startswith('armv71')
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, register_button_callback
elif is_tingbot():
... | <commit_before>import platform
def is_tingbot():
"""return True if running as a tingbot. We can update this function to be more smart in future"""
return platform.machine().startswith('armv71')
if platform.system() == 'Darwin':
from osx import fixup_env, create_main_surface, register_button_callback
elif ... |
16c1ae09e0288036aae87eb4337c24b23b1e6638 | classify.py | classify.py | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neighbors import KNeighborsRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
import time
from analyze import Analyzer # for some train data labelling
def m... | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
from analyze import Analyzer # for some train data labelling
def main(argv):
group = argv[0] if len(argv) > 0 else "id"
... | Clean up some unused imports and comments | Clean up some unused imports and comments
| Python | mit | timvandermeij/sentiment-analysis,timvandermeij/sentiment-analysis | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neighbors import KNeighborsRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
import time
from analyze import Analyzer # for some train data labelling
def m... | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
from analyze import Analyzer # for some train data labelling
def main(argv):
group = argv[0] if len(argv) > 0 else "id"
... | <commit_before>from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neighbors import KNeighborsRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
import time
from analyze import Analyzer # for some train data l... | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
from analyze import Analyzer # for some train data labelling
def main(argv):
group = argv[0] if len(argv) > 0 else "id"
... | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neighbors import KNeighborsRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
import time
from analyze import Analyzer # for some train data labelling
def m... | <commit_before>from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neighbors import KNeighborsRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
import numpy as np
import json
import sys
import time
from analyze import Analyzer # for some train data l... |
4f3d1e90ec4af618ada415f53ddd9eec42bafb38 | wafer/talks/tests/test_wafer_basic_talks.py | wafer/talks/tests/test_wafer_basic_talks.py | # This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
talk = Talks... | # This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
talk = ... | Indent with 4 spaces, not 3 | Indent with 4 spaces, not 3
| Python | isc | CTPUG/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer | # This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
talk = Talks... | # This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
talk = ... | <commit_before># This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
... | # This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
talk = ... | # This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
talk = Talks... | <commit_before># This tests the very basic talk stuff, to ensure some levels of sanity
def test_add_talk():
"""Create a user and add a talk to it"""
from django.contrib.auth.models import User
from wafer.talks.models import Talks
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
... |
3685715cd260f4f5ca392caddf7fb0c01af9ebcc | mzalendo/comments2/feeds.py | mzalendo/comments2/feeds.py | from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
return Person.objects.a... | from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person, Place, Organisation
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
li... | Add in comments for orgs and places too, remove limit | Add in comments for orgs and places too, remove limit
| Python | agpl-3.0 | mysociety/pombola,Hutspace/odekro,ken-muturi/pombola,mysociety/pombola,Hutspace/odekro,patricmutwiri/pombola,geoffkilpin/pombola,patricmutwiri/pombola,mysociety/pombola,ken-muturi/pombola,ken-muturi/pombola,ken-muturi/pombola,mysociety/pombola,mysociety/pombola,patricmutwiri/pombola,geoffkilpin/pombola,geoffkilpin/pomb... | from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
return Person.objects.a... | from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person, Place, Organisation
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
li... | <commit_before>from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
return P... | from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person, Place, Organisation
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
li... | from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
return Person.objects.a... | <commit_before>from disqus.wxr_feed import ContribCommentsWxrFeed
# from comments2.models import Comment
from core.models import Person
# http://help.disqus.com/customer/portal/articles/472150-custom-xml-import-format
class CommentWxrFeed(ContribCommentsWxrFeed):
link = "/"
def items(self):
return P... |
f3da1fab9af2279182a09922aae00fcee73a92ee | goog/middleware.py | goog/middleware.py | from django.conf import settings
from django.conf.urls.defaults import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
"""Returns True iff the devmode is enabled."""
return utils.is_devmode()
def process_r... | from django.conf import settings
try:
from django.conf.urls.defaults import patterns, include
except ImportError: # Django >= 1.6
from django.conf.urls import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
""... | Fix imports for Django >= 1.6 | Fix imports for Django >= 1.6
| Python | bsd-3-clause | andialbrecht/django-goog | from django.conf import settings
from django.conf.urls.defaults import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
"""Returns True iff the devmode is enabled."""
return utils.is_devmode()
def process_r... | from django.conf import settings
try:
from django.conf.urls.defaults import patterns, include
except ImportError: # Django >= 1.6
from django.conf.urls import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
""... | <commit_before>from django.conf import settings
from django.conf.urls.defaults import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
"""Returns True iff the devmode is enabled."""
return utils.is_devmode()
... | from django.conf import settings
try:
from django.conf.urls.defaults import patterns, include
except ImportError: # Django >= 1.6
from django.conf.urls import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
""... | from django.conf import settings
from django.conf.urls.defaults import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
"""Returns True iff the devmode is enabled."""
return utils.is_devmode()
def process_r... | <commit_before>from django.conf import settings
from django.conf.urls.defaults import patterns, include
import goog.urls
from goog import utils
class GoogDevelopmentMiddleware(object):
def devmode_enabled(self, request):
"""Returns True iff the devmode is enabled."""
return utils.is_devmode()
... |
61cf4e2feb3d8920179e28719822c7fb34ea6550 | 3/ibm_rng.py | 3/ibm_rng.py | def ibm_rng(x1, a, c, m):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
| def ibm_rng(x1, a=65539, c=0, m=2**31):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
| Add defaults to the ibm RNG | Add defaults to the ibm RNG
| Python | mit | JelteF/statistics | def ibm_rng(x1, a, c, m):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
Add defaults to the ibm RNG | def ibm_rng(x1, a=65539, c=0, m=2**31):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
| <commit_before>def ibm_rng(x1, a, c, m):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
<commit_msg>Add defaults to the ibm RNG<commit_after... | def ibm_rng(x1, a=65539, c=0, m=2**31):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
| def ibm_rng(x1, a, c, m):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
Add defaults to the ibm RNGdef ibm_rng(x1, a=65539, c=0, m=2**31):
... | <commit_before>def ibm_rng(x1, a, c, m):
x = x1
while True:
x = (a * x + c) % m
yield x / (m-1)
def main():
rng = ibm_rng(1, 65539, 0, 2**31)
while True:
x = next(rng)
print(x)
if __name__ == '__main__':
main()
<commit_msg>Add defaults to the ibm RNG<commit_after... |
db3cee63baf64d00b2d2ac4fcf726f287b6d7af2 | app/proxy_fix.py | app/proxy_fix.py | from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
environ.update({
"HTTP_X_FORWARDED_PROTO"... | from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app, x_for=1, x_proto=1, x_host=1, x_port=0, x_prefix=0)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
e... | Update call to proxy fix to use new method signature | Update call to proxy fix to use new method signature
Old method:
```python
ProxyFix(app, num_proxies=1)
```
https://werkzeug.palletsprojects.com/en/0.14.x/contrib/fixers/#werkzeug.contrib.fixers.ProxyFix
This uses forwarded values for `REMOTE_ADDR` and `HTTP_HOST`.
New method:
```python
ProxyFix(app, num_proxies=No... | Python | mit | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
environ.update({
"HTTP_X_FORWARDED_PROTO"... | from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app, x_for=1, x_proto=1, x_host=1, x_port=0, x_prefix=0)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
e... | <commit_before>from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
environ.update({
"HTTP_X_F... | from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app, x_for=1, x_proto=1, x_host=1, x_port=0, x_prefix=0)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
e... | from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
environ.update({
"HTTP_X_FORWARDED_PROTO"... | <commit_before>from werkzeug.middleware.proxy_fix import ProxyFix
class CustomProxyFix(object):
def __init__(self, app, forwarded_proto):
self.app = ProxyFix(app)
self.forwarded_proto = forwarded_proto
def __call__(self, environ, start_response):
environ.update({
"HTTP_X_F... |
34c0c6c73a65da3120aa52600254afc909e9a3bc | pytach/wsgi.py | pytach/wsgi.py | import bottle
from bottle import route, run
from web import web
import config
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8082, debug=True)
| import bottle
import config
from web import web
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
| Remove unused main and unused imports | Remove unused main and unused imports
| Python | mit | gotling/PyTach,gotling/PyTach,gotling/PyTach | import bottle
from bottle import route, run
from web import web
import config
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8082, debug=True)
Remove unused main and unused imports | import bottle
import config
from web import web
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
| <commit_before>import bottle
from bottle import route, run
from web import web
import config
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8082, debug=True)
<commit_msg>Remove unused main and unused imports<commit_... | import bottle
import config
from web import web
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
| import bottle
from bottle import route, run
from web import web
import config
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8082, debug=True)
Remove unused main and unused importsimport bottle
import config
from w... | <commit_before>import bottle
from bottle import route, run
from web import web
import config
app = application = bottle.Bottle()
app.merge(web.app)
config.arguments['--verbose'] = True
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8082, debug=True)
<commit_msg>Remove unused main and unused imports<commit_... |
d86bdec5d7d57fe74cb463e391798bd1e5be87ff | pombola/ghana/urls.py | pombola/ghana/urls.py | from django.conf.urls import patterns, include, url, handler404
from django.views.generic import TemplateView
import django.contrib.auth.views
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^data/upload/mps/... | from django.conf.urls import patterns, url, include
from django.views.generic import TemplateView
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^data/upload/mps/$', data_upload, name='data_upload'),
url(... | Update Ghana code to match current Pombola | Update Ghana code to match current Pombola
| Python | agpl-3.0 | geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,geoffkilpin/pombola,geoffkilpin/pombola,geoffkilpin/pombola,geoffkilpin/pombola,geoffkilpin/pombola,mysociety/pombola | from django.conf.urls import patterns, include, url, handler404
from django.views.generic import TemplateView
import django.contrib.auth.views
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^data/upload/mps/... | from django.conf.urls import patterns, url, include
from django.views.generic import TemplateView
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^data/upload/mps/$', data_upload, name='data_upload'),
url(... | <commit_before>from django.conf.urls import patterns, include, url, handler404
from django.views.generic import TemplateView
import django.contrib.auth.views
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^d... | from django.conf.urls import patterns, url, include
from django.views.generic import TemplateView
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^data/upload/mps/$', data_upload, name='data_upload'),
url(... | from django.conf.urls import patterns, include, url, handler404
from django.views.generic import TemplateView
import django.contrib.auth.views
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^data/upload/mps/... | <commit_before>from django.conf.urls import patterns, include, url, handler404
from django.views.generic import TemplateView
import django.contrib.auth.views
from .views import data_upload, info_page_upload
urlpatterns = patterns('',
url(r'^intro$', TemplateView.as_view(template_name='intro.html')),
url(r'^d... |
5526f8e3dca2f84fce34df5a134bada8479a2f69 | netbox/ipam/models/__init__.py | netbox/ipam/models/__init__.py | from .fhrp import *
from .ip import *
from .services import *
from .vlans import *
from .vrfs import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefix',
'RIR',
'Role',
'RouteTarget',
'Service',
'ServiceTemplate',
'V... | # Ensure that VRFs are imported before IPs/prefixes so dumpdata & loaddata work correctly
from .fhrp import *
from .vrfs import *
from .ip import *
from .services import *
from .vlans import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefi... | Fix dumpdata ordering for VRFs | Fix dumpdata ordering for VRFs
| Python | apache-2.0 | digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox | from .fhrp import *
from .ip import *
from .services import *
from .vlans import *
from .vrfs import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefix',
'RIR',
'Role',
'RouteTarget',
'Service',
'ServiceTemplate',
'V... | # Ensure that VRFs are imported before IPs/prefixes so dumpdata & loaddata work correctly
from .fhrp import *
from .vrfs import *
from .ip import *
from .services import *
from .vlans import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefi... | <commit_before>from .fhrp import *
from .ip import *
from .services import *
from .vlans import *
from .vrfs import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefix',
'RIR',
'Role',
'RouteTarget',
'Service',
'ServiceTe... | # Ensure that VRFs are imported before IPs/prefixes so dumpdata & loaddata work correctly
from .fhrp import *
from .vrfs import *
from .ip import *
from .services import *
from .vlans import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefi... | from .fhrp import *
from .ip import *
from .services import *
from .vlans import *
from .vrfs import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefix',
'RIR',
'Role',
'RouteTarget',
'Service',
'ServiceTemplate',
'V... | <commit_before>from .fhrp import *
from .ip import *
from .services import *
from .vlans import *
from .vrfs import *
__all__ = (
'ASN',
'Aggregate',
'IPAddress',
'IPRange',
'FHRPGroup',
'FHRPGroupAssignment',
'Prefix',
'RIR',
'Role',
'RouteTarget',
'Service',
'ServiceTe... |
0782ba56218e825dea5b76cbf030a522932bcfd6 | networkx/classes/ordered.py | networkx/classes/ordered.py | """
OrderedDict variants of the default base classes.
These classes are especially useful for doctests and unit tests.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDic... | """
OrderedDict variants of the default base classes.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDict = None
from .graph import Graph
from .multigraph import MultiGr... | Remove unnecessary (and debatable) comment. | Remove unnecessary (and debatable) comment.
| Python | bsd-3-clause | nathania/networkx,dhimmel/networkx,RMKD/networkx,sharifulgeo/networkx,chrisnatali/networkx,goulu/networkx,farhaanbukhsh/networkx,jni/networkx,jakevdp/networkx,ionanrozenfeld/networkx,debsankha/networkx,nathania/networkx,tmilicic/networkx,kernc/networkx,ltiao/networkx,michaelpacer/networkx,bzero/networkx,dhimmel/network... | """
OrderedDict variants of the default base classes.
These classes are especially useful for doctests and unit tests.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDic... | """
OrderedDict variants of the default base classes.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDict = None
from .graph import Graph
from .multigraph import MultiGr... | <commit_before>"""
OrderedDict variants of the default base classes.
These classes are especially useful for doctests and unit tests.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
... | """
OrderedDict variants of the default base classes.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDict = None
from .graph import Graph
from .multigraph import MultiGr... | """
OrderedDict variants of the default base classes.
These classes are especially useful for doctests and unit tests.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDic... | <commit_before>"""
OrderedDict variants of the default base classes.
These classes are especially useful for doctests and unit tests.
"""
try:
# Python 2.7+
from collections import OrderedDict
except ImportError:
# Oython 2.6
try:
from ordereddict import OrderedDict
except ImportError:
... |
603c36aec2a4704bb4cf41c224194a5f83f9babe | sale_payment_method_automatic_workflow/__openerp__.py | sale_payment_method_automatic_workflow/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | Set the module as auto_install | Set the module as auto_install
So it installs when both sale_payment_method and sale_automatic_workflow are installed.
This module acts as the glue between them
| Python | agpl-3.0 | BT-ojossen/e-commerce,Antiun/e-commerce,raycarnes/e-commerce,jt-xx/e-commerce,gurneyalex/e-commerce,BT-ojossen/e-commerce,Endika/e-commerce,damdam-s/e-commerce,vauxoo-dev/e-commerce,charbeljc/e-commerce,brain-tec/e-commerce,BT-jmichaud/e-commerce,Endika/e-commerce,brain-tec/e-commerce,JayVora-SerpentCS/e-commerce,fevxi... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lic... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lic... |
4a6060f476aebac163dbac8f9822539596379c0a | welt2000/__init__.py | welt2000/__init__.py | from flask import Flask, request, session
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
babel = Babel(a... | from flask import Flask, request, session, current_app
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
ba... | Use current_app.babel_instance instead of babel | app: Use current_app.babel_instance instead of babel
That way we can use Babel.init_app() later
| Python | mit | Turbo87/welt2000,Turbo87/welt2000 | from flask import Flask, request, session
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
babel = Babel(a... | from flask import Flask, request, session, current_app
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
ba... | <commit_before>from flask import Flask, request, session
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
... | from flask import Flask, request, session, current_app
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
ba... | from flask import Flask, request, session
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
babel = Babel(a... | <commit_before>from flask import Flask, request, session
from flask.ext.babel import Babel
from babel.core import negotiate_locale
from welt2000.__about__ import (
__title__, __summary__, __uri__, __version__, __author__, __email__,
__license__,
) # noqa
app = Flask(__name__)
app.secret_key = '1234567890'
... |
6f0740fbd94acc2398f0628552a6329c2a90a348 | greengraph/command.py | greengraph/command.py | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
he... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True, nargs="+",
... | Allow start and end arguments to take inputs of multiple words such as 'New York' | Allow start and end arguments to take inputs of multiple words such as 'New York'
| Python | mit | MikeVasmer/GreenGraphCoursework | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
he... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True, nargs="+",
... | <commit_before>from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True, nargs="+",
... | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
he... | <commit_before>from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True,
... |
4bb8a61cde27575865cdd2b7df5afcb5d6860523 | fmriprep/interfaces/tests/test_reports.py | fmriprep/interfaces/tests/test_reports.py | import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('RAS', 'k-', 'Sup... | import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('RAS', 'k-', 'Sup... | Add weird SLP orientation to get_world_pedir | TEST: Add weird SLP orientation to get_world_pedir
| Python | bsd-3-clause | oesteban/fmriprep,poldracklab/preprocessing-workflow,oesteban/fmriprep,poldracklab/preprocessing-workflow,oesteban/fmriprep | import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('RAS', 'k-', 'Sup... | import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('RAS', 'k-', 'Sup... | <commit_before>import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('R... | import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('RAS', 'k-', 'Sup... | import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('RAS', 'k-', 'Sup... | <commit_before>import pytest
from ..reports import get_world_pedir
@pytest.mark.parametrize("orientation,pe_dir,expected", [
('RAS', 'j', 'Posterior-Anterior'),
('RAS', 'j-', 'Anterior-Posterior'),
('RAS', 'i', 'Left-Right'),
('RAS', 'i-', 'Right-Left'),
('RAS', 'k', 'Inferior-Superior'),
('R... |
95ea1d7d6564bcbb2e3b8d2ba254ccd2c1c38436 | mamba/__init__.py | mamba/__init__.py | __version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
| __version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def fdescription(message):
pass
def it(message):
pass
def _it(message):
pass
def fit(message):
pass
def context(message):
pass
def _context(message):
pass
def fcontext(message):
pas... | Add import for focused stuff | Add import for focused stuff
| Python | mit | nestorsalceda/mamba | __version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
Add import for focused stuff | __version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def fdescription(message):
pass
def it(message):
pass
def _it(message):
pass
def fit(message):
pass
def context(message):
pass
def _context(message):
pass
def fcontext(message):
pas... | <commit_before>__version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
<commit_msg>Add import for focused ... | __version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def fdescription(message):
pass
def it(message):
pass
def _it(message):
pass
def fit(message):
pass
def context(message):
pass
def _context(message):
pass
def fcontext(message):
pas... | __version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
Add import for focused stuff__version__ = '0.9.2'
... | <commit_before>__version__ = '0.9.2'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
<commit_msg>Add import for focused ... |
29e491c5505d2068b46eb489044455968e53ab70 | test/400-bay-water.py | test/400-bay-water.py | assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
| # osm_id: 43950409 name: San Pablo Bay
assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
# osm_id: 360566115 name: Byron strait
assert_has_feature(
14, 15043, 8311, 'water',
{ 'kind': 'strait', 'label_placement': 'yes' })
# osm_id: -1451065 name: Horsens Fjord
a... | Add tests for strait and fjord | Add tests for strait and fjord
| Python | mit | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
Add tests for strait and fjord | # osm_id: 43950409 name: San Pablo Bay
assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
# osm_id: 360566115 name: Byron strait
assert_has_feature(
14, 15043, 8311, 'water',
{ 'kind': 'strait', 'label_placement': 'yes' })
# osm_id: -1451065 name: Horsens Fjord
a... | <commit_before>assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
<commit_msg>Add tests for strait and fjord<commit_after> | # osm_id: 43950409 name: San Pablo Bay
assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
# osm_id: 360566115 name: Byron strait
assert_has_feature(
14, 15043, 8311, 'water',
{ 'kind': 'strait', 'label_placement': 'yes' })
# osm_id: -1451065 name: Horsens Fjord
a... | assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
Add tests for strait and fjord# osm_id: 43950409 name: San Pablo Bay
assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
# osm_id: 360566115 name: Byron strait
assert_has_feat... | <commit_before>assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
<commit_msg>Add tests for strait and fjord<commit_after># osm_id: 43950409 name: San Pablo Bay
assert_has_feature(
14, 2623, 6318, 'water',
{ 'kind': 'bay', 'label_placement': 'yes' })
# osm_id: 360... |
cdf545cf9385a0490590cd0162141025a1301c09 | track/config.py | track/config.py | import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... | import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... | Use argparse formatter RawDescriptionHelpFormatter, maybe temporarily | Use argparse formatter RawDescriptionHelpFormatter, maybe temporarily
| Python | mit | bgottula/track,bgottula/track | import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... | import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... | <commit_before>import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... | import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... | import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... | <commit_before>import configargparse
DEFAULT_CONFIG_FILES=[
'./track.cfg',
'~/.track.cfg',
]
# Bit of a cheat... not actually an object constructor, just a 'make me an object' method
def ArgParser():
return configargparse.ArgParser(
ignore_unknown_config_file_keys =True,
allow_abbrev ... |
148d4c44a9eb63016b469c6bf317a3dbe9ed7918 | permuta/permutations.py | permuta/permutations.py | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
def __init__(self, n):
assert 0 <= n
self.n = n
def __iter__(self):
left = DancingLinks(range(1, self.n+1))
res = []
def gen():
if len(left) == 0:
... | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
"""Class for iterating through all Permutations of length n"""
def __init__(self, n):
"""Returns an object giving all permutations of length n"""
assert 0 <= n
self.n = n
... | Add documentation for Permutations class | Add documentation for Permutations class
| Python | bsd-3-clause | PermutaTriangle/Permuta | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
def __init__(self, n):
assert 0 <= n
self.n = n
def __iter__(self):
left = DancingLinks(range(1, self.n+1))
res = []
def gen():
if len(left) == 0:
... | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
"""Class for iterating through all Permutations of length n"""
def __init__(self, n):
"""Returns an object giving all permutations of length n"""
assert 0 <= n
self.n = n
... | <commit_before>from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
def __init__(self, n):
assert 0 <= n
self.n = n
def __iter__(self):
left = DancingLinks(range(1, self.n+1))
res = []
def gen():
if l... | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
"""Class for iterating through all Permutations of length n"""
def __init__(self, n):
"""Returns an object giving all permutations of length n"""
assert 0 <= n
self.n = n
... | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
def __init__(self, n):
assert 0 <= n
self.n = n
def __iter__(self):
left = DancingLinks(range(1, self.n+1))
res = []
def gen():
if len(left) == 0:
... | <commit_before>from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
def __init__(self, n):
assert 0 <= n
self.n = n
def __iter__(self):
left = DancingLinks(range(1, self.n+1))
res = []
def gen():
if l... |
86791effb26c33514bbc6713f67a903e8d9e5295 | scripts/c19.py | scripts/c19.py | from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import lit, col, coalesce
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.builder.appName('... | from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import col, struct, max
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.builder.appName('Se... | Choose a single corpus for a given series,date pair. | Choose a single corpus for a given series,date pair.
| Python | apache-2.0 | ViralTexts/vt-passim,ViralTexts/vt-passim,ViralTexts/vt-passim | from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import lit, col, coalesce
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.builder.appName('... | from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import col, struct, max
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.builder.appName('Se... | <commit_before>from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import lit, col, coalesce
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.bu... | from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import col, struct, max
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.builder.appName('Se... | from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import lit, col, coalesce
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.builder.appName('... | <commit_before>from __future__ import print_function
import sys
from pyspark.sql import SparkSession
from pyspark.sql.functions import lit, col, coalesce
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: c19.py <input> <output>", file=sys.stderr)
exit(-1)
spark = SparkSession.bu... |
54c48073dfb8ffd418efe234c0c107f7a5c303a9 | svg/templatetags/svg.py | svg/templatetags/svg.py | import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Library()
@register.simple_tag
def svg(f... | from __future__ import absolute_import
import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Lib... | Fix failing imports in Python 2 | Fix failing imports in Python 2
| Python | mit | mixxorz/django-inline-svg | import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Library()
@register.simple_tag
def svg(f... | from __future__ import absolute_import
import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Lib... | <commit_before>import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Library()
@register.simpl... | from __future__ import absolute_import
import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Lib... | import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Library()
@register.simple_tag
def svg(f... | <commit_before>import logging
import os
from django import template
from django.conf import settings
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
from svg.exceptions import SVGNotFound
logger = logging.getLogger(__name__)
register = template.Library()
@register.simpl... |
7b4531ec867982ba2f660a2a08e85dbae457083e | users/models.py | users/models.py | import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
default = "https://... | import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
default = "https://... | Fix new line stripping in admin site | Fix new line stripping in admin site
Closes #87
| Python | isc | ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite | import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
default = "https://... | import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
default = "https://... | <commit_before>import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
defa... | import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
default = "https://... | import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
default = "https://... | <commit_before>import hashlib
import urllib.parse as urllib
from django.contrib.auth.models import User
from django.db import models
# extension to django's User class which has authentication details
# as well as some basic info such as name
class Member(models.Model):
def gravatar(self, size=128):
defa... |
390fa07c191d79290b1ef83c268f38431f68093a | tests/clients/simple.py | tests/clients/simple.py | # -*- coding: utf-8 -*-
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
| # -*- coding: utf-8 -*-
import os
import sys
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) ... | Fix import in test client. | Fix import in test client.
| Python | mit | riga/jsonrpyc | # -*- coding: utf-8 -*-
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
Fix import in test... | # -*- coding: utf-8 -*-
import os
import sys
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) ... | <commit_before># -*- coding: utf-8 -*-
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
<co... | # -*- coding: utf-8 -*-
import os
import sys
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) ... | # -*- coding: utf-8 -*-
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
Fix import in test... | <commit_before># -*- coding: utf-8 -*-
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
<co... |
73d0be7a432340b4ecd140ad1cc8792d3f049779 | tests/factories/user.py | tests/factories/user.py | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User
from... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User
from... | Use SelfAttribute instead of explicit lambda | Use SelfAttribute instead of explicit lambda
| Python | apache-2.0 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User
from... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User
from... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user i... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User
from... | # -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user import User
from... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
import factory
from factory.faker import Faker
from pycroft.model.user i... |
2c37ed091baf12e53885bfa06fdb835bb8de1218 | tests/skipif_markers.py | tests/skipif_markers.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS']
except KeyErr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS']
except KeyErr... | Add Bitbucket to skipif marker reason | Add Bitbucket to skipif marker reason
| Python | bsd-3-clause | pjbull/cookiecutter,atlassian/cookiecutter,sp1rs/cookiecutter,0k/cookiecutter,cichm/cookiecutter,takeflight/cookiecutter,atlassian/cookiecutter,kkujawinski/cookiecutter,foodszhang/cookiecutter,christabor/cookiecutter,ramiroluz/cookiecutter,cguardia/cookiecutter,tylerdave/cookiecutter,benthomasson/cookiecutter,Springerl... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS']
except KeyErr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS']
except KeyErr... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS'... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS']
except KeyErr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS']
except KeyErr... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS'... |
44dac786339716ad8cc05f6790b73b5fc47be812 | config/jinja2.py | config/jinja2.py | from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n',], **options)
env.g... | from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n'], **options)
env.gl... | Remove extra comma to avoid flake8 test failure in CircleCI | Remove extra comma to avoid flake8 test failure in CircleCI
| Python | agpl-3.0 | yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core | from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n',], **options)
env.g... | from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n'], **options)
env.gl... | <commit_before>from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n',], **opt... | from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n'], **options)
env.gl... | from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n',], **options)
env.g... | <commit_before>from django.urls import reverse
from django.utils import translation
from django.template.backends.jinja2 import Jinja2
from jinja2 import Environment
class FoodsavingJinja2(Jinja2):
app_dirname = 'templates'
def environment(**options):
env = Environment(extensions=['jinja2.ext.i18n',], **opt... |
6e67a9e8eedd959d9d0193e746a375099e9784ef | toodlepip/consoles.py | toodlepip/consoles.py | class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=False, cwd=None):
... | class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=False, cwd=None):
... | Use bytes instead of str where appropriate for Python 3 | Use bytes instead of str where appropriate for Python 3
| Python | bsd-2-clause | mwilliamson/toodlepip | class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=False, cwd=None):
... | class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=False, cwd=None):
... | <commit_before>class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=Fal... | class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=False, cwd=None):
... | class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=False, cwd=None):
... | <commit_before>class Console(object):
def __init__(self, shell, stdout):
self._shell = shell
self._stdout = stdout
def run(self, description, command, **kwargs):
return self.run_all(description, [command], **kwargs)
def run_all(self, description, commands, quiet=Fal... |
1df8efb63333e89777820a96d78d5a59252b303d | tests/test_config.py | tests/test_config.py | import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], 'db.heck.ya')
... | import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load_with_gpg(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], 'db.hec... | Rename test specific to with gpg | Rename test specific to with gpg
| Python | mit | theherk/figgypy | import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], 'db.heck.ya')
... | import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load_with_gpg(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], 'db.hec... | <commit_before>import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], '... | import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load_with_gpg(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], 'db.hec... | import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], 'db.heck.ya')
... | <commit_before>import unittest
import figgypy.config
import sys
import os
class TestConfig(unittest.TestCase):
def test_config_load(self):
os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys'
c = figgypy.config.Config('tests/resources/test-config.yaml')
self.assertEqual(c.db['host'], '... |
66eddf04efd46fb3dbeae34c4d82f673a88be70f | tests/test_person.py | tests/test_person.py | from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
person = Pers... | from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
person = Pers... | Test the ability to add phone to the person | Test the ability to add phone to the person
| Python | mit | dizpers/python-address-book-assignment | from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
person = Pers... | from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
person = Pers... | <commit_before>from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
... | from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
person = Pers... | from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
person = Pers... | <commit_before>from copy import copy
from unittest import TestCase
from address_book import Person
class PersonTestCase(TestCase):
def test_get_groups(self):
pass
def test_add_address(self):
basic_address = ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42']
... |
3e84dcb7b449db89ca6ce2b91b34a5e8f8428b39 | core/markdown.py | core/markdown.py | from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.SaneListExtensi... | from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.SaneListExtensi... | Allow sub- and superscript tags | Allow sub- and superscript tags
| Python | agpl-3.0 | stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten | from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.SaneListExtensi... | from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.SaneListExtensi... | <commit_before>from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.... | from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.SaneListExtensi... | from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.SaneListExtensi... | <commit_before>from markdown.extensions import nl2br, sane_lists, fenced_code
from pymdownx import magiclink
from mdx_unimoji import UnimojiExtension
import utils.markdown
markdown_extensions = [
magiclink.MagiclinkExtension(),
nl2br.Nl2BrExtension(),
utils.markdown.ExtendedLinkExtension(),
sane_lists.... |
458d61ffb5161394f8080cea59716b2f9cb492f3 | nbgrader_config.py | nbgrader_config.py | c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '##### Implement this part of the code #####\nraise NotImplementedError()'}
| c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '''##### Implement this part of the code #####
raise NotImplementedError("Code not imp... | Add error message for not implemented error | Add error message for not implemented error
| Python | mit | pbutenee/ml-tutorial,pbutenee/ml-tutorial | c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '##### Implement this part of the code #####\nraise NotImplementedError()'}
Add error ... | c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '''##### Implement this part of the code #####
raise NotImplementedError("Code not imp... | <commit_before>c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '##### Implement this part of the code #####\nraise NotImplementedError... | c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '''##### Implement this part of the code #####
raise NotImplementedError("Code not imp... | c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '##### Implement this part of the code #####\nraise NotImplementedError()'}
Add error ... | <commit_before>c = get_config()
c.CourseDirectory.db_assignments = [dict(name="1", duedate="2019-12-09 17:00:00 UTC")]
c.CourseDirectory.db_students = [
dict(id="foo", first_name="foo", last_name="foo")
]
c.ClearSolutions.code_stub = {'python': '##### Implement this part of the code #####\nraise NotImplementedError... |
7c77a7b14432a85447ff74e7aa017ca56c86e662 | oidc_apis/views.py | oidc_apis/views.py | from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from .api_tokens import get_api_tokens_by_access_token
@require_http_methods(['GET', 'POST'])
@protected_resource_view(['openid'])
def get_api_tokens_v... | from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from django.views.decorators.csrf import csrf_exempt
from .api_tokens import get_api_tokens_by_access_token
@csrf_exempt
@require_http_methods(['GET', ... | Make api-tokens view exempt from CSRF checks | Make api-tokens view exempt from CSRF checks
| Python | mit | mikkokeskinen/tunnistamo,mikkokeskinen/tunnistamo | from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from .api_tokens import get_api_tokens_by_access_token
@require_http_methods(['GET', 'POST'])
@protected_resource_view(['openid'])
def get_api_tokens_v... | from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from django.views.decorators.csrf import csrf_exempt
from .api_tokens import get_api_tokens_by_access_token
@csrf_exempt
@require_http_methods(['GET', ... | <commit_before>from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from .api_tokens import get_api_tokens_by_access_token
@require_http_methods(['GET', 'POST'])
@protected_resource_view(['openid'])
def g... | from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from django.views.decorators.csrf import csrf_exempt
from .api_tokens import get_api_tokens_by_access_token
@csrf_exempt
@require_http_methods(['GET', ... | from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from .api_tokens import get_api_tokens_by_access_token
@require_http_methods(['GET', 'POST'])
@protected_resource_view(['openid'])
def get_api_tokens_v... | <commit_before>from django.http import JsonResponse
from django.views.decorators.http import require_http_methods
from oidc_provider.lib.utils.oauth2 import protected_resource_view
from .api_tokens import get_api_tokens_by_access_token
@require_http_methods(['GET', 'POST'])
@protected_resource_view(['openid'])
def g... |
f26c2059ff6e2a595097ef7a03efe149f9e253eb | iterator.py | iterator.py | import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
for key, line in enumerate(contents):
src = re.sear... | import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
if re.search('podcast', filename):
if re.s... | Add default images for podcasts if necessary | Add default images for podcasts if necessary
| Python | mit | up1/blog-1,up1/blog-1,up1/blog-1 | import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
for key, line in enumerate(contents):
src = re.sear... | import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
if re.search('podcast', filename):
if re.s... | <commit_before>import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
for key, line in enumerate(contents):
... | import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
if re.search('podcast', filename):
if re.s... | import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
for key, line in enumerate(contents):
src = re.sear... | <commit_before>import os, re, requests
rootdir = '_posts'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
filename = os.path.join(subdir, file)
f = open(filename, "r")
contents = f.readlines()
f.close()
# Find first image
for key, line in enumerate(contents):
... |
3f70ead379b7f586313d01d5ab617fd5368f8ce3 | cthulhubot/management/commands/restart_masters.py | cthulhubot/management/commands/restart_masters.py | from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))
commit = int(options.ge... | from traceback import print_exc
from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))... | Print traceback if startup fails | Print traceback if startup fails
| Python | bsd-3-clause | centrumholdings/cthulhubot | from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))
commit = int(options.ge... | from traceback import print_exc
from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))... | <commit_before>from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))
commit =... | from traceback import print_exc
from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))... | from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))
commit = int(options.ge... | <commit_before>from django.core.management.base import BaseCommand
from cthulhubot.models import Buildmaster
class Command(BaseCommand):
help = 'Restart all Buildmaster processes'
args = ""
def handle(self, *fixture_labels, **options):
verbosity = int(options.get('verbosity', 1))
commit =... |
355040c346ee26f763561529422b951e312e3db2 | profile/files/openstack/horizon/overrides.py | profile/files/openstack/horizon/overrides.py | # Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssoc... | # Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssoc... | Remove non-working network topology panel | Remove non-working network topology panel
| Python | apache-2.0 | eckhart/himlar,tanzr/himlar,TorLdre/himlar,mikaeld66/himlar,norcams/himlar,raykrist/himlar,eckhart/himlar,norcams/himlar,TorLdre/himlar,norcams/himlar,norcams/himlar,raykrist/himlar,mikaeld66/himlar,eckhart/himlar,TorLdre/himlar,tanzr/himlar,mikaeld66/himlar,tanzr/himlar,TorLdre/himlar,mikaeld66/himlar,eckhart/himlar,n... | # Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssoc... | # Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssoc... | <commit_before># Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tab... | # Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssoc... | # Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tables.SimpleAssoc... | <commit_before># Disable Floating IPs
from openstack_dashboard.dashboards.project.access_and_security import tabs
from openstack_dashboard.dashboards.project.instances import tables
import horizon
NO = lambda *x: False
tabs.FloatingIPsTab.allowed = NO
tabs.APIAccessTab.allowed = NO
tables.AssociateIP.allowed = NO
tab... |
dc229325a7a527c2d2143b105b47899140018e32 | darkoob/social/admin.py | darkoob/social/admin.py | from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user',)
# list_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex',ist_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex','birthplace')... | from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'sex')
search_fields = ('user',)
admin.site.register(UserProfile,UserProfileAdmin)
| Add UserProfile Model To Django Admin Website | Add UserProfile Model To Django Admin Website
| Python | mit | s1na/darkoob,s1na/darkoob,s1na/darkoob | from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user',)
# list_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex',ist_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex','birthplace')... | from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'sex')
search_fields = ('user',)
admin.site.register(UserProfile,UserProfileAdmin)
| <commit_before>from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user',)
# list_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex',ist_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex... | from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'sex')
search_fields = ('user',)
admin.site.register(UserProfile,UserProfileAdmin)
| from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user',)
# list_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex',ist_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex','birthplace')... | <commit_before>from django.contrib import admin
from models import UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user',)
# list_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex',ist_display = ('user','sex')
# search_fields = ('user',)
# list_filter = ('sex... |
3db23515437a0073cc374d5064f496c1d84e1bb7 | HotCIDR/setup.py | HotCIDR/setup.py | from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-setupall'],
#u... | from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-setupall'],
#u... | Update dependencies to actual version numbers | Update dependencies to actual version numbers
| Python | apache-2.0 | ViaSat/hotcidr | from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-setupall'],
#u... | from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-setupall'],
#u... | <commit_before>from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-set... | from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-setupall'],
#u... | from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-setupall'],
#u... | <commit_before>from distutils.core import setup
setup(
name='HotCIDR',
version='0.1.0',
author='ViaSat',
author_email='[email protected]',
packages=['hotcidr', 'hotcidr.test'],
scripts=['bin/hc-apply', 'bin/hc-audit', 'bin/hc-validate', 'bin/hc-fetch', 'bin/hc-deleteexpired','bin/hc-set... |
76709e594bd863476c4111185d98ca2551c460d3 | ds_graph.py | ds_graph.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Graph(object):
"""Graph class."""
pass
def main():
pass
if __name__ == '__main__':
main()
| from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Vertex(object):
"""Vertex class.
It uses a dict to keep track of the vertices which it's connected.
"""
class Graph(object):
"""Graph class.
It contains a dict to map vertex name to ver... | Add Vertex class and doc strings for 2 classes | Add Vertex class and doc strings for 2 classes
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Graph(object):
"""Graph class."""
pass
def main():
pass
if __name__ == '__main__':
main()
Add Vertex class and doc strings for 2 classes | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Vertex(object):
"""Vertex class.
It uses a dict to keep track of the vertices which it's connected.
"""
class Graph(object):
"""Graph class.
It contains a dict to map vertex name to ver... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Graph(object):
"""Graph class."""
pass
def main():
pass
if __name__ == '__main__':
main()
<commit_msg>Add Vertex class and doc strings for 2 classes<commit_after> | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Vertex(object):
"""Vertex class.
It uses a dict to keep track of the vertices which it's connected.
"""
class Graph(object):
"""Graph class.
It contains a dict to map vertex name to ver... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Graph(object):
"""Graph class."""
pass
def main():
pass
if __name__ == '__main__':
main()
Add Vertex class and doc strings for 2 classesfrom __future__ import absolute_import
from __f... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class Graph(object):
"""Graph class."""
pass
def main():
pass
if __name__ == '__main__':
main()
<commit_msg>Add Vertex class and doc strings for 2 classes<commit_after>from _... |
181c094a8918bc386771aaf2d7c99d4cc011a3a5 | selenium/tests/basic.py | selenium/tests/basic.py | #
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('catalog')
laye... | #
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('catalog')
laye... | Fix selenium layer count check. | Fix selenium layer count check.
Was hard coded to 17, but sometimes the mapbook changes. Allow to
pass when > 10, so this isn't so fragile. The main goal is to see
if IE11 works at all. More detailed tests can follow if needed.
ref: #391
| Python | mit | geomoose/gm3,geomoose/gm3,geomoose/gm3 | #
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('catalog')
laye... | #
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('catalog')
laye... | <commit_before>#
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('cat... | #
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('catalog')
laye... | #
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('catalog')
laye... | <commit_before>#
# Basic test to check that the catlog loads in IE
#
def run(driver):
driver.get('https://demo.geomoose.org/master/desktop/')
if not 'GeoMoose' in driver.title:
raise Exception('Unable to load geomoose demo!')
# ensure the catalog rendered
elem = driver.find_element_by_id('cat... |
01c571a3767339caf81dca61c6525f9c9bcf66fd | formlibrary/migrations/0005_auto_20171204_0203.py | formlibrary/migrations/0005_auto_20171204_0203.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0203'),
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0203'),
... | Fix the CustomForm migration script | Fix the CustomForm migration script
| Python | apache-2.0 | toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0203'),
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0203'),
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0203'),
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0203'),
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-12-04 10:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('workflow', '0007_auto_20171204_0... |
ec441eb63a785ad1ab15356f60f812a57a726788 | lib/Subcommands/Pull.py | lib/Subcommands/Pull.py | from lib.Wrappers.ArgumentParser import ArgumentParser
from lib.DockerManagerFactory import DockerManagerFactory
class Pull:
def __init__(self, manager_factory=None):
self.manager_factory = manager_factory or DockerManagerFactory()
def execute(self, *args):
arguments = self._parse_arguments(*... | import os
from lib.DockerComposeExecutor import DockerComposeExecutor
from lib.Tools import paths
class Pull:
def __init__(self, manager_factory=None):
pass
def execute(self, *args):
file_path = os.getcwd() + '/environments/compose_files/latest/docker-compose-all.yml'
docker_compose ... | Refactor the 'pull' subcommand to use DockerComposeExecutor | Refactor the 'pull' subcommand to use DockerComposeExecutor
The pull subcommand was not working because it depended on an
unimplemented class DockerManagerFactory.
| Python | agpl-3.0 | Open365/Open365,Open365/Open365 | from lib.Wrappers.ArgumentParser import ArgumentParser
from lib.DockerManagerFactory import DockerManagerFactory
class Pull:
def __init__(self, manager_factory=None):
self.manager_factory = manager_factory or DockerManagerFactory()
def execute(self, *args):
arguments = self._parse_arguments(*... | import os
from lib.DockerComposeExecutor import DockerComposeExecutor
from lib.Tools import paths
class Pull:
def __init__(self, manager_factory=None):
pass
def execute(self, *args):
file_path = os.getcwd() + '/environments/compose_files/latest/docker-compose-all.yml'
docker_compose ... | <commit_before>from lib.Wrappers.ArgumentParser import ArgumentParser
from lib.DockerManagerFactory import DockerManagerFactory
class Pull:
def __init__(self, manager_factory=None):
self.manager_factory = manager_factory or DockerManagerFactory()
def execute(self, *args):
arguments = self._pa... | import os
from lib.DockerComposeExecutor import DockerComposeExecutor
from lib.Tools import paths
class Pull:
def __init__(self, manager_factory=None):
pass
def execute(self, *args):
file_path = os.getcwd() + '/environments/compose_files/latest/docker-compose-all.yml'
docker_compose ... | from lib.Wrappers.ArgumentParser import ArgumentParser
from lib.DockerManagerFactory import DockerManagerFactory
class Pull:
def __init__(self, manager_factory=None):
self.manager_factory = manager_factory or DockerManagerFactory()
def execute(self, *args):
arguments = self._parse_arguments(*... | <commit_before>from lib.Wrappers.ArgumentParser import ArgumentParser
from lib.DockerManagerFactory import DockerManagerFactory
class Pull:
def __init__(self, manager_factory=None):
self.manager_factory = manager_factory or DockerManagerFactory()
def execute(self, *args):
arguments = self._pa... |
b03f32dc74785154ccb01f354a30457c53b1526f | tests/templates/components/test_radios_with_images.py | tests/templates/components/test_radios_with_images.py | import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually validate that "
... | import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually validate that "
... | Fix test description: njk -> html | Fix test description: njk -> html
| Python | mit | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually validate that "
... | import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually validate that "
... | <commit_before>import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually va... | import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually validate that "
... | import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually validate that "
... | <commit_before>import json
def test_govuk_frontend_jinja_overrides_on_design_system_v3():
with open("package.json") as package_file:
package_json = json.load(package_file)
assert package_json["dependencies"]["govuk-frontend"].startswith("3."), (
"After upgrading the Design System, manually va... |
9db16e16db9131806d76a1f6875dfba33a7d452b | smile_model_graph/__openerp__.py | smile_model_graph/__openerp__.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | Rename Objects to Models in module description | [IMP] Rename Objects to Models in module description
| Python | agpl-3.0 | tiexinliu/odoo_addons,chadyred/odoo_addons,chadyred/odoo_addons,ovnicraft/odoo_addons,bmya/odoo_addons,odoocn/odoo_addons,odoocn/odoo_addons,tiexinliu/odoo_addons,chadyred/odoo_addons,odoocn/odoo_addons,ovnicraft/odoo_addons,bmya/odoo_addons,ovnicraft/odoo_addons,bmya/odoo_addons,tiexinliu/odoo_addons | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
#... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
#... |
7a14c03e0864ca51993d2f05eabd2319c495ba90 | recipyGui/views.py | recipyGui/views.py | from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
query = reques... | from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
query = reques... | Sort runs by text score | Sort runs by text score
Search results for runs are sorted by text score.
| Python | apache-2.0 | recipy/recipy-gui,musically-ut/recipy,github4ry/recipy,github4ry/recipy,recipy/recipy,MichielCottaar/recipy,recipy/recipy-gui,MBARIMike/recipy,recipy/recipy,MBARIMike/recipy,bsipocz/recipy,bsipocz/recipy,MichielCottaar/recipy,musically-ut/recipy | from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
query = reques... | from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
query = reques... | <commit_before>from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
... | from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
query = reques... | from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
query = reques... | <commit_before>from flask import Blueprint, request, redirect, render_template, url_for
from flask.views import MethodView
from recipyGui import recipyGui, mongo
from forms import SearchForm
runs = Blueprint('runs', __name__, template_folder='templates')
@recipyGui.route('/')
def index():
form = SearchForm()
... |
4e94612f7fad4b231de9c1a4044259be6079a982 | fabtasks.py | fabtasks.py | # -*- coding: utf-8 -*-
from fabric.api import task, run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_code
passwo... | # -*- coding: utf-8 -*-
from fabric.api import run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_code
password = _... | Split create database and create user into to individual commands | Split create database and create user into to individual commands
| Python | mit | goncha/fablib | # -*- coding: utf-8 -*-
from fabric.api import task, run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_code
passwo... | # -*- coding: utf-8 -*-
from fabric.api import run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_code
password = _... | <commit_before># -*- coding: utf-8 -*-
from fabric.api import task, run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_... | # -*- coding: utf-8 -*-
from fabric.api import run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_code
password = _... | # -*- coding: utf-8 -*-
from fabric.api import task, run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_code
passwo... | <commit_before># -*- coding: utf-8 -*-
from fabric.api import task, run
def _generate_password():
import string
from random import sample
chars = string.letters + string.digits
return ''.join(sample(chars, 8))
def create_mysql_instance(mysql_user, mysql_password, instance_code):
user = instance_... |
25777afb24441f54edab1f9daa1bfc7a25c6d0ad | tests/test_regex_parser.py | tests/test_regex_parser.py | import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase):
''' descr... | import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase):
''' descr... | Work on unit test for regex_parser (preparing to refactor). | Work on unit test for regex_parser (preparing to refactor). | Python | bsd-3-clause | aroberge/docpicture,aroberge/docpicture | import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase):
''' descr... | import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase):
''' descr... | <commit_before>import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase)... | import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase):
''' descr... | import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase):
''' descr... | <commit_before>import unittest
# Ensuring that the proper path is found; there must be a better way
import os
import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.getcwd(), "..")))
# other imports proceed
from parsers.regex_parser import BaseParser
from src import svg
class TestBaseParser(unittest.TestCase)... |
e10743d9973f479a4d9816f4aafeaacaffa1bd4d | tests/test_spam_filters.py | tests/test_spam_filters.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
from django.test import TestCase
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
# mocking form ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
# mocking form and request, no need to use the r... | Use simple TestCase in spam filter tests. | Use simple TestCase in spam filter tests.
| Python | mit | zsiciarz/django-envelope,r4ts0n/django-envelope,zsiciarz/django-envelope,r4ts0n/django-envelope | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
from django.test import TestCase
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
# mocking form ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
# mocking form and request, no need to use the r... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
from django.test import TestCase
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
# mocking form and request, no need to use the r... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
from django.test import TestCase
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
# mocking form ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Unit tests for spam filters.
"""
import unittest
from django.conf import settings
from django.test import TestCase
try:
import honeypot
except ImportError:
honeypot = None
from envelope.spam_filters import check_honeypot
... |
b37e9d1cc315e04d763b646bb028612b86768d37 | migrations/versions/360_add_pass_fail_returned.py | migrations/versions/360_add_pass_fail_returned.py | """ Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 340
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fail_returned'
down_revision = '... | """ Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 350_migrate_interested_suppliers
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fai... | Update migration sequence after rebase | Update migration sequence after rebase
| Python | mit | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | """ Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 340
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fail_returned'
down_revision = '... | """ Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 350_migrate_interested_suppliers
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fai... | <commit_before>""" Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 340
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fail_returned'
do... | """ Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 350_migrate_interested_suppliers
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fai... | """ Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 340
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fail_returned'
down_revision = '... | <commit_before>""" Add columns to supplier_frameworks to indicate
Pass/Fail and whether a Framework Agreement has
been returned.
Revision ID: 360_add_pass_fail_returned
Revises: 340
Create Date: 2015-10-23 16:25:02.068155
"""
# revision identifiers, used by Alembic.
revision = '360_add_pass_fail_returned'
do... |
7187dbb7ca378726e2b58dc052dbc150582f9a24 | src/summon.py | src/summon.py | #! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
import subprocess
... | #! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
import subprocess
... | Use shell in subprocess.call for Windows. | Use shell in subprocess.call for Windows.
| Python | mit | the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red-spider-project,the-xkcd-community/the-red... | #! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
import subprocess
... | #! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
import subprocess
... | <commit_before>#! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
impo... | #! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
import subprocess
... | #! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
import subprocess
... | <commit_before>#! /usr/bin/env python2
from __future__ import print_function
''' summon.py
A simple wrapper for OS-dependent file launchers.
Copyright 2013 Julian Gonggrijp
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.
'''
import sys
impo... |
d22f77a8e1a54d373f426589364b95f742b70b3f | irc/util.py | irc/util.py | # from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iterable(None)
... | # from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iterable(None)
... | Use float so test passes on Python 2.6 | Use float so test passes on Python 2.6
| Python | mit | jaraco/irc | # from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iterable(None)
... | # from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iterable(None)
... | <commit_before># from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iter... | # from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iterable(None)
... | # from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iterable(None)
... | <commit_before># from jaraco.util.itertools
def always_iterable(item):
"""
Given an object, always return an iterable. If the item is not
already iterable, return a tuple containing only the item.
>>> always_iterable([1,2,3])
[1, 2, 3]
>>> always_iterable('foo')
('foo',)
>>> always_iter... |
d6a817949c51462af7d95d542ece667547b23cce | cbagent/collectors/ps.py | cbagent/collectors/ps.py | from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
super(PS, sel... | from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
super(PS, sel... | Fix condition for FTS stats collection | CBPS-186: Fix condition for FTS stats collection
Currently, stats collection for processes such as indexer and
cbq-engine is disabled due to a wrong "if" statement.
The "settings object" always has "fts_server" attribute. We should
check its boolean value instead.
Change-Id: I017f4758f3603e674f094af27b6293716796418a... | Python | apache-2.0 | pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner | from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
super(PS, sel... | from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
super(PS, sel... | <commit_before>from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
... | from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
super(PS, sel... | from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
super(PS, sel... | <commit_before>from cbagent.collectors import Collector
from cbagent.collectors.libstats.psstats import PSStats
class PS(Collector):
COLLECTOR = "atop" # Legacy
KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
"cbq-engine")
def __init__(self, settings):
... |
ac7fefd3a2058e2e9773d7e458f8fad6112fc33c | dev/lint.py | dev/lint.py | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.path.dirname(__file__)
config_file = os.pat... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if not hasattr(flake8, '__version_info__') or flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.... | Fix support for flake8 v2 | Fix support for flake8 v2
| Python | mit | wbond/asn1crypto | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.path.dirname(__file__)
config_file = os.pat... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if not hasattr(flake8, '__version_info__') or flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.... | <commit_before># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.path.dirname(__file__)
confi... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if not hasattr(flake8, '__version_info__') or flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.... | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.path.dirname(__file__)
config_file = os.pat... | <commit_before># coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
import os
import flake8
if flake8.__version_info__ < (3,):
from flake8.engine import get_style_guide
else:
from flake8.api.legacy import get_style_guide
cur_dir = os.path.dirname(__file__)
confi... |
49999de7ac753f57e3c25d9d36c1806f3ec3a0ee | omnirose/curve/forms.py | omnirose/curve/forms.py | from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class ReadingForm(forms.Form):
ships_head = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
deviation = form... | from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class DegreeInput(NumberInput):
"""Set the default style"""
def __init__(self, attrs=None):
if attrs is None:
attrs = {}
... | Customize degree widget so that if formats floats more elegantly | Customize degree widget so that if formats floats more elegantly
| Python | agpl-3.0 | OmniRose/omnirose-website,OmniRose/omnirose-website,OmniRose/omnirose-website | from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class ReadingForm(forms.Form):
ships_head = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
deviation = form... | from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class DegreeInput(NumberInput):
"""Set the default style"""
def __init__(self, attrs=None):
if attrs is None:
attrs = {}
... | <commit_before>from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class ReadingForm(forms.Form):
ships_head = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
de... | from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class DegreeInput(NumberInput):
"""Set the default style"""
def __init__(self, attrs=None):
if attrs is None:
attrs = {}
... | from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class ReadingForm(forms.Form):
ships_head = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
deviation = form... | <commit_before>from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class ReadingForm(forms.Form):
ships_head = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
de... |
2b464c9be11ad8aa0de62bca4424fed7d4d3e2b3 | configurator/__init__.py | configurator/__init__.py | """Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir... | """Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir... | Enable back git output redirection in _get_version | Enable back git output redirection in _get_version
| Python | apache-2.0 | yasserglez/configurator,yasserglez/configurator | """Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir... | """Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir... | <commit_before>"""Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg... | """Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir... | """Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir... | <commit_before>"""Adaptive configuration dialogs.
Attributes:
__version__: The current version string.
"""
import os
import subprocess
def _get_version(version=None): # overwritten by setup.py
if version is None:
pkg_dir = os.path.dirname(__file__)
src_dir = os.path.abspath(os.path.join(pkg... |
3dc9e45448211a5bd36c1f4e495eddef6e0e485e | scaffolder/commands/list.py | scaffolder/commands/list.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class TemplateCommand(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class ListCommand(BaseCommand):
def __init__(self, name, help='', aliases=(), stdout=None, stderr=... | Remove options, the command does not take options. | ListCommand: Remove options, the command does not take options.
| Python | mit | goliatone/minions | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class TemplateCommand(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class ListCommand(BaseCommand):
def __init__(self, name, help='', aliases=(), stdout=None, stderr=... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class TemplateCommand(BaseCommand):
option_list = BaseCommand.option_list + (
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class ListCommand(BaseCommand):
def __init__(self, name, help='', aliases=(), stdout=None, stderr=... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class TemplateCommand(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from optparse import make_option
from optparse import OptionParser
from scaffolder.core.commands import BaseCommand
from scaffolder.core.template import TemplateManager
class TemplateCommand(BaseCommand):
option_list = BaseCommand.option_list + (
... |
48beff57b1c98db24a83ee0c4fdb3f3b436978be | pyface/__init__.py | pyface/__init__.py | #------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | #------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | Use absolute import to get the package version. | Use absolute import to get the package version.
| Python | bsd-3-clause | geggo/pyface,geggo/pyface,brett-patterson/pyface | #------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | #------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | <commit_before>#------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the... | #------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | #------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions des... | <commit_before>#------------------------------------------------------------------------------
# Copyright (c) 2005-2013, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the... |
6d5ebbebd558a716afeda1933f45f0dfbef41bb4 | tests/smolder_tests.py | tests/smolder_tests.py | #!/usr/bin/env python2
import smolder
import nose
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_status.json')
t... | #!/usr/bin/env python2
import smolder
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_status.json')
test_json = j... | Clean up imports in smolder tests | Clean up imports in smolder tests
| Python | bsd-3-clause | sky-shiny/smolder,sky-shiny/smolder | #!/usr/bin/env python2
import smolder
import nose
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_status.json')
t... | #!/usr/bin/env python2
import smolder
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_status.json')
test_json = j... | <commit_before>#!/usr/bin/env python2
import smolder
import nose
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_st... | #!/usr/bin/env python2
import smolder
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_status.json')
test_json = j... | #!/usr/bin/env python2
import smolder
import nose
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_status.json')
t... | <commit_before>#!/usr/bin/env python2
import smolder
import nose
import json
import os
from nose.tools import assert_raises
from imp import reload
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
def test_noop_test():
assert smolder.noop_test()
def test_github_status():
myfile = open(THIS_DIR + '/github_st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.