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
7572df6e558479ebbe1c78f5671dc92450310330
app.py
app.py
from flask import Flask, render_template, url_for, redirect, request app = Flask(__name__) @app.route('/') def index(): return render_template('login.html') @app.route('/save', methods=['POST']) def save(): import pdb; pdb.set_trace() return redirect(url_for('index')) if __name__ == '__main__': ...
import json from user import User from flask import (Flask, render_template, url_for, redirect, request, make_response, jsonify) app = Flask(__name__) def get_saved_data(): try: data = json.loads(request.cookies.get('user')) except TypeError: data = {} return data @app.route('/'...
Add add bucket list feature
Add add bucket list feature
Python
mit
mkiterian/bucket-list-app,mkiterian/bucket-list-app,mkiterian/bucket-list-app
from flask import Flask, render_template, url_for, redirect, request app = Flask(__name__) @app.route('/') def index(): return render_template('login.html') @app.route('/save', methods=['POST']) def save(): import pdb; pdb.set_trace() return redirect(url_for('index')) if __name__ == '__main__': ...
import json from user import User from flask import (Flask, render_template, url_for, redirect, request, make_response, jsonify) app = Flask(__name__) def get_saved_data(): try: data = json.loads(request.cookies.get('user')) except TypeError: data = {} return data @app.route('/'...
<commit_before>from flask import Flask, render_template, url_for, redirect, request app = Flask(__name__) @app.route('/') def index(): return render_template('login.html') @app.route('/save', methods=['POST']) def save(): import pdb; pdb.set_trace() return redirect(url_for('index')) if __name__ =...
import json from user import User from flask import (Flask, render_template, url_for, redirect, request, make_response, jsonify) app = Flask(__name__) def get_saved_data(): try: data = json.loads(request.cookies.get('user')) except TypeError: data = {} return data @app.route('/'...
from flask import Flask, render_template, url_for, redirect, request app = Flask(__name__) @app.route('/') def index(): return render_template('login.html') @app.route('/save', methods=['POST']) def save(): import pdb; pdb.set_trace() return redirect(url_for('index')) if __name__ == '__main__': ...
<commit_before>from flask import Flask, render_template, url_for, redirect, request app = Flask(__name__) @app.route('/') def index(): return render_template('login.html') @app.route('/save', methods=['POST']) def save(): import pdb; pdb.set_trace() return redirect(url_for('index')) if __name__ =...
60e92f0a085bf7f4cb9f326085e3d4aba11f3594
bot.py
bot.py
from flask import Flask from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' if __name__ == "__main__": app.run()
import json import requests from flask import Flask, request from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' @app.route('/deployments/', methods=['POST'...
Add actual things that do real stuff
Add actual things that do real stuff
Python
mit
datamade/semabot,datamade/semabot
from flask import Flask from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' if __name__ == "__main__": app.run() Add actual things that do real stuff
import json import requests from flask import Flask, request from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' @app.route('/deployments/', methods=['POST'...
<commit_before>from flask import Flask from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' if __name__ == "__main__": app.run() <commit_msg>Add actual thi...
import json import requests from flask import Flask, request from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' @app.route('/deployments/', methods=['POST'...
from flask import Flask from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' if __name__ == "__main__": app.run() Add actual things that do real stuffimpor...
<commit_before>from flask import Flask from flow import Flow from config import ORG_ID, CHANNEL_ID flow = Flow('botbotbot') app = Flask(__name__) @app.route('/') def index(): flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot') return 'foo' if __name__ == "__main__": app.run() <commit_msg>Add actual thi...
7a17facf68a90d246b4bee55491c9495a8c5ca50
tg/dottednames/jinja_lookup.py
tg/dottednames/jinja_lookup.py
"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted filenames. Based on...
"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted filenames. Based...
Make JinjaTemplateLoader work with Python 2.4.
Make JinjaTemplateLoader work with Python 2.4.
Python
mit
lucius-feng/tg2,lucius-feng/tg2
"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted filenames. Based on...
"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted filenames. Based...
<commit_before>"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted file...
"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted filenames. Based...
"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted filenames. Based on...
<commit_before>"""Genshi template loader that supports dotted names.""" from os.path import exists, getmtime from jinja2.exceptions import TemplateNotFound from jinja2.loaders import FileSystemLoader from tg import config class JinjaTemplateLoader(FileSystemLoader): """Jinja template loader supporting dotted file...
2147df557bfb922fd640e2da1b105a60644dece0
src/main.py
src/main.py
import webapp2 import settings class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplication([ ('/', SampleIndex), ], debug=settings.DE...
import webapp2 DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplicatio...
Determine DEBUG flag at runtime - if we are under the SDK, we are debugging
Determine DEBUG flag at runtime - if we are under the SDK, we are debugging
Python
apache-2.0
rbanffy/testable_appengine,rbanffy/testable_appengine
import webapp2 import settings class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplication([ ('/', SampleIndex), ], debug=settings.DE...
import webapp2 DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplicatio...
<commit_before>import webapp2 import settings class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplication([ ('/', SampleIndex), ], de...
import webapp2 DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplicatio...
import webapp2 import settings class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplication([ ('/', SampleIndex), ], debug=settings.DE...
<commit_before>import webapp2 import settings class SampleIndex(webapp2.RequestHandler): """Stub request handler""" def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("helloworld") application = webapp2.WSGIApplication([ ('/', SampleIndex), ], de...
ddb64a0b7a09203c8367c47d34ac29a82af012c0
produceEports.py
produceEports.py
#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os f = open("{0}/app/static/exports/AllMeasurements_inprogress.csv".format(os.path.dirname(os.path.realpath(__file__))), "w") try: write_all_measurements_csv(f) finally: f.close os.rename("app/static/exports...
#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os exportDirectory = "{0}/app/static/exports".format(os.path.dirname(os.path.realpath(__file__)) workingFile = "{0}/AllMeasurements_inprogress.csv".format(exportDirectory) finalFile = "{0}/AllMeasurements.csv".format(e...
Use directory for all interaction - duh!
Use directory for all interaction - duh!
Python
mit
rabramley/telomere,rabramley/telomere,rabramley/telomere
#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os f = open("{0}/app/static/exports/AllMeasurements_inprogress.csv".format(os.path.dirname(os.path.realpath(__file__))), "w") try: write_all_measurements_csv(f) finally: f.close os.rename("app/static/exports...
#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os exportDirectory = "{0}/app/static/exports".format(os.path.dirname(os.path.realpath(__file__)) workingFile = "{0}/AllMeasurements_inprogress.csv".format(exportDirectory) finalFile = "{0}/AllMeasurements.csv".format(e...
<commit_before>#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os f = open("{0}/app/static/exports/AllMeasurements_inprogress.csv".format(os.path.dirname(os.path.realpath(__file__))), "w") try: write_all_measurements_csv(f) finally: f.close os.rename("app...
#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os exportDirectory = "{0}/app/static/exports".format(os.path.dirname(os.path.realpath(__file__)) workingFile = "{0}/AllMeasurements_inprogress.csv".format(exportDirectory) finalFile = "{0}/AllMeasurements.csv".format(e...
#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os f = open("{0}/app/static/exports/AllMeasurements_inprogress.csv".format(os.path.dirname(os.path.realpath(__file__))), "w") try: write_all_measurements_csv(f) finally: f.close os.rename("app/static/exports...
<commit_before>#!/usr/bin/env python from app.views.export import write_all_measurements_csv import tempfile import os f = open("{0}/app/static/exports/AllMeasurements_inprogress.csv".format(os.path.dirname(os.path.realpath(__file__))), "w") try: write_all_measurements_csv(f) finally: f.close os.rename("app...
8a544ac2db71d4041c77fdb0ddfe27b84b565bb5
salt/utils/saltminionservice.py
salt/utils/saltminionservice.py
# Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror import win32api # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True self.log("St...
# Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True self.log("Starting the Salt ...
Revert "Catch and ignore CTRL_LOGOFF_EVENT when run as a windows service"
Revert "Catch and ignore CTRL_LOGOFF_EVENT when run as a windows service" This reverts commit a7ddf81b37b578b1448f83b0efb4f7116de0c3fb.
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror import win32api # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True self.log("St...
# Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True self.log("Starting the Salt ...
<commit_before># Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror import win32api # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True ...
# Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True self.log("Starting the Salt ...
# Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror import win32api # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True self.log("St...
<commit_before># Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror import win32api # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True ...
eeb8057fb5ff65eb89e3b5a8ff94bf58adc511ee
utils/lit/tests/test-output.py
utils/lit/tests/test-output.py
# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "metrics": { # CH...
# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "metrics": { # CH...
Refactor test incase results are backwards
Refactor test incase results are backwards Looks like results can come in either way in this file. Loosen the ordering constraints. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@331945 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llv...
# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "metrics": { # CH...
# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "metrics": { # CH...
<commit_before># RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "m...
# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "metrics": { # CH...
# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "metrics": { # CH...
<commit_before># RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out # RUN: FileCheck < %t.results.out %s # CHECK: { # CHECK: "__version__" # CHECK: "elapsed" # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", # CHECK-NEXT: "elapsed": {{[0-9.]+}}, # CHECK-NEXT: "m...
356c56d7ebb2cc8e837308536c085b8dd399b01f
run.py
run.py
#!/usr/bin/env python """ TODO: Modify module doc. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os os.environ["FLAMYNGO"]...
#!/usr/bin/env python """ TODO: Modify module doc. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os import argparse if __name__ == "__main__": parser...
Use argparse for more flexible usage.
Use argparse for more flexible usage.
Python
bsd-3-clause
materialsvirtuallab/flamyngo,materialsvirtuallab/flamyngo,materialsvirtuallab/flamyngo
#!/usr/bin/env python """ TODO: Modify module doc. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os os.environ["FLAMYNGO"]...
#!/usr/bin/env python """ TODO: Modify module doc. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os import argparse if __name__ == "__main__": parser...
<commit_before>#!/usr/bin/env python """ TODO: Modify module doc. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os os.envi...
#!/usr/bin/env python """ TODO: Modify module doc. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os import argparse if __name__ == "__main__": parser...
#!/usr/bin/env python """ TODO: Modify module doc. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os os.environ["FLAMYNGO"]...
<commit_before>#!/usr/bin/env python """ TODO: Modify module doc. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Virtual Lab" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "7/30/14" import os os.envi...
b22b8c2249dc64d99e297dfe2ca24abbf30ec00d
st2common/st2common/models/api/stormbase.py
st2common/st2common/models/api/stormbase.py
from wsme import types as wtypes from mirantas.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text
from wsme import types as wtypes from mirantis.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text
Implement Staction Controller * Fixing mis-typed name.
[STORM-1] Implement Staction Controller * Fixing mis-typed name.
Python
apache-2.0
punalpatel/st2,lakshmi-kannan/st2,armab/st2,StackStorm/st2,jtopjian/st2,emedvedev/st2,pixelrebel/st2,alfasin/st2,Plexxi/st2,pinterb/st2,Itxaka/st2,pixelrebel/st2,nzlosh/st2,nzlosh/st2,peak6/st2,grengojbo/st2,pinterb/st2,emedvedev/st2,lakshmi-kannan/st2,alfasin/st2,Itxaka/st2,punalpatel/st2,StackStorm/st2,StackStorm/st2...
from wsme import types as wtypes from mirantas.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text [STORM-1] Implement Staction Controller * Fixing mis-typed name.
from wsme import types as wtypes from mirantis.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text
<commit_before>from wsme import types as wtypes from mirantas.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text <commit_msg>[STORM-1] Implement Staction Controller * Fixing mis-typ...
from wsme import types as wtypes from mirantis.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text
from wsme import types as wtypes from mirantas.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text [STORM-1] Implement Staction Controller * Fixing mis-typed name.from wsme import ty...
<commit_before>from wsme import types as wtypes from mirantas.resource import Resource class BaseAPI(Resource): # TODO: Does URI need a custom type? uri = wtypes.text name = wtypes.text description = wtypes.text id = wtypes.text <commit_msg>[STORM-1] Implement Staction Controller * Fixing mis-typ...
b367e2919c0de02f3514dfac5c890ffd70603918
src/nodeconductor_assembly_waldur/experts/filters.py
src/nodeconductor_assembly_waldur/experts/filters.py
import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='customer__uuid') ...
import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='customer__uuid') ...
Fix expert request filter by customer and project name.
Fix expert request filter by customer and project name.
Python
mit
opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur
import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='customer__uuid') ...
import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='customer__uuid') ...
<commit_before>import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='custome...
import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='customer__uuid') ...
import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='customer__uuid') ...
<commit_before>import django_filters from nodeconductor.core import filters as core_filters from . import models class ExpertProviderFilter(django_filters.FilterSet): customer = core_filters.URLFilter(view_name='customer-detail', name='customer__uuid') customer_uuid = django_filters.UUIDFilter(name='custome...
2f8c3ab7ecd0606069d524192c551e7be77ca461
zhihudaily/views/with_image.py
zhihudaily/views/with_image.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime from flask import render_template, Blueprint from zhihudaily.utils import make_request from zhihudaily.cache import cache image_ui = Blueprint('image_ui', __name__, template_folder='templates') ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import render_template, Blueprint, json from zhihudaily.cache import cache from zhihudaily.models import Zhihudaily from zhihudaily.utils import Date image_ui = Blueprint('image_ui', __name__, templat...
Switch to use database for image ui
Switch to use database for image ui
Python
mit
lord63/zhihudaily,lord63/zhihudaily,lord63/zhihudaily
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime from flask import render_template, Blueprint from zhihudaily.utils import make_request from zhihudaily.cache import cache image_ui = Blueprint('image_ui', __name__, template_folder='templates') ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import render_template, Blueprint, json from zhihudaily.cache import cache from zhihudaily.models import Zhihudaily from zhihudaily.utils import Date image_ui = Blueprint('image_ui', __name__, templat...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime from flask import render_template, Blueprint from zhihudaily.utils import make_request from zhihudaily.cache import cache image_ui = Blueprint('image_ui', __name__, template_folder...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import render_template, Blueprint, json from zhihudaily.cache import cache from zhihudaily.models import Zhihudaily from zhihudaily.utils import Date image_ui = Blueprint('image_ui', __name__, templat...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime from flask import render_template, Blueprint from zhihudaily.utils import make_request from zhihudaily.cache import cache image_ui = Blueprint('image_ui', __name__, template_folder='templates') ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime from flask import render_template, Blueprint from zhihudaily.utils import make_request from zhihudaily.cache import cache image_ui = Blueprint('image_ui', __name__, template_folder...
5c405745c954c2aa6121ddd82fb13ffef11b3150
pyp2rpm/utils.py
pyp2rpm/utils.py
import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value return ...
import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value return ...
Revert the commit "bc85b4e" to keep the current solution
Revert the commit "bc85b4e" to keep the current solution
Python
mit
henrysher/spec4pypi
import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value return ...
import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value return ...
<commit_before>import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value ...
import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value return ...
import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value return ...
<commit_before>import functools from pyp2rpm import settings def memoize_by_args(func): """Memoizes return value of a func based on args.""" memory = {} @functools.wraps(func) def memoized(*args): if not args in memory.keys(): value = func(*args) memory[args] = value ...
ab81837b707280b960ca02675a85da7918d17fec
setuptools/command/bdist_rpm.py
setuptools/command/bdist_rpm.py
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
Adjust to match modern style conventions.
Adjust to match modern style conventions.
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
<commit_before># This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_...
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
<commit_before># This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_...
58eb4b2b034d90f45b3daa12900f24a390bb4782
setuptools/command/bdist_rpm.py
setuptools/command/bdist_rpm.py
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to ...
Replace outdated deprecating comments with a proper doc string.
Replace outdated deprecating comments with a proper doc string.
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to ...
<commit_before># This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_...
from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to ...
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_rpm): def ...
<commit_before># This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs. from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm class bdist_rpm(_bdist_...
678532961cbc676fb3b82fa58185b281a8a4a7b3
rex/preconstrained_file_stream.py
rex/preconstrained_file_stream.py
from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = preconstraining_han...
from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = preconstraining_han...
Fix a bug that leads to failures in pickling.
SimPreconstrainedFileStream: Fix a bug that leads to failures in pickling.
Python
bsd-2-clause
shellphish/rex,shellphish/rex
from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = preconstraining_han...
from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = preconstraining_han...
<commit_before> from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = prec...
from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = preconstraining_han...
from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = preconstraining_han...
<commit_before> from angr.state_plugins.plugin import SimStatePlugin from angr.storage.file import SimFileStream class SimPreconstrainedFileStream(SimFileStream): def __init__(self, name, preconstraining_handler=None, **kwargs): super().__init__(name, **kwargs) self.preconstraining_handler = prec...
91f503cd99dfa6fc6562afc1b627b6f8b0f1d91b
addons/l10n_ar/models/res_partner_bank.py
addons/l10n_ar/models/res_partner_bank.py
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ import stdnum.ar.cbu def validate_cbu(cbu): return stdnum.ar.cbu.validate(cbu) class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' @api.model def _get_supported_account_types(se...
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ from odoo.exceptions import ValidationError import stdnum.ar import logging _logger = logging.getLogger(__name__) def validate_cbu(cbu): try: return stdnum.ar.cbu.validate(cbu) except Exception a...
Fix ImportError: No module named 'stdnum.ar.cbu'
[FIX] l10n_ar: Fix ImportError: No module named 'stdnum.ar.cbu' Since stdnum.ar.cbu is not available in odoo saas enviroment because is using an old version of stdnum package, we add a try exept in order to catch this and manage the error properly which is raise an exception and leave a message in the log telling the ...
Python
agpl-3.0
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ import stdnum.ar.cbu def validate_cbu(cbu): return stdnum.ar.cbu.validate(cbu) class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' @api.model def _get_supported_account_types(se...
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ from odoo.exceptions import ValidationError import stdnum.ar import logging _logger = logging.getLogger(__name__) def validate_cbu(cbu): try: return stdnum.ar.cbu.validate(cbu) except Exception a...
<commit_before># Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ import stdnum.ar.cbu def validate_cbu(cbu): return stdnum.ar.cbu.validate(cbu) class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' @api.model def _get_supported_a...
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ from odoo.exceptions import ValidationError import stdnum.ar import logging _logger = logging.getLogger(__name__) def validate_cbu(cbu): try: return stdnum.ar.cbu.validate(cbu) except Exception a...
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ import stdnum.ar.cbu def validate_cbu(cbu): return stdnum.ar.cbu.validate(cbu) class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' @api.model def _get_supported_account_types(se...
<commit_before># Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, _ import stdnum.ar.cbu def validate_cbu(cbu): return stdnum.ar.cbu.validate(cbu) class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' @api.model def _get_supported_a...
5cd0507e99d8f78597d225266ec09f6588308396
tests/app/public_contracts/test_POST_notification.py
tests/app/public_contracts/test_POST_notification.py
from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_id=template.ser...
from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_id=template.ser...
Revert "Fixed faoiling jenkins tests. Mocked the required functions"
Revert "Fixed faoiling jenkins tests. Mocked the required functions" This reverts commit 4b60c8dadaa413581cd373c9059ff95ecf751159.
Python
mit
alphagov/notifications-api,alphagov/notifications-api
from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_id=template.ser...
from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_id=template.ser...
<commit_before>from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_...
from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_id=template.ser...
from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_id=template.ser...
<commit_before>from flask import json from . import return_json_from_response, validate_v0 from tests import create_authorization_header def _post_notification(client, template, url, to): data = { 'to': to, 'template': str(template.id) } auth_header = create_authorization_header(service_...
4467ffe669eec09bab16f4e5a3256ed333c5d3d5
rcamp/lib/ldap_utils.py
rcamp/lib/ldap_utils.py
from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) conn = ldap.in...
from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) conn = ldap.in...
Set bytes_mode=False for future compatability with Python3
Set bytes_mode=False for future compatability with Python3
Python
mit
ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP
from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) conn = ldap.in...
from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) conn = ldap.in...
<commit_before>from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) ...
from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) conn = ldap.in...
from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) conn = ldap.in...
<commit_before>from django.conf import settings from ldapdb import escape_ldap_filter import ldap def authenticate(dn,pwd,ldap_conf_key): # Setup connection ldap_conf = settings.LDAPCONFS[ldap_conf_key] server = ldap_conf['server'] ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW) ...
c872b9991ec1a80d03906cebfb43e71335ba9c26
tests/run/generator_frame_cycle.py
tests/run/generator_frame_cycle.py
# mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'm done") g ...
# mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'm done") g ...
Fix a CPython comparison test in CPython 3.3 which was apparently fixed only in 3.4 and later.
Fix a CPython comparison test in CPython 3.3 which was apparently fixed only in 3.4 and later.
Python
apache-2.0
cython/cython,cython/cython,da-woods/cython,scoder/cython,cython/cython,scoder/cython,scoder/cython,cython/cython,da-woods/cython,da-woods/cython,scoder/cython,da-woods/cython
# mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'm done") g ...
# mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'm done") g ...
<commit_before># mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'...
# mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'm done") g ...
# mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'm done") g ...
<commit_before># mode: run # tag: generator import cython import sys def test_generator_frame_cycle(): """ >>> test_generator_frame_cycle() ("I'm done",) """ testit = [] def whoo(): try: yield except: yield finally: testit.append("I'...
e07db6a58217baf555b424d66f8996ec4bc7a02f
edgedb/lang/common/doc/sphinx/default_conf.py
edgedb/lang/common/doc/sphinx/default_conf.py
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx'] temp...
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx'] temp...
Drop json, bump copyright and Python version for intersphinx
doc: Drop json, bump copyright and Python version for intersphinx
Python
apache-2.0
edgedb/edgedb,edgedb/edgedb,edgedb/edgedb
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx'] temp...
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx'] temp...
<commit_before>## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.inter...
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx'] temp...
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx'] temp...
<commit_before>## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## """Default Sphinx configuration file for metamagic projects""" extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.inter...
88f699690a48bc9e204c561443a53ca03dcf1ae6
test/python_api/default-constructor/sb_type.py
test/python_api/default-constructor/sb_type.py
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, member) obj.G...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, member) obj.G...
Add fuzz calls for SBType::IsPointerType(void *opaque_type).
Add fuzz calls for SBType::IsPointerType(void *opaque_type). git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@134551 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, member) obj.G...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, member) obj.G...
<commit_before>""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, me...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, member) obj.G...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, member) obj.G...
<commit_before>""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.GetName() obj.GetByteSize() #obj.GetEncoding(5) obj.GetNumberChildren(True) member = lldb.SBTypeMember() obj.GetChildAtIndex(True, 0, me...
4636c9394138534fc39cc5bdac373b97919ffd01
server/info/services.py
server/info/services.py
"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_column.""" quer...
"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_column.""" quer...
Modify django orm filter, add only
Modify django orm filter, add only
Python
mit
istommao/codingcatweb,istommao/codingcatweb,istommao/codingcatweb
"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_column.""" quer...
"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_column.""" quer...
<commit_before>"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_colu...
"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_column.""" quer...
"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_column.""" quer...
<commit_before>"""info services.""" from info.models import Article, News, Column def get_column_object(uid): """Get column object.""" try: obj = Column.objects.get(uid=uid) except Column.DoesNotExist: obj = None return obj def get_articles_by_column(uid): """Get_articles_by_colu...
b46727a6bf8c1d85e0f9f8828954440bc489f247
panoptes_client/user.py
panoptes_client/user.py
from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () def avatar(self): return User.http_get('{}/avatar'.format(self.id))[0]...
from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () @property def avatar(self): return User.http_get('{}/avatar'.forma...
Change User.avatar to be a property
Change User.avatar to be a property
Python
apache-2.0
zooniverse/panoptes-python-client
from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () def avatar(self): return User.http_get('{}/avatar'.format(self.id))[0]...
from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () @property def avatar(self): return User.http_get('{}/avatar'.forma...
<commit_before>from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () def avatar(self): return User.http_get('{}/avatar'.form...
from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () @property def avatar(self): return User.http_get('{}/avatar'.forma...
from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () def avatar(self): return User.http_get('{}/avatar'.format(self.id))[0]...
<commit_before>from __future__ import absolute_import, division, print_function from panoptes_client.panoptes import PanoptesObject, LinkResolver class User(PanoptesObject): _api_slug = 'users' _link_slug = 'users' _edit_attributes = () def avatar(self): return User.http_get('{}/avatar'.form...
22230205402f7de77049da9c0f716d4fdc3099c3
vdt/versionplugin/wheel/package.py
vdt/versionplugin/wheel/package.py
from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) def build_packa...
from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) def build_packa...
Check if build number exists
Check if build number exists (so we won't create a package with 'None' in it's name)
Python
bsd-3-clause
devopsconsulting/vdt.versionplugin.wheel
from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) def build_packa...
from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) def build_packa...
<commit_before>from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) ...
from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) def build_packa...
from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) def build_packa...
<commit_before>from glob import glob import imp import logging import os import subprocess import mock from setuptools import setup as _setup from vdt.versionplugin.wheel.shared import parse_version_extra_args from vdt.versionplugin.wheel.utils import WheelRunningDistribution logger = logging.getLogger(__name__) ...
dd0ba5d4486983bd2c498efc46e7b3aa244935e8
playserver/webserver.py
playserver/webserver.py
import flask import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}"
import flask from . import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}"
Fix track import for package
Fix track import for package
Python
mit
ollien/playserver,ollien/playserver,ollien/playserver
import flask import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}" Fix track import for package
import flask from . import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}"
<commit_before>import flask import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}" <commit_msg>Fix track import for package<commit_after>
import flask from . import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}"
import flask import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}" Fix track import for packageimport flask from . import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}"
<commit_before>import flask import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}" <commit_msg>Fix track import for package<commit_after>import flask from . import track app = flask.flask(__name__) @app.route("/") def root(): return "{} by {} - {}"
437ed5ee5e919186eabd1d71b0c1949adc1cf378
src/orca/gnome-terminal.py
src/orca/gnome-terminal.py
# gnome-terminal script import a11y import speech def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ # Ignore t...
# gnome-terminal script import a11y import speech import default def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ ...
Call default.brlUpdateText instead of brlUpdateText (which was undefined)
Call default.brlUpdateText instead of brlUpdateText (which was undefined)
Python
lgpl-2.1
GNOME/orca,h4ck3rm1k3/orca-sonar,pvagner/orca,h4ck3rm1k3/orca-sonar,GNOME/orca,pvagner/orca,h4ck3rm1k3/orca-sonar,chrys87/orca-beep,chrys87/orca-beep,pvagner/orca,pvagner/orca,chrys87/orca-beep,GNOME/orca,chrys87/orca-beep,GNOME/orca
# gnome-terminal script import a11y import speech def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ # Ignore t...
# gnome-terminal script import a11y import speech import default def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ ...
<commit_before># gnome-terminal script import a11y import speech def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ ...
# gnome-terminal script import a11y import speech import default def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ ...
# gnome-terminal script import a11y import speech def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ # Ignore t...
<commit_before># gnome-terminal script import a11y import speech def onTextInserted (e): if e.source.role != "terminal": return speech.say ("default", e.any_data) def onTextDeleted (event): """Called whenever text is deleted from an object. Arguments: - event: the Event """ ...
45b3fc7babfbd922bdb174e5156f54c567a66de4
plotly/tests/test_core/test_graph_objs/test_graph_objs_tools.py
plotly/tests/test_core/test_graph_objs/test_graph_objs_tools.py
from __future__ import absolute_import from unittest import TestCase
from __future__ import absolute_import from unittest import TestCase from plotly.graph_objs import graph_objs as go from plotly.graph_objs import graph_objs_tools as got class TestGetRole(TestCase): def test_get_role_no_value(self): # this is a bit fragile, but we pick a few stable values # t...
Add some :tiger2:s for `graph_objs_tools.py`.
Add some :tiger2:s for `graph_objs_tools.py`.
Python
mit
plotly/plotly.py,plotly/python-api,plotly/plotly.py,plotly/python-api,plotly/plotly.py,plotly/python-api
from __future__ import absolute_import from unittest import TestCase Add some :tiger2:s for `graph_objs_tools.py`.
from __future__ import absolute_import from unittest import TestCase from plotly.graph_objs import graph_objs as go from plotly.graph_objs import graph_objs_tools as got class TestGetRole(TestCase): def test_get_role_no_value(self): # this is a bit fragile, but we pick a few stable values # t...
<commit_before>from __future__ import absolute_import from unittest import TestCase <commit_msg>Add some :tiger2:s for `graph_objs_tools.py`.<commit_after>
from __future__ import absolute_import from unittest import TestCase from plotly.graph_objs import graph_objs as go from plotly.graph_objs import graph_objs_tools as got class TestGetRole(TestCase): def test_get_role_no_value(self): # this is a bit fragile, but we pick a few stable values # t...
from __future__ import absolute_import from unittest import TestCase Add some :tiger2:s for `graph_objs_tools.py`.from __future__ import absolute_import from unittest import TestCase from plotly.graph_objs import graph_objs as go from plotly.graph_objs import graph_objs_tools as got class TestGetRole(TestCase): ...
<commit_before>from __future__ import absolute_import from unittest import TestCase <commit_msg>Add some :tiger2:s for `graph_objs_tools.py`.<commit_after>from __future__ import absolute_import from unittest import TestCase from plotly.graph_objs import graph_objs as go from plotly.graph_objs import graph_objs_tools...
8cdd7a89ad6115b80ae57ed6cbb0d41abce09816
src/tests/base/__init__.py
src/tests/base/__init__.py
import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): d...
import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): d...
Improve handling of remote test drivers
Improve handling of remote test drivers
Python
apache-2.0
Flamacue/pretix,Flamacue/pretix,lab2112/pretix,Unicorn-rzl/pretix,Unicorn-rzl/pretix,Flamacue/pretix,akuks/pretix,akuks/pretix,awg24/pretix,awg24/pretix,akuks/pretix,awg24/pretix,lab2112/pretix,lab2112/pretix,awg24/pretix,akuks/pretix,Unicorn-rzl/pretix,Flamacue/pretix,Unicorn-rzl/pretix,lab2112/pretix
import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): d...
import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): d...
<commit_before>import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTe...
import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): d...
import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTestCase): d...
<commit_before>import os import sys import time from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.conf import settings from selenium import webdriver # could use Chrome, Firefox, etc... here BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS') class BrowserTest(StaticLiveServerTe...
770781d3ce55a91926b91579e11d79ebb3edf47e
lms/djangoapps/api_manager/management/commands/migrate_orgdata.py
lms/djangoapps/api_manager/management/commands/migrate_orgdata.py
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
Tweak to migration in order to accomodate old names for data fields and allow for if data fields were not present
Tweak to migration in order to accomodate old names for data fields and allow for if data fields were not present
Python
agpl-3.0
edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
<commit_before>import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to new...
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org...
<commit_before>import json from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from api_manager.models import GroupProfile, Organization class Command(BaseCommand): """ Migrates legacy organization data and user relationships from older Group model approach to new...
cc7f93d93cb2d7e4aed0329ce41785e419b07a92
salt/__init__.py
salt/__init__.py
''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self): self....
''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self): self....
Fix incorrect reference to opts dict
Fix incorrect reference to opts dict
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self): self....
''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self): self....
<commit_before>''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self)...
''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self): self....
''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self): self....
<commit_before>''' Make me some salt! ''' # Import python libs import os import optparse # Import salt libs import salt.master import salt.minion import salt.utils class Master(object): ''' Creates a master server ''' class Minion(object): ''' Create a minion server ''' def __init__(self)...
668a5240c29047d86fe9451f3078bb163bea0db9
skan/__init__.py
skan/__init__.py
from .csr import skeleton_to_csgraph, branch_statistics, summarise __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']
from .csr import skeleton_to_csgraph, branch_statistics, summarise __version__ = '0.1-dev' __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']
Add version info to package init
Add version info to package init
Python
bsd-3-clause
jni/skan
from .csr import skeleton_to_csgraph, branch_statistics, summarise __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']Add version info to package init
from .csr import skeleton_to_csgraph, branch_statistics, summarise __version__ = '0.1-dev' __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']
<commit_before>from .csr import skeleton_to_csgraph, branch_statistics, summarise __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']<commit_msg>Add version info to package init<commit_after>
from .csr import skeleton_to_csgraph, branch_statistics, summarise __version__ = '0.1-dev' __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']
from .csr import skeleton_to_csgraph, branch_statistics, summarise __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']Add version info to package initfrom .csr import skeleton_to_csgraph, branch_statistics, summarise __version__ = '0.1-dev' __all__ = ['skeleton_to_csgraph', ...
<commit_before>from .csr import skeleton_to_csgraph, branch_statistics, summarise __all__ = ['skeleton_to_csgraph', 'branch_statistics', 'summarise']<commit_msg>Add version info to package init<commit_after>from .csr import skeleton_to_csgraph, branch_statistics, summarise __version__ = '0.1-dev...
8ad4850941e299d9dad02cac0e300dc2021b81be
streak-podium/render.py
streak-podium/render.py
import pygal def horizontal_bar(sorted_streaks, sort_attrib): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort_attrib. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort_attrib) for _, streak in sorted_streaks][::-1] ...
import pygal def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort) for _, streak in sorted_streaks][::-1] chart = pygal.Horiz...
Rename svg output based on sort attribute
Rename svg output based on sort attribute
Python
mit
jollyra/hubot-streak-podium,jollyra/hubot-commit-streak,jollyra/hubot-commit-streak,supermitch/streak-podium,supermitch/streak-podium,jollyra/hubot-streak-podium
import pygal def horizontal_bar(sorted_streaks, sort_attrib): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort_attrib. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort_attrib) for _, streak in sorted_streaks][::-1] ...
import pygal def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort) for _, streak in sorted_streaks][::-1] chart = pygal.Horiz...
<commit_before>import pygal def horizontal_bar(sorted_streaks, sort_attrib): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort_attrib. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort_attrib) for _, streak in sorted_str...
import pygal def horizontal_bar(sorted_streaks, sort): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort) for _, streak in sorted_streaks][::-1] chart = pygal.Horiz...
import pygal def horizontal_bar(sorted_streaks, sort_attrib): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort_attrib. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort_attrib) for _, streak in sorted_streaks][::-1] ...
<commit_before>import pygal def horizontal_bar(sorted_streaks, sort_attrib): """ Render a horizontal bar chart of streaks. Values have already been sorted by sort_attrib. """ users = [user for user, _ in sorted_streaks][::-1] streaks = [getattr(streak, sort_attrib) for _, streak in sorted_str...
2d9fce5715b2d7d5b920d2e77212f076e9ebd1be
staticgen_demo/staticgen_views.py
staticgen_demo/staticgen_views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): return ( 'sitemap.xml', 'robots.txt', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): r...
Add CMS Pages to staticgen registry.
Add CMS Pages to staticgen registry.
Python
bsd-3-clause
mishbahr/staticgen-demo,mishbahr/staticgen-demo,mishbahr/staticgen-demo
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): return ( 'sitemap.xml', 'robots.txt', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): r...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): return ( 'sitemap.xml', 'robots.t...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): r...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): return ( 'sitemap.xml', 'robots.txt', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): def items(self): return ( 'sitemap.xml', 'robots.t...
4d73eb2a7e06e1e2607a2abfae1063b9969e70a0
strichliste/strichliste/models.py
strichliste/strichliste/models.py
from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) @property d...
from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) @property d...
Add user_id to returned transactions
Add user_id to returned transactions
Python
mit
Don42/strichliste-django,hackerspace-bootstrap/strichliste-django
from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) @property d...
from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) @property d...
<commit_before>from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) ...
from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) @property d...
from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) @property d...
<commit_before>from django.db import models from django.db.models import Sum class User(models.Model): name = models.CharField(max_length=254, unique=True) create_date = models.DateTimeField(auto_now_add=True) active = models.BooleanField(default=True) mail_address = models.EmailField(null=True) ...
0f1cb413503034cbc1e2deddd8327ad1946201fe
numba2/compiler/optimizations/throwing.py
numba2/compiler/optimizations/throwing.py
# -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcModel(env)) def rewrite_exceptions(...
# -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.analysis import cfa from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcMode...
Rewrite phis from outdated incoming exception blocks
Rewrite phis from outdated incoming exception blocks
Python
bsd-2-clause
flypy/flypy,flypy/flypy
# -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcModel(env)) def rewrite_exceptions(...
# -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.analysis import cfa from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcMode...
<commit_before># -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcModel(env)) def rewr...
# -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.analysis import cfa from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcMode...
# -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcModel(env)) def rewrite_exceptions(...
<commit_before># -*- coding: utf-8 -*- """ Rewrite exceptions that are thrown and caught locally to jumps. """ from numba2.compiler import excmodel from pykit.optimizations import local_exceptions def rewrite_local_exceptions(func, env): local_exceptions.run(func, env, exc_model=excmodel.ExcModel(env)) def rewr...
dcf8622f6b40ba41f67638614cf3754b17005d4d
pombola/south_africa/templatetags/za_speeches.py
pombola/south_africa/templatetags/za_speeches.py
from django import template register = template.Library() @register.inclusion_tag('speeches/_section_prev_next_links.html') def section_prev_next_links(section): next_section = section.get_next_node() prev_section = section.get_previous_node() return { "next": next_section, "previous"...
import datetime from django import template from speeches.models import Section register = template.Library() # NOTE: this code is far from ideal. Sharing it with others in a pull request # to get opinions about how to improve. # TODO: # - cache results of min_speech_datetime and section_prev_next_links (both of # ...
Change next/prev finding logic to stay in same section
[1119] Change next/prev finding logic to stay in same section This uses code from speeches.models._get_next_previous_node. Thanks to Matthew Somerville for that suggestion.
Python
agpl-3.0
patricmutwiri/pombola,hzj123/56th,mysociety/pombola,geoffkilpin/pombola,patricmutwiri/pombola,mysociety/pombola,patricmutwiri/pombola,mysociety/pombola,hzj123/56th,patricmutwiri/pombola,hzj123/56th,patricmutwiri/pombola,ken-muturi/pombola,ken-muturi/pombola,patricmutwiri/pombola,ken-muturi/pombola,hzj123/56th,geoffkilp...
from django import template register = template.Library() @register.inclusion_tag('speeches/_section_prev_next_links.html') def section_prev_next_links(section): next_section = section.get_next_node() prev_section = section.get_previous_node() return { "next": next_section, "previous"...
import datetime from django import template from speeches.models import Section register = template.Library() # NOTE: this code is far from ideal. Sharing it with others in a pull request # to get opinions about how to improve. # TODO: # - cache results of min_speech_datetime and section_prev_next_links (both of # ...
<commit_before>from django import template register = template.Library() @register.inclusion_tag('speeches/_section_prev_next_links.html') def section_prev_next_links(section): next_section = section.get_next_node() prev_section = section.get_previous_node() return { "next": next_section, ...
import datetime from django import template from speeches.models import Section register = template.Library() # NOTE: this code is far from ideal. Sharing it with others in a pull request # to get opinions about how to improve. # TODO: # - cache results of min_speech_datetime and section_prev_next_links (both of # ...
from django import template register = template.Library() @register.inclusion_tag('speeches/_section_prev_next_links.html') def section_prev_next_links(section): next_section = section.get_next_node() prev_section = section.get_previous_node() return { "next": next_section, "previous"...
<commit_before>from django import template register = template.Library() @register.inclusion_tag('speeches/_section_prev_next_links.html') def section_prev_next_links(section): next_section = section.get_next_node() prev_section = section.get_previous_node() return { "next": next_section, ...
211b7b28e2d8c7ed0e0f67bea1a1a68b520a53b1
pagerduty_events_api/pagerduty_service.py
pagerduty_events_api/pagerduty_service.py
from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key def trigger(self...
from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key def trigger(self...
Use "blank" PD incident instance for triggering through PD service.
Use "blank" PD incident instance for triggering through PD service.
Python
mit
BlasiusVonSzerencsi/pagerduty-events-api
from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key def trigger(self...
from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key def trigger(self...
<commit_before>from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key d...
from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key def trigger(self...
from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key def trigger(self...
<commit_before>from pagerduty_events_api.pagerduty_incident import PagerdutyIncident from pagerduty_events_api.pagerduty_rest_client import PagerdutyRestClient class PagerdutyService: def __init__(self, key): self.__service_key = key def get_service_key(self): return self.__service_key d...
f90fac30454537ec0727371ffc54bde4a1e2f78d
5_control_statements_and_exceptions_hierarchy/guess-a-number-ex.py
5_control_statements_and_exceptions_hierarchy/guess-a-number-ex.py
""" This is an example of the control structures. """ result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" else: return "nope, higher" while result != "got i...
""" This is an example of the control structures. """ if __name__ == "__main__": result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" ...
Put the code in __main__ for lesson 5 guess-a-number example.
Put the code in __main__ for lesson 5 guess-a-number example.
Python
mit
razzius/PyClassLessons,razzius/PyClassLessons,razzius/PyClassLessons,razzius/PyClassLessons,PyClass/PyClassLessons,noisebridge/PythonClass,noisebridge/PythonClass,noisebridge/PythonClass,PyClass/PyClassLessons,noisebridge/PythonClass,PyClass/PyClassLessons
""" This is an example of the control structures. """ result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" else: return "nope, higher" while result != "got i...
""" This is an example of the control structures. """ if __name__ == "__main__": result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" ...
<commit_before>""" This is an example of the control structures. """ result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" else: return "nope, higher" while r...
""" This is an example of the control structures. """ if __name__ == "__main__": result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" ...
""" This is an example of the control structures. """ result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" else: return "nope, higher" while result != "got i...
<commit_before>""" This is an example of the control structures. """ result = "" our_number = 21 def test_number(answer): answer = int(answer) if answer == our_number: return "got it right" elif answer > our_number: return "nope, lower" else: return "nope, higher" while r...
524d5427d54342f26008a5b527140d4158f70edf
tests/test_extension.py
tests/test_extension.py
from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enabled = true' in ...
from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enabled = true' in ...
Clear websocket data to try and fix Travis
Clear websocket data to try and fix Travis
Python
agpl-3.0
palfrey/mopidy-tachikoma,palfrey/mopidy-tachikoma
from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enabled = true' in ...
from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enabled = true' in ...
<commit_before>from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enab...
from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enabled = true' in ...
from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enabled = true' in ...
<commit_before>from __future__ import unicode_literals import json from test_helpers import MockTrack, get_websocket, make_frontend, patched_bot from mopidy_tachikoma import Extension def test_get_default_config(): ext = Extension() config = ext.get_default_config() assert '[tachikoma]' in config assert 'enab...
87d2e511b0fedd2a09610c35337336d443a756a4
tests/unit/cli/filewatch/test_stat.py
tests/unit/cli/filewatch/test_stat.py
import os from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self, *parts): ...
import os import time from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self, *...
Add polling loop to allow time for callback to be invoked
Add polling loop to allow time for callback to be invoked
Python
apache-2.0
awslabs/chalice
import os from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self, *parts): ...
import os import time from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self, *...
<commit_before>import os from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self...
import os import time from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self, *...
import os from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self, *parts): ...
<commit_before>import os from chalice.cli.filewatch import stat class FakeOSUtils(object): def __init__(self): self.initial_scan = True def walk(self, rootdir): yield 'rootdir', [], ['bad-file', 'baz'] if self.initial_scan: self.initial_scan = False def joinpath(self...
6d60adad1caffdf35d0285a4d765a1f000efa12a
ckanext/latvian_theme/plugin.py
ckanext/latvian_theme/plugin.py
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_direct...
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_direct...
Fix for a small problem
Fix for a small problem
Python
agpl-3.0
dpp-dev/ckanext-latvian-theme,dpp-dev/ckanext-latvian-theme,dpp-dev/ckanext-latvian-theme,dpp-dev/ckanext-latvian-theme
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_direct...
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_direct...
<commit_before>import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.ad...
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_direct...
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_direct...
<commit_before>import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class Latvian_ThemePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.ad...
ce12cd0f56997dc6d33a9e4e7c13df27d05a133b
Python/Tests/TestData/DebuggerProject/ThreadJoin.py
Python/Tests/TestData/DebuggerProject/ThreadJoin.py
from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() from threading import Thread def n(): t1 = Thread(target=f,name="F_thread") t1.sta...
from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() def n(): t1 = Thread(target=f,name="F_thread") t1.start() t1.join() def m(): ...
Remove redundant import from test script.
Remove redundant import from test script.
Python
apache-2.0
zooba/PTVS,zooba/PTVS,huguesv/PTVS,int19h/PTVS,huguesv/PTVS,huguesv/PTVS,Microsoft/PTVS,int19h/PTVS,zooba/PTVS,int19h/PTVS,int19h/PTVS,huguesv/PTVS,Microsoft/PTVS,int19h/PTVS,Microsoft/PTVS,zooba/PTVS,Microsoft/PTVS,int19h/PTVS,Microsoft/PTVS,zooba/PTVS,huguesv/PTVS,zooba/PTVS,Microsoft/PTVS,huguesv/PTVS
from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() from threading import Thread def n(): t1 = Thread(target=f,name="F_thread") t1.sta...
from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() def n(): t1 = Thread(target=f,name="F_thread") t1.start() t1.join() def m(): ...
<commit_before>from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() from threading import Thread def n(): t1 = Thread(target=f,name="F_thre...
from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() def n(): t1 = Thread(target=f,name="F_thread") t1.start() t1.join() def m(): ...
from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() from threading import Thread def n(): t1 = Thread(target=f,name="F_thread") t1.sta...
<commit_before>from threading import Thread global exit_flag exit_flag = False def g(): i = 1 while not exit_flag: i = (i + 1) % 100000000 if i % 100000 == 0: print("f making progress: {0}".format(i)) def f(): g() from threading import Thread def n(): t1 = Thread(target=f,name="F_thre...
d40fa3554847a239f90a7f7edec8efbf30c753f0
scripts/lib/check_for_course_revisions.py
scripts/lib/check_for_course_revisions.py
import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads(prior_data) except FileNotFoundErr...
from collections import OrderedDict import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads...
Use an ordereddict for sorting revisions
Use an ordereddict for sorting revisions
Python
mit
StoDevX/course-data-tools,StoDevX/course-data-tools
import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads(prior_data) except FileNotFoundErr...
from collections import OrderedDict import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads...
<commit_before>import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads(prior_data) except ...
from collections import OrderedDict import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads...
import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads(prior_data) except FileNotFoundErr...
<commit_before>import json from .load_data_from_file import load_data_from_file from .get_old_dict_values import get_old_dict_values from .log import log from .paths import make_course_path def load_previous(course_path): try: prior_data = load_data_from_file(course_path) prior = json.loads(prior_data) except ...
e7942afdc1e93aec57e4e02d862a91eab9b5c0cb
trackingtermites/termite.py
trackingtermites/termite.py
from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: trail_o...
from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: trail_o...
Include missing columns in output
Include missing columns in output
Python
mit
dmrib/trackingtermites
from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: trail_o...
from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: trail_o...
<commit_before>from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: ...
from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: trail_o...
from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: trail_o...
<commit_before>from collections import namedtuple class Termite: def __init__(self, label, color): self.label = label self.color = color self.trail = [] self.tracker = None def to_csv(self): with open('data/{}-trail.csv'.format(self.label), mode='w') as trail_out: ...
b0814b95ea854f7b3f0b9db48ae9beee078c2a30
versions/software/openjdk.py
versions/software/openjdk.py
import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: version...
import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: version...
Update OpenJDK version to support both 8 and 9.
Update OpenJDK version to support both 8 and 9.
Python
mit
mchung94/latest-versions
import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: version...
import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: version...
<commit_before>import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: ...
import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: version...
import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: version...
<commit_before>import re from versions.software.utils import get_command_stderr, get_soup, \ get_text_between def name(): """Return the precise name for the software.""" return 'Zulu OpenJDK' def installed_version(): """Return the installed version of the jdk, or None if not installed.""" try: ...
daa5de8071bc0694115dce3d8cc1a3733e269910
py/ops/itests/test_deps.py
py/ops/itests/test_deps.py
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', 'rkt'])) ...
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', 'rkt'])) ...
Update ops integration test rkt version
Update ops integration test rkt version
Python
mit
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', 'rkt'])) ...
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', 'rkt'])) ...
<commit_before>import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', '...
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', 'rkt'])) ...
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', 'rkt'])) ...
<commit_before>import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', '...
79a2671c32c558aeb429c590c255f3092dba7e0b
zeus/api/resources/user_builds.py
zeus/api/resources/user_builds.py
from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class UserBuildsResour...
from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class UserBuildsResour...
Use date_created for "My Builds" sort
fix: Use date_created for "My Builds" sort
Python
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class UserBuildsResour...
from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class UserBuildsResour...
<commit_before>from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class U...
from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class UserBuildsResour...
from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class UserBuildsResour...
<commit_before>from sqlalchemy.orm import contains_eager, joinedload, subqueryload_all from zeus import auth from zeus.config import db from zeus.models import Author, Build, Email, Source, User from .base import Resource from ..schemas import BuildSchema builds_schema = BuildSchema(many=True, strict=True) class U...
3b4c645792c1a58cdce3dc25171723e7139d66da
workflows/api/permissions.py
workflows/api/permissions.py
from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user if v...
from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user if v...
Return True for preview if workflow public
Return True for preview if workflow public
Python
mit
xflows/clowdflows-backend,xflows/clowdflows-backend,xflows/clowdflows-backend,xflows/clowdflows-backend
from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user if v...
from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user if v...
<commit_before>from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user ...
from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user if v...
from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user if v...
<commit_before>from rest_framework import permissions from workflows.models import * class IsAdminOrSelf(permissions.BasePermission): def has_permission(self, request, view): if request.user and request.user.is_authenticated(): # Don't allow adding widgets to workflows not owned by the user ...
452ad6f3de797285a50094a4a145714e75204d95
bake/cmdline.py
bake/cmdline.py
#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys # This def main(args=sys.argv[1:]): ...
#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys def main(args=sys.argv[1:]): # Set ...
Make pep8 run mostly cleanly
Make pep8 run mostly cleanly
Python
mit
AlexSzatmary/bake
#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys # This def main(args=sys.argv[1:]): ...
#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys def main(args=sys.argv[1:]): # Set ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys # This def main(args=s...
#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys def main(args=sys.argv[1:]): # Set ...
#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys # This def main(args=sys.argv[1:]): ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 # This is the command line interface for bake. For people who want to take # bake.py and extend it for their own circumstances, modifying the main routine # in this module is probably the best place to start. import api as bake import sys # This def main(args=s...
d5cf661b2658d7f9a0f5436444373202e514bf37
src/psd_tools2/__init__.py
src/psd_tools2/__init__.py
from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage
from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage from .api.composer import compose
Include compose in the top level
Include compose in the top level
Python
mit
kmike/psd-tools,psd-tools/psd-tools,kmike/psd-tools
from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage Include compose in the top level
from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage from .api.composer import compose
<commit_before>from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage <commit_msg>Include compose in the top level<commit_after>
from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage from .api.composer import compose
from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage Include compose in the top levelfrom __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage from .api.composer import compose
<commit_before>from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage <commit_msg>Include compose in the top level<commit_after>from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage from .api.composer import compose
2fea7b008336e1960efb375c63a4cc14053bc590
src/wikicurses/__init__.py
src/wikicurses/__init__.py
import pkgutil from enum import IntEnum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3))
import pkgutil from enum import Enum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) for...
Create BitEnum class for bitfields
Create BitEnum class for bitfields
Python
mit
ids1024/wikicurses
import pkgutil from enum import IntEnum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3)) Create BitEnum class for bitfields
import pkgutil from enum import Enum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) for...
<commit_before>import pkgutil from enum import IntEnum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3)) <commit_msg>Create BitEnum class for bitfields<com...
import pkgutil from enum import Enum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class BitEnum(int, Enum): def __new__(cls, *args): value = 1 << len(cls.__members__) return int.__new__(cls, value) for...
import pkgutil from enum import IntEnum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3)) Create BitEnum class for bitfieldsimport pkgutil from enum import...
<commit_before>import pkgutil from enum import IntEnum _data = pkgutil.get_data('wikicurses', 'interwiki.list').decode() wikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#']) class formats(IntEnum): i, b, blockquote = (1<<i for i in range(3)) <commit_msg>Create BitEnum class for bitfields<com...
e3a1d4998494143491b49312673ceb84ea98b7f8
RatS/tmdb/tmdb_ratings_inserter.py
RatS/tmdb/tmdb_ratings_inserter.py
import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_url_for_csv_uploa...
import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_url_for_csv_uploa...
Adjust TMDB import page URL
Adjust TMDB import page URL
Python
agpl-3.0
StegSchreck/RatS,StegSchreck/RatS,StegSchreck/RatS
import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_url_for_csv_uploa...
import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_url_for_csv_uploa...
<commit_before>import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_ur...
import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_url_for_csv_uploa...
import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_url_for_csv_uploa...
<commit_before>import time from RatS.base.base_ratings_uploader import RatingsUploader from RatS.tmdb.tmdb_site import TMDB class TMDBRatingsInserter(RatingsUploader): def __init__(self, args): super(TMDBRatingsInserter, self).__init__(TMDB(args), args) self.url_for_csv_file_upload = self._get_ur...
989966444e63336b59da04265dbeb901258f75c1
us_ignite/snippets/management/commands/snippets_load_fixtures.py
us_ignite/snippets/management/commands/snippets_load_fixtures.py
from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', 'name': ...
from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', 'name': ...
Update description of the blog sidebar snippet.
Update description of the blog sidebar snippet.
Python
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', 'name': ...
from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', 'name': ...
<commit_before>from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', ...
from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', 'name': ...
from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', 'name': ...
<commit_before>from django.core.management.base import BaseCommand from us_ignite.snippets.models import Snippet FIXTURES = [ { 'slug': 'home-box', 'name': 'UP NEXT: LOREM IPSUM', 'body': '', 'url_text': 'GET INVOLVED', 'url': '', }, { 'slug': 'featured', ...
7718608741b7126e9239af71d8b2e140dce81303
common/djangoapps/microsite_configuration/templatetags/microsite.py
common/djangoapps/microsite_configuration/templatetags/microsite.py
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcrumbs(*crumbs, **...
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcrumbs(*crumbs, **...
Fix unicode error in subsection
Fix unicode error in subsection
Python
agpl-3.0
kxliugang/edx-platform,ZLLab-Mooc/edx-platform,rhndg/openedx,beni55/edx-platform,chudaol/edx-platform,beni55/edx-platform,openfun/edx-platform,atsolakid/edx-platform,romain-li/edx-platform,jonathan-beard/edx-platform,torchingloom/edx-platform,deepsrijit1105/edx-platform,stvstnfrd/edx-platform,ubc/edx-platform,nttks/jen...
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcrumbs(*crumbs, **...
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcrumbs(*crumbs, **...
<commit_before>""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcru...
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcrumbs(*crumbs, **...
""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcrumbs(*crumbs, **...
<commit_before>""" Template tags and helper functions for displaying breadcrumbs in page titles based on the current micro site. """ from django import template from django.conf import settings from microsite_configuration.middleware import MicrositeConfiguration register = template.Library() def page_title_breadcru...
2afd2467c16969b10496ae96e17b9dce7911f232
db.py
db.py
import sqlite3 connection = sqlite3.connect('data.db') class SavedRoll: @staticmethod def save(user, name, args): pass @staticmethod def get(user, name): pass @staticmethod def delete(user, name): pass
class SavedRollManager: """ Class for managing saved rolls. Attributes: connection (sqlite3.Connection): Database connection used by manager """ def __init__(self, connection): """ Create a SavedRollManager instance. Args: connection (sqlite3.Connection...
Make SavedRollManager less static, also docstrings
Make SavedRollManager less static, also docstrings
Python
mit
foxscotch/foxrollbot
import sqlite3 connection = sqlite3.connect('data.db') class SavedRoll: @staticmethod def save(user, name, args): pass @staticmethod def get(user, name): pass @staticmethod def delete(user, name): pass Make SavedRollManager less static, also docstrings
class SavedRollManager: """ Class for managing saved rolls. Attributes: connection (sqlite3.Connection): Database connection used by manager """ def __init__(self, connection): """ Create a SavedRollManager instance. Args: connection (sqlite3.Connection...
<commit_before>import sqlite3 connection = sqlite3.connect('data.db') class SavedRoll: @staticmethod def save(user, name, args): pass @staticmethod def get(user, name): pass @staticmethod def delete(user, name): pass <commit_msg>Make SavedRollManager less static, al...
class SavedRollManager: """ Class for managing saved rolls. Attributes: connection (sqlite3.Connection): Database connection used by manager """ def __init__(self, connection): """ Create a SavedRollManager instance. Args: connection (sqlite3.Connection...
import sqlite3 connection = sqlite3.connect('data.db') class SavedRoll: @staticmethod def save(user, name, args): pass @staticmethod def get(user, name): pass @staticmethod def delete(user, name): pass Make SavedRollManager less static, also docstringsclass SavedRol...
<commit_before>import sqlite3 connection = sqlite3.connect('data.db') class SavedRoll: @staticmethod def save(user, name, args): pass @staticmethod def get(user, name): pass @staticmethod def delete(user, name): pass <commit_msg>Make SavedRollManager less static, al...
b54507e05475dfc11e04678ee358476f571323b2
plugins/Tools/PerObjectSettingsTool/__init__.py
plugins/Tools/PerObjectSettingsTool/__init__.py
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@label", "Settings P...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@label", "Per Object...
Normalize strings for per object settings
Normalize strings for per object settings
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@label", "Settings P...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@label", "Per Object...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@labe...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@label", "Per Object...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@label", "Settings P...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import PerObjectSettingsTool from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("uranium") def getMetaData(): return { "plugin": { "name": i18n_catalog.i18nc("@labe...
ec61fec1ae60a565110876101dabad352e3ea46b
core/management/commands/delete_old_sessions.py
core/management/commands/delete_old_sessions.py
from datetime import datetime from django.core.management.base import BaseCommand from django.contrib.sessions.models import Session class Command(BaseCommand): args = '<count count ...>' help = "Delete old sessions" def handle(self, *args, **options): old_sessions = Session.objects.filter(expi...
from datetime import datetime from django.core.management.base import NoArgsCommand from django.contrib.sessions.models import Session class Command(NoArgsCommand): help = "Delete old sessions" def handle_noargs(self, **options): old_sessions = Session.objects.filter(expire_date__lt=datetime.now())...
Add delete old sessions command
Add delete old sessions command
Python
mit
QLGu/djangopackages,pydanny/djangopackages,QLGu/djangopackages,nanuxbe/djangopackages,nanuxbe/djangopackages,QLGu/djangopackages,nanuxbe/djangopackages,pydanny/djangopackages,pydanny/djangopackages
from datetime import datetime from django.core.management.base import BaseCommand from django.contrib.sessions.models import Session class Command(BaseCommand): args = '<count count ...>' help = "Delete old sessions" def handle(self, *args, **options): old_sessions = Session.objects.filter(expi...
from datetime import datetime from django.core.management.base import NoArgsCommand from django.contrib.sessions.models import Session class Command(NoArgsCommand): help = "Delete old sessions" def handle_noargs(self, **options): old_sessions = Session.objects.filter(expire_date__lt=datetime.now())...
<commit_before>from datetime import datetime from django.core.management.base import BaseCommand from django.contrib.sessions.models import Session class Command(BaseCommand): args = '<count count ...>' help = "Delete old sessions" def handle(self, *args, **options): old_sessions = Session.obje...
from datetime import datetime from django.core.management.base import NoArgsCommand from django.contrib.sessions.models import Session class Command(NoArgsCommand): help = "Delete old sessions" def handle_noargs(self, **options): old_sessions = Session.objects.filter(expire_date__lt=datetime.now())...
from datetime import datetime from django.core.management.base import BaseCommand from django.contrib.sessions.models import Session class Command(BaseCommand): args = '<count count ...>' help = "Delete old sessions" def handle(self, *args, **options): old_sessions = Session.objects.filter(expi...
<commit_before>from datetime import datetime from django.core.management.base import BaseCommand from django.contrib.sessions.models import Session class Command(BaseCommand): args = '<count count ...>' help = "Delete old sessions" def handle(self, *args, **options): old_sessions = Session.obje...
648c7fb94f92e8ef722af8c9462c9ff65bf643fc
intelmq/bots/collectors/mail/collector_mail_body.py
intelmq/bots/collectors/mail/collector_mail_body.py
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
Insert date when email was received
Insert date when email was received Sometimes we receive email reports like "this is happening right now" and there is no date/time included. So if we process emails once per hour - we don't have info about event time. Additional field `extra.email_received` in the mail body collector would help.
Python
agpl-3.0
aaronkaplan/intelmq,aaronkaplan/intelmq,certtools/intelmq,certtools/intelmq,certtools/intelmq,aaronkaplan/intelmq
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
<commit_before># -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html'))...
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
<commit_before># -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html'))...
8286aee8eca008e2e469d49e7a426828e4f6c2bf
bin/s3imageresize.py
bin/s3imageresize.py
#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Upload a file to Amazon S3 and rotate old backups.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('prefix', help="The...
#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Resize all images stored in a folder on Amazon S3.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('prefix', help="The...
Fix parameter descriptions and change size to individual width and height parameters
Fix parameter descriptions and change size to individual width and height parameters
Python
mit
dirkcuys/s3imageresize
#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Upload a file to Amazon S3 and rotate old backups.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('prefix', help="The...
#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Resize all images stored in a folder on Amazon S3.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('prefix', help="The...
<commit_before>#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Upload a file to Amazon S3 and rotate old backups.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('pre...
#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Resize all images stored in a folder on Amazon S3.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('prefix', help="The...
#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Upload a file to Amazon S3 and rotate old backups.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('prefix', help="The...
<commit_before>#!/usr/bin/env python import argparse from s3imageresize import resize_image_folder parser = argparse.ArgumentParser(description='Upload a file to Amazon S3 and rotate old backups.') parser.add_argument('bucket', help="Name of the Amazon S3 bucket to save the backup file to.") parser.add_argument('pre...
8e2e08621ca6adea23bc4da2f7b674216bf643f5
yolk/__init__.py
yolk/__init__.py
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5a0'
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5'
Increment patch version to 0.8.5
Increment patch version to 0.8.5
Python
bsd-3-clause
myint/yolk,myint/yolk
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5a0' Increment patch version to 0.8.5
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5'
<commit_before>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5a0' <commit_msg>Increment patch version to 0.8.5<commit_after>
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5'
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5a0' Increment patch version to 0.8.5"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5'
<commit_before>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5a0' <commit_msg>Increment patch version to 0.8.5<commit_after>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.5'
7fea0e2fb875a655898915f9f0f8375684d9e6bd
juriscraper/oral_args/united_states/state/__init__.py
juriscraper/oral_args/united_states/state/__init__.py
__all__ = [ 'ill', 'illappct_1st_dist' #'md', ]
__all__ = [ 'ill', 'illappct_1st_dist', #'md', ]
Clean up to ill imports.
Clean up to ill imports. Style issue, but it's better to put these vertically. It makes it harder to forget a comma.
Python
bsd-2-clause
freelawproject/juriscraper,freelawproject/juriscraper
__all__ = [ 'ill', 'illappct_1st_dist' #'md', ] Clean up to ill imports. Style issue, but it's better to put these vertically. It makes it harder to forget a comma.
__all__ = [ 'ill', 'illappct_1st_dist', #'md', ]
<commit_before>__all__ = [ 'ill', 'illappct_1st_dist' #'md', ] <commit_msg>Clean up to ill imports. Style issue, but it's better to put these vertically. It makes it harder to forget a comma.<commit_after>
__all__ = [ 'ill', 'illappct_1st_dist', #'md', ]
__all__ = [ 'ill', 'illappct_1st_dist' #'md', ] Clean up to ill imports. Style issue, but it's better to put these vertically. It makes it harder to forget a comma.__all__ = [ 'ill', 'illappct_1st_dist', #'md', ]
<commit_before>__all__ = [ 'ill', 'illappct_1st_dist' #'md', ] <commit_msg>Clean up to ill imports. Style issue, but it's better to put these vertically. It makes it harder to forget a comma.<commit_after>__all__ = [ 'ill', 'illappct_1st_dist', #'md', ]
71339b8f92c9057fe029c5db81db7acce7596607
app/mod_budget/controller.py
app/mod_budget/controller.py
from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default: return "Hello World!"
from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default(): return "Hello World!"
Fix missing parenthesis for default route in budget module.
Fix missing parenthesis for default route in budget module.
Python
mit
Zillolo/mana-vault,Zillolo/mana-vault,Zillolo/mana-vault
from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default: return "Hello World!" Fix missing parenthesis for default route in budget module.
from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default(): return "Hello World!"
<commit_before>from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default: return "Hello World!" <commit_msg>Fix missing parenthesis for default route in budget module.<commit_after>
from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default(): return "Hello World!"
from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default: return "Hello World!" Fix missing parenthesis for default route in budget module.from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @bu...
<commit_before>from flask import Blueprint budget = Blueprint('budget', __name__, template_folder = 'templates') @budget.route('/') def default: return "Hello World!" <commit_msg>Fix missing parenthesis for default route in budget module.<commit_after>from flask import Blueprint budget = Blueprint('budget', __na...
945e2def0a106541583907101060a234e6846d27
sources/bioformats/large_image_source_bioformats/girder_source.py
sources/bioformats/large_image_source_bioformats/girder_source.py
# -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
# -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
Fix reading from hashed file names.
Fix reading from hashed file names. Bioformats expects file extensions to exist, so flag that we should always appear as actual, fully-pathed files.
Python
apache-2.0
girder/large_image,DigitalSlideArchive/large_image,girder/large_image,girder/large_image,DigitalSlideArchive/large_image,DigitalSlideArchive/large_image
# -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
# -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lice...
# -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
# -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lice...
82f5a5cccb8a7a36adc6f880d3cc1e11b8e596ee
envelope/templatetags/envelope_tags.py
envelope/templatetags/envelope_tags.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/contact_form.html', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/contact_form.html', ...
Raise a more specific error when form is not passed to the template.
Raise a more specific error when form is not passed to the template.
Python
mit
r4ts0n/django-envelope,r4ts0n/django-envelope,affan2/django-envelope,affan2/django-envelope,zsiciarz/django-envelope,zsiciarz/django-envelope
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/contact_form.html', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/contact_form.html', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/conta...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/contact_form.html', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/contact_form.html', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals """ Template tags related to the contact form. """ from django import template try: import honeypot except ImportError: # pragma: no cover honeypot = None register = template.Library() @register.inclusion_tag('envelope/conta...
f1e2859f5535d7eddb13c10e71f9c0074c94c719
axes_login_actions/signals.py
axes_login_actions/signals.py
# -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, 'AXES_LOGIN_ACT...
# -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, 'AXES_LOGIN_ACT...
Add "dispatch_uid" to ensure we connect the signal only once
Add "dispatch_uid" to ensure we connect the signal only once
Python
bsd-3-clause
eht16/django-axes-login-actions
# -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, 'AXES_LOGIN_ACT...
# -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, 'AXES_LOGIN_ACT...
<commit_before># -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, ...
# -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, 'AXES_LOGIN_ACT...
# -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, 'AXES_LOGIN_ACT...
<commit_before># -*- coding: utf-8 -*- from axes.models import AccessAttempt from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from importlib import import_module DEFAULT_ACTION = 'axes_login_actions.actions.email.notify' ACTIONS = getattr(settings, ...
ea324a30823fbf18c72dd639b9c43d3ecb57b034
txircd/modules/extra/services/account_extban.py
txircd/modules/extra/services/account_extban.py
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actions(self): ret...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actions(self): ret...
Fix matching users against R: extbans
Fix matching users against R: extbans
Python
bsd-3-clause
Heufneutje/txircd
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actions(self): ret...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actions(self): ret...
<commit_before>from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actio...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actions(self): ret...
from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actions(self): ret...
<commit_before>from twisted.plugin import IPlugin from txircd.module_interface import IModuleData, ModuleData from txircd.utils import ircLower from zope.interface import implements from fnmatch import fnmatchcase class AccountExtban(ModuleData): implements(IPlugin, IModuleData) name = "AccountExtban" def actio...
d649e0ff501604d9b8b24bd69a7545528332c05c
polling_stations/apps/pollingstations/models.py
polling_stations/apps/pollingstations/models.py
from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=100) addres...
from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=100) addres...
Fix unicode for unknown names
Fix unicode for unknown names
Python
bsd-3-clause
andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=100) addres...
from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=100) addres...
<commit_before>from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=...
from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=100) addres...
from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=100) addres...
<commit_before>from django.contrib.gis.db import models from councils.models import Council class PollingStation(models.Model): council = models.ForeignKey(Council, null=True) internal_council_id = models.CharField(blank=True, max_length=100) postcode = models.CharField(blank=True, null=True, max_length=...
c5996b4a933f2d27251e8d85f3392b715e130759
mapentity/templatetags/convert_tags.py
mapentity/templatetags/convert_tags.py
import urllib from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): fullurl = request.build_absolute_uri(sourceurl) conversion_url = "%s?url=%s&to=%s" % (settings.CONVERSION_SERVER, ...
import urllib from mimetypes import types_map from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): if '/' not in format: extension = '.' + format if not format.startswith('.') else format ...
Support conversion format as extension, instead of mimetype
Support conversion format as extension, instead of mimetype
Python
bsd-3-clause
Anaethelion/django-mapentity,makinacorpus/django-mapentity,makinacorpus/django-mapentity,makinacorpus/django-mapentity,Anaethelion/django-mapentity,Anaethelion/django-mapentity
import urllib from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): fullurl = request.build_absolute_uri(sourceurl) conversion_url = "%s?url=%s&to=%s" % (settings.CONVERSION_SERVER, ...
import urllib from mimetypes import types_map from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): if '/' not in format: extension = '.' + format if not format.startswith('.') else format ...
<commit_before>import urllib from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): fullurl = request.build_absolute_uri(sourceurl) conversion_url = "%s?url=%s&to=%s" % (settings.CONVERSION_SERVER, ...
import urllib from mimetypes import types_map from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): if '/' not in format: extension = '.' + format if not format.startswith('.') else format ...
import urllib from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): fullurl = request.build_absolute_uri(sourceurl) conversion_url = "%s?url=%s&to=%s" % (settings.CONVERSION_SERVER, ...
<commit_before>import urllib from django import template from django.conf import settings register = template.Library() @register.simple_tag def convert_url(request, sourceurl, format='pdf'): fullurl = request.build_absolute_uri(sourceurl) conversion_url = "%s?url=%s&to=%s" % (settings.CONVERSION_SERVER, ...
5885c053e9bf20c7b91ebc2c8aebd1dfb9c78a46
avalonstar/components/broadcasts/models.py
avalonstar/components/broadcasts/models.py
# -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Broadcast(models.Model): airdate = models.DateField() status = models.CharField(max_length=200) number = models.IntegerField(blank=True, null=True) # ... games = models.ManyToManyField(Game, relat...
# -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Series(models.Model): name = models.CharField(max_length=200) def __unicode__(self): return '%s' % self.name class Broadcast(models.Model): airdate = models.DateField() status = models.CharF...
Add the concept of series (like Whatever Wednesday).
Add the concept of series (like Whatever Wednesday).
Python
apache-2.0
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
# -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Broadcast(models.Model): airdate = models.DateField() status = models.CharField(max_length=200) number = models.IntegerField(blank=True, null=True) # ... games = models.ManyToManyField(Game, relat...
# -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Series(models.Model): name = models.CharField(max_length=200) def __unicode__(self): return '%s' % self.name class Broadcast(models.Model): airdate = models.DateField() status = models.CharF...
<commit_before># -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Broadcast(models.Model): airdate = models.DateField() status = models.CharField(max_length=200) number = models.IntegerField(blank=True, null=True) # ... games = models.ManyToManyFi...
# -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Series(models.Model): name = models.CharField(max_length=200) def __unicode__(self): return '%s' % self.name class Broadcast(models.Model): airdate = models.DateField() status = models.CharF...
# -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Broadcast(models.Model): airdate = models.DateField() status = models.CharField(max_length=200) number = models.IntegerField(blank=True, null=True) # ... games = models.ManyToManyField(Game, relat...
<commit_before># -*- coding: utf-8 -*- from django.db import models from components.games.models import Game class Broadcast(models.Model): airdate = models.DateField() status = models.CharField(max_length=200) number = models.IntegerField(blank=True, null=True) # ... games = models.ManyToManyFi...
0d176d6d40c5267a8672e2f8511eeec3ff7e4102
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
Use install_requires= and bump version
Use install_requires= and bump version It appears that the "requires" keyword argument to setup() doesn't do the right thing. This may be a brain-o on my part. This switches back to using "install_requires" and bumps the version for release.
Python
apache-2.0
klmitch/cli_tools
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
<commit_before>#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile...
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
<commit_before>#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile...
0e3edd3be1748dd62323037760337b8819adaeea
features/steps/use_steplib_behave4cmd.py
features/steps/use_steplib_behave4cmd.py
# -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.command_steps
# -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.__all_steps__
Use all behave4cmd0 steps now.
Use all behave4cmd0 steps now.
Python
bsd-2-clause
hugeinc/behave-parallel
# -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.command_steps Use all behave4cmd0 steps now.
# -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.__all_steps__
<commit_before># -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.command_steps <commit_msg>Use all behave4cmd0 steps now.<commit_after>
# -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.__all_steps__
# -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.command_steps Use all behave4cmd0 steps now.# -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.__all_steps__
<commit_before># -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER-STEPS: import behave4cmd0.command_steps <commit_msg>Use all behave4cmd0 steps now.<commit_after># -*- coding: utf-8 -*- """ Use behave4cmd0 step library (predecessor of behave4cmd). """ # -- REGISTER...
7bd4d126269e516f3a9a54721e3d710e19120eb4
app.py
app.py
from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol_prices)) @ap...
from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol_prices)) @app...
Handle different cases of city names
Handle different cases of city names
Python
apache-2.0
phalgun/fuelprice-api
from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol_prices)) @ap...
from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol_prices)) @app...
<commit_before>from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol...
from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol_prices)) @app...
from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol_prices)) @ap...
<commit_before>from flask import Flask, jsonify from flask.helpers import make_response import urls import scrapy app = Flask(__name__) @app.route('/fuelprice/v1.0/petrol/', methods=['GET']) def petrol_prices_all(): all_petrol_prices = scrapy.scrape_all_petrol_prices() return make_response(jsonify(all_petrol...
c7f6e0c2e9c5be112a7576c3d2a1fc8a79eb9f18
brasilcomvc/settings/staticfiles.py
brasilcomvc/settings/staticfiles.py
import os import sys # Disable django-pipeline when in test mode PIPELINE_ENABLED = 'test' not in sys.argv # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path.join(STATIC_BA...
import os import sys # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path.join(STATIC_BASE_DIR, 'static') MEDIA_ROOT = os.path.join(STATIC_BASE_DIR, 'media') # Static file UR...
Fix django-pipeline configuration for development/test
fix(set): Fix django-pipeline configuration for development/test
Python
apache-2.0
brasilcomvc/brasilcomvc,brasilcomvc/brasilcomvc,brasilcomvc/brasilcomvc
import os import sys # Disable django-pipeline when in test mode PIPELINE_ENABLED = 'test' not in sys.argv # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path.join(STATIC_BA...
import os import sys # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path.join(STATIC_BASE_DIR, 'static') MEDIA_ROOT = os.path.join(STATIC_BASE_DIR, 'media') # Static file UR...
<commit_before>import os import sys # Disable django-pipeline when in test mode PIPELINE_ENABLED = 'test' not in sys.argv # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path...
import os import sys # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path.join(STATIC_BASE_DIR, 'static') MEDIA_ROOT = os.path.join(STATIC_BASE_DIR, 'media') # Static file UR...
import os import sys # Disable django-pipeline when in test mode PIPELINE_ENABLED = 'test' not in sys.argv # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path.join(STATIC_BA...
<commit_before>import os import sys # Disable django-pipeline when in test mode PIPELINE_ENABLED = 'test' not in sys.argv # Main project directory BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) STATIC_BASE_DIR = os.path.join(BASE_DIR, '../webroot') # Static file dirs STATIC_ROOT = os.path...
a5274f0628bec7a77fc2722ced723c4f35f3fb4b
microcosm_flask/fields/query_string_list.py
microcosm_flask/fields/query_string_list.py
""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class SelfSerializableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, attr, obj): ...
""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class PrintableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, attr, obj): """ ...
Change the name of SelfSerializableList to PrintableList
Change the name of SelfSerializableList to PrintableList
Python
apache-2.0
globality-corp/microcosm-flask,globality-corp/microcosm-flask
""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class SelfSerializableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, attr, obj): ...
""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class PrintableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, attr, obj): """ ...
<commit_before>""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class SelfSerializableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, at...
""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class PrintableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, attr, obj): """ ...
""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class SelfSerializableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, attr, obj): ...
<commit_before>""" A list field field that supports query string parameter parsing. """ from marshmallow.fields import List, ValidationError class SelfSerializableList(list): def __str__(self): return ",".join(str(item) for item in self) class QueryStringList(List): def _deserialize(self, value, at...
faa74af66ff0542c5a08d85caf2e2b897506b1d0
custom/ewsghana/handlers/help.py
custom/ewsghana/handlers/help.py
from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.args[0].lower() ...
from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.args[0].lower() ...
Use values_list instead of iterating over
Use values_list instead of iterating over
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.args[0].lower() ...
from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.args[0].lower() ...
<commit_before>from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.ar...
from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.args[0].lower() ...
from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.args[0].lower() ...
<commit_before>from corehq.apps.products.models import SQLProduct from custom.ewsghana.handlers import HELP_TEXT from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler class HelpHandler(KeywordHandler): def help(self): self.respond(HELP_TEXT) def handle(self): topic = self.ar...
0a0d5e0c833c82a26697f049444bb6e3c359c3c7
django_lti_tool_provider/urls.py
django_lti_tool_provider/urls.py
from django.conf.urls import url from django_lti_tool_provider import views as lti_views urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ]
from django.conf.urls import url from django_lti_tool_provider import views as lti_views app_name = 'django_lti_tool_provider' urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ]
Adjust URL configuration based on changes introduced in Django 1.9:
Adjust URL configuration based on changes introduced in Django 1.9: - URL application namespace required if setting an instance namespace: https://docs.djangoproject.com/en/2.1/releases/1.9/#url-application-namespace-required-if-setting-an-instance-namespace
Python
agpl-3.0
open-craft/django-lti-tool-provider
from django.conf.urls import url from django_lti_tool_provider import views as lti_views urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ] Adjust URL configuration based on changes introduced in Django 1.9: - URL application namespace required if setting an instance namespace: https://docs.dj...
from django.conf.urls import url from django_lti_tool_provider import views as lti_views app_name = 'django_lti_tool_provider' urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ]
<commit_before>from django.conf.urls import url from django_lti_tool_provider import views as lti_views urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ] <commit_msg>Adjust URL configuration based on changes introduced in Django 1.9: - URL application namespace required if setting an instance n...
from django.conf.urls import url from django_lti_tool_provider import views as lti_views app_name = 'django_lti_tool_provider' urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ]
from django.conf.urls import url from django_lti_tool_provider import views as lti_views urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ] Adjust URL configuration based on changes introduced in Django 1.9: - URL application namespace required if setting an instance namespace: https://docs.dj...
<commit_before>from django.conf.urls import url from django_lti_tool_provider import views as lti_views urlpatterns = [ url(r'', lti_views.LTIView.as_view(), name='lti') ] <commit_msg>Adjust URL configuration based on changes introduced in Django 1.9: - URL application namespace required if setting an instance n...
bff6e81fc952efdbee12e9c05be630f12f61d929
pygraphc/similarity/pyjwJaroWinkler.py
pygraphc/similarity/pyjwJaroWinkler.py
from pyjarowinkler import distance from itertools import combinations from time import time start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: lines = f.readlines() log_length = len(lines) for line1, line2 in combinations...
Add Jaro-Winkler distance based pyjarowinkler library
Add Jaro-Winkler distance based pyjarowinkler library
Python
mit
studiawan/pygraphc
Add Jaro-Winkler distance based pyjarowinkler library
from pyjarowinkler import distance from itertools import combinations from time import time start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: lines = f.readlines() log_length = len(lines) for line1, line2 in combinations...
<commit_before><commit_msg>Add Jaro-Winkler distance based pyjarowinkler library<commit_after>
from pyjarowinkler import distance from itertools import combinations from time import time start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: lines = f.readlines() log_length = len(lines) for line1, line2 in combinations...
Add Jaro-Winkler distance based pyjarowinkler libraryfrom pyjarowinkler import distance from itertools import combinations from time import time start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: lines = f.readlines() log...
<commit_before><commit_msg>Add Jaro-Winkler distance based pyjarowinkler library<commit_after>from pyjarowinkler import distance from itertools import combinations from time import time start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, '...
b0bed22c3ccafe596cf715f2be56c3261b4a6853
reporting_scripts/course_completers.py
reporting_scripts/course_completers.py
''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import defaultdict from...
''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import defaultdict from...
Update to include User ID in result
Update to include User ID in result
Python
mit
McGillX/edx_data_research,andyzsf/edx_data_research,McGillX/edx_data_research,andyzsf/edx_data_research,McGillX/edx_data_research
''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import defaultdict from...
''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import defaultdict from...
<commit_before>''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import de...
''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import defaultdict from...
''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import defaultdict from...
<commit_before>''' This module extracts the student IDs from the collection certificates_generatedcertificate of the students who completed the course and achieved a certificate. The ids are then used to extract the usernames of the course completers Usage: python course_completers.py ''' from collections import de...
fd9c73fc65a7234732ed55a7ae89365aec6cf123
behave_django/runner.py
behave_django/runner.py
from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ Test runner that...
from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ Test runner that...
Fix Landscape complaint "Method has no argument"
Fix Landscape complaint "Method has no argument"
Python
mit
bittner/behave-django,behave/behave-django,behave/behave-django,bittner/behave-django
from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ Test runner that...
from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ Test runner that...
<commit_before>from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ T...
from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ Test runner that...
from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ Test runner that...
<commit_before>from django.test.runner import DiscoverRunner from behave_django.environment import BehaveHooksMixin from behave_django.testcase import (BehaviorDrivenTestCase, ExistingDatabaseTestCase) class BehaviorDrivenTestRunner(DiscoverRunner, BehaveHooksMixin): """ T...
dfc7c7ae72b91f3bc7724da6b0d8071b3e9253b7
altair/vegalite/v2/examples/us_state_capitals.py
altair/vegalite/v2/examples/us_state_capitals.py
""" U.S. state capitals overlayed on a map of the U.S ================================================- This is a geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format=alt.TopoDataFo...
""" U.S. state capitals overlayed on a map of the U.S ================================================ This is a layered geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format=alt.Top...
Add points for capital locations>
Add points for capital locations>
Python
bsd-3-clause
ellisonbg/altair,jakevdp/altair,altair-viz/altair
""" U.S. state capitals overlayed on a map of the U.S ================================================- This is a geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format=alt.TopoDataFo...
""" U.S. state capitals overlayed on a map of the U.S ================================================ This is a layered geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format=alt.Top...
<commit_before>""" U.S. state capitals overlayed on a map of the U.S ================================================- This is a geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format...
""" U.S. state capitals overlayed on a map of the U.S ================================================ This is a layered geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format=alt.Top...
""" U.S. state capitals overlayed on a map of the U.S ================================================- This is a geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format=alt.TopoDataFo...
<commit_before>""" U.S. state capitals overlayed on a map of the U.S ================================================- This is a geographic visualization that shows US capitals overlayed on a map. """ import altair as alt from vega_datasets import data states = alt.UrlData(data.us_10m.url, format...
9c7bed0917bc8a14b7be1f98f392f6669cd259d8
ideascube/conf/idb_lbn_elmarj.py
ideascube/conf/idb_lbn_elmarj.py
# -*- coding: utf-8 -*- """El-Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El-Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'library', ...
# -*- coding: utf-8 -*- """El Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'library', ...
Fix teh fixed fix of fscked fix.
Fix teh fixed fix of fscked fix.
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
# -*- coding: utf-8 -*- """El-Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El-Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'library', ...
# -*- coding: utf-8 -*- """El Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'library', ...
<commit_before># -*- coding: utf-8 -*- """El-Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El-Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': ...
# -*- coding: utf-8 -*- """El Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'library', ...
# -*- coding: utf-8 -*- """El-Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El-Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'library', ...
<commit_before># -*- coding: utf-8 -*- """El-Marj box in Lebanon""" from .idb import * # noqa IDEASCUBE_NAME = u"El-Marj Lebanon" # Fixme COUNTRIES_FIRST = ['LB', 'SY', 'JO', 'PS'] TIME_ZONE = 'Asia/Beirut' LANGUAGE_CODE = 'ar' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': ...
80a940305765a22f96b0c0af0b0b46f1e3f5c377
tests/unit/models/listing/test_generator.py
tests/unit/models/listing/test_generator.py
"""Test praw.models.front.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) assert "limi...
"""Test praw.models.listing.generator.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) ...
Fix docstring typo in ListingGenerator unit tests
Fix docstring typo in ListingGenerator unit tests
Python
bsd-2-clause
praw-dev/praw,praw-dev/praw
"""Test praw.models.front.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) assert "limi...
"""Test praw.models.listing.generator.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) ...
<commit_before>"""Test praw.models.front.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) ...
"""Test praw.models.listing.generator.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) ...
"""Test praw.models.front.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) assert "limi...
<commit_before>"""Test praw.models.front.""" from praw.models.listing.generator import ListingGenerator from ... import UnitTest class TestListingGenerator(UnitTest): def test_params_are_not_modified(self): params = {"prawtest": "yes"} generator = ListingGenerator(None, None, params=params) ...
c0e90114c7a84cfa94fb3f0e862e0453101544ba
flamingo/flamingo/settings/prod.py
flamingo/flamingo/settings/prod.py
import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost',] # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secret_key}@app.getse...
import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['*',] # Heroku handles this under the hood # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secre...
Allow all hosts on Heroku
Allow all hosts on Heroku
Python
isc
RevolutionTech/flamingo,RevolutionTech/flamingo,RevolutionTech/flamingo,RevolutionTech/flamingo
import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost',] # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secret_key}@app.getse...
import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['*',] # Heroku handles this under the hood # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secre...
<commit_before>import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost',] # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secret...
import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['*',] # Heroku handles this under the hood # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secre...
import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost',] # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secret_key}@app.getse...
<commit_before>import os import raven from flamingo.settings.base import BaseSettings class ProdSettings(BaseSettings): DEBUG = False ALLOWED_HOSTS = ['127.0.0.1', 'localhost',] # Sentry # @property # def RAVEN_CONFIG(self): # return { # 'dsn': 'https://{public_key}:{secret...
7416f2fc34bad2036024874ad6a0c9a5f57d0657
education/management/commands/fake_incoming_message.py
education/management/commands/fake_incoming_message.py
from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), make_optio...
from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), make_optio...
Simplify the requesting of parameters.
Simplify the requesting of parameters.
Python
bsd-3-clause
unicefuganda/edtrac,unicefuganda/edtrac,unicefuganda/edtrac
from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), make_optio...
from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), make_optio...
<commit_before>from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), ...
from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), make_optio...
from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), make_optio...
<commit_before>from django.core.management.base import BaseCommand from optparse import make_option from rapidsms_httprouter.router import get_router from rapidsms.models import Connection class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-p", "--phone", dest="phone"), ...
e5a94d2902a66d55be62b92e35ac90ac7aed7991
javascript/navigator/__init__.py
javascript/navigator/__init__.py
__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation class Navigator(v8.JSClass): def __init__(self, runtime): # W3C spec says that if geolocation is disabled, navigator.geolocation should not exist. # if 'location' in runtime.manifest.get('capabilities', []): if...
__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation from javascript.exceptions import JSRuntimeException class Navigator(v8.JSClass): def __init__(self, runtime): self._runtime = runtime # W3C spec says that if geolocation is disabled, navigator.geolocation should not ex...
Implement location restriction more thoroughly.
Implement location restriction more thoroughly.
Python
mit
youtux/pypkjs,pebble/pypkjs
__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation class Navigator(v8.JSClass): def __init__(self, runtime): # W3C spec says that if geolocation is disabled, navigator.geolocation should not exist. # if 'location' in runtime.manifest.get('capabilities', []): if...
__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation from javascript.exceptions import JSRuntimeException class Navigator(v8.JSClass): def __init__(self, runtime): self._runtime = runtime # W3C spec says that if geolocation is disabled, navigator.geolocation should not ex...
<commit_before>__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation class Navigator(v8.JSClass): def __init__(self, runtime): # W3C spec says that if geolocation is disabled, navigator.geolocation should not exist. # if 'location' in runtime.manifest.get('capabilities', ...
__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation from javascript.exceptions import JSRuntimeException class Navigator(v8.JSClass): def __init__(self, runtime): self._runtime = runtime # W3C spec says that if geolocation is disabled, navigator.geolocation should not ex...
__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation class Navigator(v8.JSClass): def __init__(self, runtime): # W3C spec says that if geolocation is disabled, navigator.geolocation should not exist. # if 'location' in runtime.manifest.get('capabilities', []): if...
<commit_before>__author__ = 'katharine' import PyV8 as v8 from geolocation import Geolocation class Navigator(v8.JSClass): def __init__(self, runtime): # W3C spec says that if geolocation is disabled, navigator.geolocation should not exist. # if 'location' in runtime.manifest.get('capabilities', ...
70847e9d88f086d52e167629666aebe5137c7a2e
debileweb/blueprints/forms.py
debileweb/blueprints/forms.py
from wtforms import TextField, BooleanField, Form from wtforms.validators import Required class SearchPackageForm(Form): package = TextField('package', validators = [Required()]) maintainer = TextField('maintainer', validators = [Required()])
# Copyright (c) 2013 Sylvestre Ledru <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modi...
Add license + remove useless declaration
Add license + remove useless declaration
Python
mit
opencollab/debile-web,opencollab/debile-web,opencollab/debile-web
from wtforms import TextField, BooleanField, Form from wtforms.validators import Required class SearchPackageForm(Form): package = TextField('package', validators = [Required()]) maintainer = TextField('maintainer', validators = [Required()]) Add license + remove useless declaration
# Copyright (c) 2013 Sylvestre Ledru <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modi...
<commit_before>from wtforms import TextField, BooleanField, Form from wtforms.validators import Required class SearchPackageForm(Form): package = TextField('package', validators = [Required()]) maintainer = TextField('maintainer', validators = [Required()]) <commit_msg>Add license + remove useless declaration<...
# Copyright (c) 2013 Sylvestre Ledru <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modi...
from wtforms import TextField, BooleanField, Form from wtforms.validators import Required class SearchPackageForm(Form): package = TextField('package', validators = [Required()]) maintainer = TextField('maintainer', validators = [Required()]) Add license + remove useless declaration# Copyright (c) 2013 Sylvest...
<commit_before>from wtforms import TextField, BooleanField, Form from wtforms.validators import Required class SearchPackageForm(Form): package = TextField('package', validators = [Required()]) maintainer = TextField('maintainer', validators = [Required()]) <commit_msg>Add license + remove useless declaration<...
78ca15758018d52f1353b29410f97bba215e0be2
django_afip/views.py
django_afip/views.py
from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): template_name = 'django_afip/invoice.html' def get(self, request, pk): return HttpResponse( gen...
from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): def get(self, request, pk): return HttpResponse( generate_receipt_pdf(pk, request, True), )...
Remove unused (albeit confusing) variable
Remove unused (albeit confusing) variable See #13
Python
isc
hobarrera/django-afip,hobarrera/django-afip
from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): template_name = 'django_afip/invoice.html' def get(self, request, pk): return HttpResponse( gen...
from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): def get(self, request, pk): return HttpResponse( generate_receipt_pdf(pk, request, True), )...
<commit_before>from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): template_name = 'django_afip/invoice.html' def get(self, request, pk): return HttpResponse( ...
from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): def get(self, request, pk): return HttpResponse( generate_receipt_pdf(pk, request, True), )...
from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): template_name = 'django_afip/invoice.html' def get(self, request, pk): return HttpResponse( gen...
<commit_before>from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import View from .pdf import generate_receipt_pdf class ReceiptHTMLView(View): template_name = 'django_afip/invoice.html' def get(self, request, pk): return HttpResponse( ...
13a2ea421b761b9009fb7e1328e54cf0ae5cc54f
gapipy/resources/booking/agency.py
gapipy/resources/booking/agency.py
from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class Agency(Resource): _resource_name = 'agencies' _is_listable = False _is_parent_resource = True ...
from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from ...models.base import BaseModel from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class AgencyEmail(BaseModel): _as_is_fields = ['type', 'address'] class...
Add new Agency resource fields
Add new Agency resource fields
Python
mit
gadventures/gapipy
from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class Agency(Resource): _resource_name = 'agencies' _is_listable = False _is_parent_resource = True ...
from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from ...models.base import BaseModel from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class AgencyEmail(BaseModel): _as_is_fields = ['type', 'address'] class...
<commit_before>from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class Agency(Resource): _resource_name = 'agencies' _is_listable = False _is_parent_res...
from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from ...models.base import BaseModel from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class AgencyEmail(BaseModel): _as_is_fields = ['type', 'address'] class...
from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class Agency(Resource): _resource_name = 'agencies' _is_listable = False _is_parent_resource = True ...
<commit_before>from __future__ import unicode_literals from ...models import Address from ...models import AgencyDocument from .agency_chain import AgencyChain from ..base import Resource from ..tour import Promotion class Agency(Resource): _resource_name = 'agencies' _is_listable = False _is_parent_res...
3b9508ff6546974ffb2aee8fe38aae15799aafc5
cellcounter/accounts/urls.py
cellcounter/accounts/urls.py
from django.conf.urls import patterns, url from django.core.urlresolvers import reverse from .views import RegistrationView, PasswordChangeView, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.auth.views.passw...
from django.conf.urls import patterns, url from .views import RegistrationView, PasswordChangeView, password_reset_sent, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.auth.views.password_reset', { 't...
Add correct reset-sent and reset-done redirect views, tidy regex
Add correct reset-sent and reset-done redirect views, tidy regex
Python
mit
haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcounter,haematologic/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter
from django.conf.urls import patterns, url from django.core.urlresolvers import reverse from .views import RegistrationView, PasswordChangeView, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.auth.views.passw...
from django.conf.urls import patterns, url from .views import RegistrationView, PasswordChangeView, password_reset_sent, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.auth.views.password_reset', { 't...
<commit_before>from django.conf.urls import patterns, url from django.core.urlresolvers import reverse from .views import RegistrationView, PasswordChangeView, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.a...
from django.conf.urls import patterns, url from .views import RegistrationView, PasswordChangeView, password_reset_sent, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.auth.views.password_reset', { 't...
from django.conf.urls import patterns, url from django.core.urlresolvers import reverse from .views import RegistrationView, PasswordChangeView, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.auth.views.passw...
<commit_before>from django.conf.urls import patterns, url from django.core.urlresolvers import reverse from .views import RegistrationView, PasswordChangeView, password_reset_done urlpatterns = patterns('', url('^new/$', RegistrationView.as_view(), name='register'), url('^password/reset/$', 'django.contrib.a...
eecf64c177c25be34b597e419ce22450440e445f
setup.py
setup.py
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.12', packages=['todoist', 'todoist.managers'], author='Doist Team...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.13', packages=['todoist', 'todoist.managers'], author='Doist Team...
Update the PyPI version to 0.2.13
Update the PyPI version to 0.2.13
Python
mit
electronick1/todoist-python,Doist/todoist-python
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.12', packages=['todoist', 'todoist.managers'], author='Doist Team...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.13', packages=['todoist', 'todoist.managers'], author='Doist Team...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.12', packages=['todoist', 'todoist.managers'], aut...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.13', packages=['todoist', 'todoist.managers'], author='Doist Team...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.12', packages=['todoist', 'todoist.managers'], author='Doist Team...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.12', packages=['todoist', 'todoist.managers'], aut...
2f0627c1e5c087cf5b712e846b4f687259342063
credentials/management/commands/import_sshkeypair.py
credentials/management/commands/import_sshkeypair.py
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key filename] [name]...
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key filename] [name]...
Change the help and assignments to match.
Change the help and assignments to match.
Python
mit
caio1982/capomastro,caio1982/capomastro,timrchavez/capomastro,timrchavez/capomastro,caio1982/capomastro
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key filename] [name]...
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key filename] [name]...
<commit_before>from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key f...
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key filename] [name]...
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key filename] [name]...
<commit_before>from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import transaction from credentials.management.helpers import import_sshkeypair class Command(BaseCommand): help = "Import ssh keypair" args = "[public key filename] [private key f...
58078b1d4eb64c7104715352fc11bf7abffd48a4
feincms/management/commands/update_rsscontent.py
feincms/management/commands/update_rsscontent.py
from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): for cls in RSSContent._feincms_content_models: for content in cls.objects.all(): ...
from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): # find all concrete content types of RSSContent for cls in RSSContent._feincms_content_mode...
Add small explaining note to the RSSContent updating management command
Add small explaining note to the RSSContent updating management command
Python
bsd-3-clause
hgrimelid/feincms,nickburlett/feincms,feincms/feincms,nickburlett/feincms,hgrimelid/feincms,joshuajonah/feincms,pjdelport/feincms,mjl/feincms,joshuajonah/feincms,pjdelport/feincms,matthiask/django-content-editor,matthiask/django-content-editor,mjl/feincms,nickburlett/feincms,matthiask/feincms2-content,matthiask/feincms...
from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): for cls in RSSContent._feincms_content_models: for content in cls.objects.all(): ...
from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): # find all concrete content types of RSSContent for cls in RSSContent._feincms_content_mode...
<commit_before>from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): for cls in RSSContent._feincms_content_models: for content in cls.object...
from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): # find all concrete content types of RSSContent for cls in RSSContent._feincms_content_mode...
from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): for cls in RSSContent._feincms_content_models: for content in cls.objects.all(): ...
<commit_before>from django.core.management.base import NoArgsCommand from feincms.content.rss.models import RSSContent class Command(NoArgsCommand): help = "Run this as a cronjob." def handle_noargs(self, **options): for cls in RSSContent._feincms_content_models: for content in cls.object...
978b6b46bc1f6b7cb70c14fd929e757a41436f87
test/test_helpers.py
test/test_helpers.py
import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_a-wavread-expec...
import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_a-wavread-expec...
Add assertion for checking arrays read from wavread
Add assertion for checking arrays read from wavread
Python
apache-2.0
voicesauce/opensauce-python,voicesauce/opensauce-python,voicesauce/opensauce-python
import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_a-wavread-expec...
import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_a-wavread-expec...
<commit_before>import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_...
import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_a-wavread-expec...
import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_a-wavread-expec...
<commit_before>import numpy as np from opensauce.helpers import wavread from test.support import TestCase, data_file_path, loadmat class TestSupport(TestCase): def test_wavread(self): fn = data_file_path('beijing_f3_50_a.wav') samples, Fs = wavread(fn) expected = loadmat('beijing_f3_50_...
25054c4f9b20cef1a43aea680f75f7208c1fd3b7
connman_dispatcher/detect.py
connman_dispatcher/detect.py
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
Fix bug when sometimes online event was reported twice
Fix bug when sometimes online event was reported twice
Python
isc
a-sk/connman-dispatcher
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
<commit_before>import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_arg...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_args_list() ...
<commit_before>import glib import dbus from dbus.mainloop.glib import DBusGMainLoop from pyee import EventEmitter import logbook logger = logbook.Logger('connman-dispatcher') __all__ = ['detector'] def property_changed(_, message): if message.get_member() == "PropertyChanged": _, state = message.get_arg...
b1f1f4991abdd3f8854923ca7a2bc1b7e9cf6a53
easyfuse/__init__.py
easyfuse/__init__.py
""" A Python library to create a simple FUSE file system. .. :copyright: (c) 2016 by Jelte Fennema. :license: MIT, see License for more details. """
Add docstring to main module
Add docstring to main module
Python
mit
JelteF/easyfuse,JelteF/easyfuse
Add docstring to main module
""" A Python library to create a simple FUSE file system. .. :copyright: (c) 2016 by Jelte Fennema. :license: MIT, see License for more details. """
<commit_before><commit_msg>Add docstring to main module<commit_after>
""" A Python library to create a simple FUSE file system. .. :copyright: (c) 2016 by Jelte Fennema. :license: MIT, see License for more details. """
Add docstring to main module""" A Python library to create a simple FUSE file system. .. :copyright: (c) 2016 by Jelte Fennema. :license: MIT, see License for more details. """
<commit_before><commit_msg>Add docstring to main module<commit_after>""" A Python library to create a simple FUSE file system. .. :copyright: (c) 2016 by Jelte Fennema. :license: MIT, see License for more details. """
308bc2add0cc9d2d8af1d1851d71caa284094f62
helusers/tests/test_oidc_api_token_authentication.py
helusers/tests/test_oidc_api_token_authentication.py
import json import time import uuid import pytest from jose import jwt from helusers.oidc import ApiTokenAuthentication from .keys import rsa_key ISSUER = "test_issuer" class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { "issuer": IS...
import json import uuid import pytest from helusers.oidc import ApiTokenAuthentication from .conftest import encoded_jwt_factory, ISSUER1 from .keys import rsa_key class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { "issuer": ISSUER1,...
Use common test helpers in a test
Use common test helpers in a test
Python
bsd-2-clause
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
import json import time import uuid import pytest from jose import jwt from helusers.oidc import ApiTokenAuthentication from .keys import rsa_key ISSUER = "test_issuer" class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { "issuer": IS...
import json import uuid import pytest from helusers.oidc import ApiTokenAuthentication from .conftest import encoded_jwt_factory, ISSUER1 from .keys import rsa_key class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { "issuer": ISSUER1,...
<commit_before>import json import time import uuid import pytest from jose import jwt from helusers.oidc import ApiTokenAuthentication from .keys import rsa_key ISSUER = "test_issuer" class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { ...
import json import uuid import pytest from helusers.oidc import ApiTokenAuthentication from .conftest import encoded_jwt_factory, ISSUER1 from .keys import rsa_key class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { "issuer": ISSUER1,...
import json import time import uuid import pytest from jose import jwt from helusers.oidc import ApiTokenAuthentication from .keys import rsa_key ISSUER = "test_issuer" class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { "issuer": IS...
<commit_before>import json import time import uuid import pytest from jose import jwt from helusers.oidc import ApiTokenAuthentication from .keys import rsa_key ISSUER = "test_issuer" class _TestableApiTokenAuthentication(ApiTokenAuthentication): @property def oidc_config(self): return { ...
44f1e6ec95305bd7b4d69bbcdfb386f5ca958bdc
imagedownloader/stations/tests/units/test_devices.py
imagedownloader/stations/tests/units/test_devices.py
# -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestProducts(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serialization(self): ...
# -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestDevices(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serialization(self): ...
Correct the name of the devices' test case to TestDevices (copy&paste bug).
stations: Correct the name of the devices' test case to TestDevices (copy&paste bug).
Python
mit
gersolar/solar_radiation_model,ahMarrone/solar_radiation_model,scottlittle/solar_radiation_model
# -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestProducts(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serialization(self): ...
# -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestDevices(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serialization(self): ...
<commit_before># -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestProducts(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serial...
# -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestDevices(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serialization(self): ...
# -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestProducts(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serialization(self): ...
<commit_before># -*- coding: utf-8 -*- from stations.models import * from django.test import TestCase from datetime import datetime import pytz class TestProducts(TestCase): fixtures = [ 'initial_data.yaml', '*'] def setUp(self): self.device = Device.objects.filter(product__name = 'CMP 11')[0] def test_serial...
a7ccf4fac47762668214916b1c5c05d78c563bf5
tests/integration/test_redirection_relative.py
tests/integration/test_redirection_relative.py
"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_double_slash_in_rss,...
"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_double_slash_in_rss,...
Refactor in preparation of merge of relative tests.
Refactor in preparation of merge of relative tests.
Python
mit
getnikola/nikola,okin/nikola,okin/nikola,getnikola/nikola,okin/nikola,okin/nikola,getnikola/nikola,getnikola/nikola
"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_double_slash_in_rss,...
"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_double_slash_in_rss,...
<commit_before>"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_doubl...
"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_double_slash_in_rss,...
"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_double_slash_in_rss,...
<commit_before>"""Check relative REDIRECTIONS""" import io import os import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import append_config, cd from .test_demo_build import prepare_demo_site from .test_empty_build import ( # NOQA test_archive_exists, test_avoid_doubl...
76756a31e15cb5a9b756030c3bd90d06c898b524
go/apps/surveys/definition.py
go/apps/surveys/definition.py
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) from go.apps.surveys.tasks import export_vxpolls_data class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True needs_gro...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True needs_group = True needs_running = True def check_disa...
Move survey action celery task import to method scope.
Move survey action celery task import to method scope.
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) from go.apps.surveys.tasks import export_vxpolls_data class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True needs_gro...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True needs_group = True needs_running = True def check_disa...
<commit_before>from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) from go.apps.surveys.tasks import export_vxpolls_data class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True needs_group = True needs_running = True def check_disa...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) from go.apps.surveys.tasks import export_vxpolls_data class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True needs_gro...
<commit_before>from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) from go.apps.surveys.tasks import export_vxpolls_data class SendSurveyAction(ConversationAction): action_name = 'send_survey' action_display_name = 'Send Survey' needs_confirmation = True...
c3ff26ad884592d297e1aec67bce468e6669fc96
panoptes_cli/scripts/panoptes.py
panoptes_cli/scripts/panoptes.py
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.config = { ...
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option('--endpoint', type=str) @click.option('--admin', is_flag=True) @click.pass_context def cli(ctx, endpoint, admin): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_di...
Add --admin option for connecting in admin mode
Add --admin option for connecting in admin mode
Python
apache-2.0
zooniverse/panoptes-cli
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.config = { ...
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option('--endpoint', type=str) @click.option('--admin', is_flag=True) @click.pass_context def cli(ctx, endpoint, admin): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_di...
<commit_before>import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx....
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option('--endpoint', type=str) @click.option('--admin', is_flag=True) @click.pass_context def cli(ctx, endpoint, admin): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_di...
import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx.config = { ...
<commit_before>import click import os import yaml from panoptes_client import Panoptes @click.group() @click.option( '--endpoint', type=str ) @click.pass_context def cli(ctx, endpoint): ctx.config_dir = os.path.expanduser('~/.panoptes/') ctx.config_file = os.path.join(ctx.config_dir, 'config.yml') ctx....