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
9904e3843b2efca908845d57033b13f35c2e2a4d
st2auth_pam_backend/__init__.py
st2auth_pam_backend/__init__.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Fix code so import works under Python 3.
Fix code so import works under Python 3.
Python
apache-2.0
StackStorm/st2-auth-backend-pam,StackStorm/st2-auth-backend-pam
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
4b7466e3798dea0b3edf94c1e5cc376ba7615d2f
events/models.py
events/models.py
from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHOICES = ( ...
from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHOICES = ( ...
Add a description to an event
[add] Add a description to an event
Python
agpl-3.0
UrLab/incubator,UrLab/incubator,UrLab/incubator,UrLab/incubator
from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHOICES = ( ...
from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHOICES = ( ...
<commit_before>from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHO...
from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHOICES = ( ...
from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHOICES = ( ...
<commit_before>from django.db import models from django.conf import settings # Create your models here. #Events : # Des users peuvent participer à un event # Les gens peuvnet être "intéressés" # Utiliser https://github.com/thoas/django-sequere ? # API hackeragenda class Event(models.Model): STATUS_CHO...
ca4d5ac415c16594afff5e8c39c732f58e1e3de2
recommender/__init__.py
recommender/__init__.py
from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preferance_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0'
from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preference_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0'
Update function name to correct spelling
Update function name to correct spelling Signed-off-by: Tran Ly Vu <0555cc0f3d5a46ac8c0e84ddf31443494c66bd55@gmail.com>
Python
apache-2.0
tranlyvu/recommender
from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preferance_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0' Update function name to...
from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preference_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0'
<commit_before>from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preferance_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0' <commit_...
from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preference_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0'
from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preferance_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0' Update function name to...
<commit_before>from .similarity_measure import ( cosine, euclidean_distance, pearson_correlation ) from .similar_item import ( find_similar_item, preferance_space_transform, user_match ) __all__=[ 'dataHandle', 'recommenderEngine', 'similarItem', 'similarityMeasure' ] __version__ = '1.0.0' <commit_...
b5acf414e9fcbecee8da15e2757a60ce10cc5c10
examples/last.py
examples/last.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): result = m.dow...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): result = m.dow...
Fix KeyError when no results in time period
Fix KeyError when no results in time period Fix a KeyError when no results were found for the specified time period.
Python
bsd-2-clause
pombredanne/PyMISP,iglocska/PyMISP
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): result = m.dow...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): result = m.dow...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): result = m.dow...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): result = m.dow...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from pymisp import PyMISP from keys import misp_url, misp_key import argparse import os import json # Usage for pipe masters: ./last.py -l 5h | jq . def init(url, key): return PyMISP(url, key, True, 'json') def download_last(m, last, out=None): ...
af21288fb4245fc56a0b182331cd4db724e05e62
app/accounts/admin.py
app/accounts/admin.py
from django.contrib import admin from .models import UserProfile admin.site.register(UserProfile)
from django.contrib import admin from .models import UserProfile @admin.register(UserProfile) class UserProfileAdmin(admin.ModelAdmin): fieldsets = [ ('User Profile', { 'fields': ('user', 'custom_auth_id', 'facebook_oauth_id', 'google_oauth_id', 'twitter_oauth_id',), ...
Add description for Userprofile model
Add description for Userprofile model
Python
mit
teamtaverna/core
from django.contrib import admin from .models import UserProfile admin.site.register(UserProfile) Add description for Userprofile model
from django.contrib import admin from .models import UserProfile @admin.register(UserProfile) class UserProfileAdmin(admin.ModelAdmin): fieldsets = [ ('User Profile', { 'fields': ('user', 'custom_auth_id', 'facebook_oauth_id', 'google_oauth_id', 'twitter_oauth_id',), ...
<commit_before>from django.contrib import admin from .models import UserProfile admin.site.register(UserProfile) <commit_msg>Add description for Userprofile model<commit_after>
from django.contrib import admin from .models import UserProfile @admin.register(UserProfile) class UserProfileAdmin(admin.ModelAdmin): fieldsets = [ ('User Profile', { 'fields': ('user', 'custom_auth_id', 'facebook_oauth_id', 'google_oauth_id', 'twitter_oauth_id',), ...
from django.contrib import admin from .models import UserProfile admin.site.register(UserProfile) Add description for Userprofile modelfrom django.contrib import admin from .models import UserProfile @admin.register(UserProfile) class UserProfileAdmin(admin.ModelAdmin): fieldsets = [ ('User Profile', ...
<commit_before>from django.contrib import admin from .models import UserProfile admin.site.register(UserProfile) <commit_msg>Add description for Userprofile model<commit_after>from django.contrib import admin from .models import UserProfile @admin.register(UserProfile) class UserProfileAdmin(admin.ModelAdmin): ...
4d2ef07c64603e99f05f2233382dc2a7c5bff5ba
website/members/tests.py
website/members/tests.py
from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.user) se...
from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member, StudyProgram class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.us...
Add test for StudyProgram deletion
:green_heart: Add test for StudyProgram deletion
Python
agpl-3.0
Dekker1/moore,UTNkar/moore,Dekker1/moore,UTNkar/moore,Dekker1/moore,UTNkar/moore,Dekker1/moore,UTNkar/moore
from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.user) se...
from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member, StudyProgram class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.us...
<commit_before>from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.u...
from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member, StudyProgram class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.us...
from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.user) se...
<commit_before>from django.contrib.auth.models import User from django.test import TestCase from datetime import datetime from members.models import Member class MemberTest(TestCase): def setUp(self): self.user = User.objects.create(username='test') self.member = Member.objects.create(user=self.u...
57b45988072cdc57d90ea11d673b283a5473cd14
routes.py
routes.py
from flask import Flask, render_template, request from models import db from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") @app.route("/ab...
from flask import Flask, render_template, request from models import db, User from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") @app.rout...
Add new user form data to db
Add new user form data to db
Python
apache-2.0
cristobal23/strabo,cristobal23/strabo
from flask import Flask, render_template, request from models import db from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") @app.route("/ab...
from flask import Flask, render_template, request from models import db, User from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") @app.rout...
<commit_before>from flask import Flask, render_template, request from models import db from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") ...
from flask import Flask, render_template, request from models import db, User from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") @app.rout...
from flask import Flask, render_template, request from models import db from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") @app.route("/ab...
<commit_before>from flask import Flask, render_template, request from models import db from forms import SignupForm app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/strabo' db.init_app(app) app.secret_key = "" @app.route("/") def index(): return render_template("index.html") ...
019c13489eceb315f7a0edb72296f32c35339d93
joulupukki/api/controllers/v3/v3.py
joulupukki/api/controllers/v3/v3.py
import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController authcontroller = importlib....
import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController class V3Controller(object):...
Fix api starting with auth set
Fix api starting with auth set
Python
agpl-3.0
jlpk/joulupukki-api
import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController authcontroller = importlib....
import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController class V3Controller(object):...
<commit_before>import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController authcontroll...
import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController class V3Controller(object):...
import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController authcontroller = importlib....
<commit_before>import importlib import pecan from joulupukki.api.controllers.v3.users import UsersController from joulupukki.api.controllers.v3.projects import ProjectsController from joulupukki.api.controllers.v3.stats import StatsController from joulupukki.api.controllers.v3.auth import AuthController authcontroll...
4257381997e8ac6968713f1bad96019f977bafc9
server.py
server.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('bug_tracker', 'CONSUMER_KEY') CONSUMER_SECRET = pa...
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('Twitter', 'CONSUMER_KEY') CONSUMER_SECRET = parser...
Fix config parsing. Tweeting works
Fix config parsing. Tweeting works
Python
mit
premgane/agolo-twitterbot,premgane/agolo-twitterbot
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('bug_tracker', 'CONSUMER_KEY') CONSUMER_SECRET = pa...
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('Twitter', 'CONSUMER_KEY') CONSUMER_SECRET = parser...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('bug_tracker', 'CONSUMER_KEY') CONSU...
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('Twitter', 'CONSUMER_KEY') CONSUMER_SECRET = parser...
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('bug_tracker', 'CONSUMER_KEY') CONSUMER_SECRET = pa...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os from ConfigParser import SafeConfigParser parser = SafeConfigParser() parser.read('secrets.cfg') #enter the corresponding information from your Twitter application: CONSUMER_KEY = parser.get('bug_tracker', 'CONSUMER_KEY') CONSU...
9f512fd6f3c7d2928c66062002b18b7bb13a5653
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): """Provi...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): ...
Remove the "3" from SublimeLinter3
Remove the "3" from SublimeLinter3
Python
mit
jonlabelle/SublimeLinter-contrib-markdownlint,jonlabelle/SublimeLinter-contrib-markdownlint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): """Provi...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter...
# # linter.py # Markdown Linter for SublimeLinter, a code checking framework # for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter): """Provi...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jon LaBelle # Copyright (c) 2018 Jon LaBelle # # License: MIT # """This module exports the Markdownlint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Markdownlint(NodeLinter...
5decd7e68c6454e455bc1debe232ea37f7260c58
mixins.py
mixins.py
class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self): serializer_class = self.serializer_class query_params = self.request.QUERY_PARAMS depth = query_params.get('__depth', None) serializer_cla...
class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self, *args, **kwargs): serializer_class = super(DepthSerializerMixin, self).get_serializer_class(*args, **kwargs) query_params = self.request.QUERY_...
Call method 'get_serializer_class' of the Class parent
Call method 'get_serializer_class' of the Class parent
Python
mit
krescruz/depth-serializer-mixin
class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self): serializer_class = self.serializer_class query_params = self.request.QUERY_PARAMS depth = query_params.get('__depth', None) serializer_cla...
class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self, *args, **kwargs): serializer_class = super(DepthSerializerMixin, self).get_serializer_class(*args, **kwargs) query_params = self.request.QUERY_...
<commit_before>class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self): serializer_class = self.serializer_class query_params = self.request.QUERY_PARAMS depth = query_params.get('__depth', None) ...
class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self, *args, **kwargs): serializer_class = super(DepthSerializerMixin, self).get_serializer_class(*args, **kwargs) query_params = self.request.QUERY_...
class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self): serializer_class = self.serializer_class query_params = self.request.QUERY_PARAMS depth = query_params.get('__depth', None) serializer_cla...
<commit_before>class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self): serializer_class = self.serializer_class query_params = self.request.QUERY_PARAMS depth = query_params.get('__depth', None) ...
bed9e520a371a99132e05511f110a141d22d2a7f
tests/integration/test_proxy.py
tests/integration/test_proxy.py
# -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import SocketServer import SimpleHTTPServer import pytest requests = pytest.importorskip("requests") from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.SimpleHTTPRequestH...
# -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import pytest requests = pytest.importorskip("requests") from six.moves import socketserver, SimpleHTTPServer from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.SimpleHTT...
Fix `socketserver` for Python 3
Fix `socketserver` for Python 3
Python
mit
graingert/vcrpy,kevin1024/vcrpy,graingert/vcrpy,kevin1024/vcrpy
# -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import SocketServer import SimpleHTTPServer import pytest requests = pytest.importorskip("requests") from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.SimpleHTTPRequestH...
# -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import pytest requests = pytest.importorskip("requests") from six.moves import socketserver, SimpleHTTPServer from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.SimpleHTT...
<commit_before># -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import SocketServer import SimpleHTTPServer import pytest requests = pytest.importorskip("requests") from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.Sim...
# -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import pytest requests = pytest.importorskip("requests") from six.moves import socketserver, SimpleHTTPServer from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.SimpleHTT...
# -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import SocketServer import SimpleHTTPServer import pytest requests = pytest.importorskip("requests") from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.SimpleHTTPRequestH...
<commit_before># -*- coding: utf-8 -*- '''Test using a proxy.''' # External imports import multiprocessing import SocketServer import SimpleHTTPServer import pytest requests = pytest.importorskip("requests") from six.moves.urllib.request import urlopen # Internal imports import vcr class Proxy(SimpleHTTPServer.Sim...
ff618ea57b8f3d71772bcef5f7fecf9eceae4e3d
scripts/upsrv_schema.py
scripts/upsrv_schema.py
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = ServerConfig(...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = Ser...
Set log level to 2 when migrating so there is some indication it is running
Set log level to 2 when migrating so there is some indication it is running
Python
apache-2.0
sassoftware/rbm,sassoftware/rbm,sassoftware/rbm
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = ServerConfig(...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = Ser...
<commit_before>#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg ...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes, tracelog from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = Ser...
#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg = ServerConfig(...
<commit_before>#!/usr/bin/python # Copyright (c) 2006 rPath, Inc # All rights reserved import sys import os import pwd from conary.server import schema from conary.lib import cfgtypes from conary.repository.netrepos.netserver import ServerConfig from conary import dbstore cnrPath = '/srv/conary/repository.cnr' cfg ...
85e77bc7a4706ed1b25d4d53e71ca22beafed411
sidertests/test_sider.py
sidertests/test_sider.py
import doctest import os def test_doctest_types(): from sider import types assert 0 == doctest.testmod(types)[0] def test_doctest_datetime(): from sider import datetime assert 0 == doctest.testmod(datetime)[0] exttest_count = 0 def test_ext(): from sider.ext import _exttest assert _extte...
import os exttest_count = 0 def test_ext(): from sider.ext import _exttest assert _exttest.ext_loaded == 'yes' assert exttest_count == 1 from sider import ext assert ext._exttest is _exttest try: import sider.ext._noexttest except ImportError as e: assert str(e) == "No mo...
Drop useless tests that invoking doctests
Drop useless tests that invoking doctests
Python
mit
longfin/sider,dahlia/sider,longfin/sider
import doctest import os def test_doctest_types(): from sider import types assert 0 == doctest.testmod(types)[0] def test_doctest_datetime(): from sider import datetime assert 0 == doctest.testmod(datetime)[0] exttest_count = 0 def test_ext(): from sider.ext import _exttest assert _extte...
import os exttest_count = 0 def test_ext(): from sider.ext import _exttest assert _exttest.ext_loaded == 'yes' assert exttest_count == 1 from sider import ext assert ext._exttest is _exttest try: import sider.ext._noexttest except ImportError as e: assert str(e) == "No mo...
<commit_before>import doctest import os def test_doctest_types(): from sider import types assert 0 == doctest.testmod(types)[0] def test_doctest_datetime(): from sider import datetime assert 0 == doctest.testmod(datetime)[0] exttest_count = 0 def test_ext(): from sider.ext import _exttest ...
import os exttest_count = 0 def test_ext(): from sider.ext import _exttest assert _exttest.ext_loaded == 'yes' assert exttest_count == 1 from sider import ext assert ext._exttest is _exttest try: import sider.ext._noexttest except ImportError as e: assert str(e) == "No mo...
import doctest import os def test_doctest_types(): from sider import types assert 0 == doctest.testmod(types)[0] def test_doctest_datetime(): from sider import datetime assert 0 == doctest.testmod(datetime)[0] exttest_count = 0 def test_ext(): from sider.ext import _exttest assert _extte...
<commit_before>import doctest import os def test_doctest_types(): from sider import types assert 0 == doctest.testmod(types)[0] def test_doctest_datetime(): from sider import datetime assert 0 == doctest.testmod(datetime)[0] exttest_count = 0 def test_ext(): from sider.ext import _exttest ...
7b13749feea6c798fb6221ae78ba89033fbd2c45
tests/test_actions/test_init.py
tests/test_actions/test_init.py
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized self.assertRaises(exceptions.UninitializedError, actions.Action, os.getcwd()) def tes...
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized os.chdir('/') self.assertRaises(exceptions.UninitializedError, actions.Action, os....
Change directory to test uninitialized project
Change directory to test uninitialized project
Python
mit
Lingotek/translation-utility,Lingotek/translation-utility,Lingotek/client,Lingotek/filesystem-connector,Lingotek/client,Lingotek/filesystem-connector
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized self.assertRaises(exceptions.UninitializedError, actions.Action, os.getcwd()) def tes...
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized os.chdir('/') self.assertRaises(exceptions.UninitializedError, actions.Action, os....
<commit_before>from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized self.assertRaises(exceptions.UninitializedError, actions.Action, os.getcwd(...
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized os.chdir('/') self.assertRaises(exceptions.UninitializedError, actions.Action, os....
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized self.assertRaises(exceptions.UninitializedError, actions.Action, os.getcwd()) def tes...
<commit_before>from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized self.assertRaises(exceptions.UninitializedError, actions.Action, os.getcwd(...
1010cb2c4a4930254e2586949314aa0bb6b89b3d
tests/test_solver_constraint.py
tests/test_solver_constraint.py
import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(handler): v = ...
import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(handler): v = ...
Test default case for constraint.solve()
Test default case for constraint.solve()
Python
lgpl-2.1
amolenaar/gaphas
import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(handler): v = ...
import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(handler): v = ...
<commit_before>import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(han...
import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(handler): v = ...
import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(handler): v = ...
<commit_before>import pytest from gaphas.solver import Constraint, MultiConstraint, Variable @pytest.fixture def handler(): events = [] def handler(e): events.append(e) handler.events = events # type: ignore[attr-defined] return handler def test_constraint_propagates_variable_changed(han...
2e040a77b70b4a07227f5aa3cb3aee6b8c84f4e0
src/livedumper/common.py
src/livedumper/common.py
"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid option. Returns: 'True' if user answered 'y', ...
"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool try: input = raw_input except NameError: pass def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid ...
Fix Python 2 compatibility, again
Fix Python 2 compatibility, again
Python
bsd-2-clause
m45t3r/livedumper
"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid option. Returns: 'True' if user answered 'y', ...
"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool try: input = raw_input except NameError: pass def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid ...
<commit_before>"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid option. Returns: 'True' if user...
"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool try: input = raw_input except NameError: pass def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid ...
"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid option. Returns: 'True' if user answered 'y', ...
<commit_before>"Common functions that may be used everywhere" from __future__ import print_function import os import sys from distutils.util import strtobool def yes_no_query(question): """Ask the user *question* for 'yes' or 'no'; ask again until user inputs a valid option. Returns: 'True' if user...
a76101c9ad416323b9379d48adb61c804a5454c0
localized_fields/admin.py
localized_fields/admin.py
from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWidget}, Local...
from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widg...
Fix LocalizedFieldsAdminMixin not having a base class
Fix LocalizedFieldsAdminMixin not having a base class This was a breaking change and broke a lot of projects.
Python
mit
SectorLabs/django-localized-fields,SectorLabs/django-localized-fields,SectorLabs/django-localized-fields
from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWidget}, Local...
from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widg...
<commit_before>from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWid...
from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widg...
from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWidget}, Local...
<commit_before>from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWid...
8ccffcf02cd5ba8352bc8182d7be13ea015332ca
plinth/utils.py
plinth/utils.py
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
Add utility method to lazy format lazy string
Add utility method to lazy format lazy string This method is useful to format strings that are lazy (such as those in Forms).
Python
agpl-3.0
freedomboxtwh/Plinth,harry-7/Plinth,kkampardi/Plinth,vignanl/Plinth,vignanl/Plinth,freedomboxtwh/Plinth,kkampardi/Plinth,harry-7/Plinth,harry-7/Plinth,freedomboxtwh/Plinth,vignanl/Plinth,freedomboxtwh/Plinth,kkampardi/Plinth,kkampardi/Plinth,freedomboxtwh/Plinth,vignanl/Plinth,harry-7/Plinth,harry-7/Plinth,kkampardi/Pl...
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># # This file is part of Plinth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
3313d611d7cc66bf607a341a5d9a6a5d96dfbec5
clowder_server/emailer.py
clowder_server/emailer.py
import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILURE: %s' % (name) ...
import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): slack_sent = False for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILUR...
Rename bot and prevent channel spamming
Rename bot and prevent channel spamming
Python
agpl-3.0
keithhackbarth/clowder_server,keithhackbarth/clowder_server,keithhackbarth/clowder_server,keithhackbarth/clowder_server
import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILURE: %s' % (name) ...
import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): slack_sent = False for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILUR...
<commit_before>import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILURE: %s' %...
import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): slack_sent = False for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILUR...
import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILURE: %s' % (name) ...
<commit_before>import os import requests from django.core.mail import send_mail from clowder_account.models import ClowderUser ADMIN_EMAIL = 'admin@clowder.io' def send_alert(company, name): for user in ClowderUser.objects.filter(company=company, allow_email_notifications=True): subject = 'FAILURE: %s' %...
a8823bdc00c83c72352985706f6503557540ae9d
src/ocspdash/web/wsgi.py
src/ocspdash/web/wsgi.py
# -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.run:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app = create_appli...
# -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.wsgi:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app = create_appl...
Update Charlie's stupid wrong documentation.
Update Charlie's stupid wrong documentation. I can't promise it's right now, though, cuz I didn't test it either. 🎉🎉🎉
Python
mit
scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash
# -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.run:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app = create_appli...
# -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.wsgi:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app = create_appl...
<commit_before># -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.run:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app...
# -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.wsgi:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app = create_appl...
# -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.run:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app = create_appli...
<commit_before># -*- coding: utf-8 -*- """This file should be used to run the flask app with something like Gunicorn. For example: gunicorn -b 0.0.0.0:8000 ocspdash.web.run:app This file should NOT be imported anywhere, though, since it would instantiate the app. """ from ocspdash.web import create_application app...
aafcc59ef14fe5af39a06e87bc44546a9da56fb6
lazy_helpers.py
lazy_helpers.py
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOptions() #Oops ...
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): import os if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOpti...
Add some more arguments for chrome driver
Add some more arguments for chrome driver
Python
apache-2.0
holdenk/diversity-analytics,holdenk/diversity-analytics
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOptions() #Oops ...
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): import os if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOpti...
<commit_before># Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOptions...
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): import os if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOpti...
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOptions() #Oops ...
<commit_before># Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None @classmethod def get(cls): if cls._driver is None: from selenium import webdriver # Configure headless mode options = webdriver.ChromeOptions...
92438a5450bc644f066a941efe16ec07cf3c129a
httoop/codecs/codec.py
httoop/codecs/codec.py
# -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset) if charset is not None else data.decode() @classmethod def encode(cls, data, charset=None...
# -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset or 'ascii') return data @classmethod def encode(cls, data, charset=None, mimetype=None):...
Make encoding and decoding strict
Make encoding and decoding strict * programmers must know what kind of data they use * don't guess encodings anymore
Python
mit
spaceone/httoop,spaceone/httoop,spaceone/httoop
# -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset) if charset is not None else data.decode() @classmethod def encode(cls, data, charset=None...
# -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset or 'ascii') return data @classmethod def encode(cls, data, charset=None, mimetype=None):...
<commit_before># -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset) if charset is not None else data.decode() @classmethod def encode(cls, dat...
# -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset or 'ascii') return data @classmethod def encode(cls, data, charset=None, mimetype=None):...
# -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset) if charset is not None else data.decode() @classmethod def encode(cls, data, charset=None...
<commit_before># -*- coding: utf-8 -*- from httoop.util import Unicode class Codec(object): @classmethod def decode(cls, data, charset=None, mimetype=None): # pragma: no cover if isinstance(data, bytes): data = data.decode(charset) if charset is not None else data.decode() @classmethod def encode(cls, dat...
c7723ff6d7f43330786e84802ef0bacf70d4ba67
instatrace/commands.py
instatrace/commands.py
# Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="Stat histograms")...
# Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="Stat histograms")...
Add a --filter flag to histograms
Add a --filter flag to histograms This ignores any lines in the input that don't contain "INSTATRACE: " and removes anything preceding that string before handling the sample.
Python
mit
pteichman/instatrace
# Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="Stat histograms")...
# Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="Stat histograms")...
<commit_before># Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="St...
# Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="Stat histograms")...
# Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="Stat histograms")...
<commit_before># Copyright (C) 2010 Peter Teichman import logging import os import sys import time from .stats import Histogram, Statistics log = logging.getLogger("instatrace") class HistogramsCommand: @classmethod def add_subparser(cls, parser): subparser = parser.add_parser("histograms", help="St...
504c7ad1a436af356ca73e2fe8934018e3a7547d
manage.py
manage.py
from vulyk.control import cli if __name__ == '__main__': cli()
#!/usr/bin/env python # -*- coding=utf-8 -*- from vulyk.control import cli if __name__ == '__main__': cli()
Make it more executable than it was
Make it more executable than it was
Python
bsd-3-clause
mrgambal/vulyk,mrgambal/vulyk,mrgambal/vulyk
from vulyk.control import cli if __name__ == '__main__': cli() Make it more executable than it was
#!/usr/bin/env python # -*- coding=utf-8 -*- from vulyk.control import cli if __name__ == '__main__': cli()
<commit_before>from vulyk.control import cli if __name__ == '__main__': cli() <commit_msg>Make it more executable than it was<commit_after>
#!/usr/bin/env python # -*- coding=utf-8 -*- from vulyk.control import cli if __name__ == '__main__': cli()
from vulyk.control import cli if __name__ == '__main__': cli() Make it more executable than it was#!/usr/bin/env python # -*- coding=utf-8 -*- from vulyk.control import cli if __name__ == '__main__': cli()
<commit_before>from vulyk.control import cli if __name__ == '__main__': cli() <commit_msg>Make it more executable than it was<commit_after>#!/usr/bin/env python # -*- coding=utf-8 -*- from vulyk.control import cli if __name__ == '__main__': cli()
d5a59b79a3b3d6c2209eb9dc486a40d635aa6778
solum/builder/config.py
solum/builder/config.py
# Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Add missing Auth hook to image builder
Add missing Auth hook to image builder Change-Id: I73f17c17a1f4d530c0351dacc2b10fbdcf3122e0
Python
apache-2.0
gilbertpilz/solum,stackforge/solum,gilbertpilz/solum,ed-/solum,openstack/solum,gilbertpilz/solum,openstack/solum,ed-/solum,stackforge/solum,devdattakulkarni/test-solum,gilbertpilz/solum,devdattakulkarni/test-solum,ed-/solum,ed-/solum
# Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
<commit_before># Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
<commit_before># Copyright 2014 - Rackspace Hosting # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
51d371918d0ffb5cc96c6faa67fb0a5cd3cf58ae
manage.py
manage.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "addendum", ] try: import so...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.admin", "django.contrib.contenttypes", "django.contrib.sites", "adde...
Add contrib.admin to locally installed apps
Add contrib.admin to locally installed apps
Python
bsd-2-clause
bennylope/django-addendum,bennylope/django-addendum
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "addendum", ] try: import so...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.admin", "django.contrib.contenttypes", "django.contrib.sites", "adde...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "addendum", ] try...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.admin", "django.contrib.contenttypes", "django.contrib.sites", "adde...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "addendum", ] try: import so...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Management command entry point for working with migrations """ import sys import django from django.conf import settings INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sites", "addendum", ] try...
b66b63d2a9a6919f3e735d46881740d27bcdc8a6
piper/process.py
piper/process.py
import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.proc = None self.success = None self.log = logbook.Logger(self.__class__.__name__) def setup(self): ""...
import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.popen = None self.success = None self.log = logbook.Logger(self.cmd) def setup(self): """ Setu...
Change logging setup for Process()
Change logging setup for Process() Also fix usage of badly named .proc variable.
Python
mit
thiderman/piper
import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.proc = None self.success = None self.log = logbook.Logger(self.__class__.__name__) def setup(self): ""...
import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.popen = None self.success = None self.log = logbook.Logger(self.cmd) def setup(self): """ Setu...
<commit_before>import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.proc = None self.success = None self.log = logbook.Logger(self.__class__.__name__) def setup(se...
import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.popen = None self.success = None self.log = logbook.Logger(self.cmd) def setup(self): """ Setu...
import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.proc = None self.success = None self.log = logbook.Logger(self.__class__.__name__) def setup(self): ""...
<commit_before>import subprocess as sub import logbook class Process(object): """ Helper class for running processes """ def __init__(self, cmd): self.cmd = cmd self.proc = None self.success = None self.log = logbook.Logger(self.__class__.__name__) def setup(se...
54a6e1463104b87a51d17f937c286721cf84466a
democracy_club/apps/donations/middleware.py
democracy_club/apps/donations/middleware.py
from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper class DonationFormMiddleware(object): def get_initial(self): return { 'payment_type': 'subscription', 'amount': 10, } def form_valid(self, request, form)...
from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper, PAYMENT_UNITS class DonationFormMiddleware(object): def get_initial(self, request): suggested_donation = request.GET.get('suggested_donation', 3) form_initial = { 'payme...
Allow altering the donation amount via a link and default to £3
Allow altering the donation amount via a link and default to £3
Python
bsd-3-clause
DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website
from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper class DonationFormMiddleware(object): def get_initial(self): return { 'payment_type': 'subscription', 'amount': 10, } def form_valid(self, request, form)...
from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper, PAYMENT_UNITS class DonationFormMiddleware(object): def get_initial(self, request): suggested_donation = request.GET.get('suggested_donation', 3) form_initial = { 'payme...
<commit_before>from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper class DonationFormMiddleware(object): def get_initial(self): return { 'payment_type': 'subscription', 'amount': 10, } def form_valid(self,...
from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper, PAYMENT_UNITS class DonationFormMiddleware(object): def get_initial(self, request): suggested_donation = request.GET.get('suggested_donation', 3) form_initial = { 'payme...
from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper class DonationFormMiddleware(object): def get_initial(self): return { 'payment_type': 'subscription', 'amount': 10, } def form_valid(self, request, form)...
<commit_before>from django.http import HttpResponseRedirect from .forms import DonationForm from .helpers import GoCardlessHelper class DonationFormMiddleware(object): def get_initial(self): return { 'payment_type': 'subscription', 'amount': 10, } def form_valid(self,...
7fe8df63288d72fba98fee2cf73a16c0a0b8e326
tests/functional/conftest.py
tests/functional/conftest.py
import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http://localhost:90...
import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http://localhost:90...
Work around a `httpretty` bug when returning None as the body
Work around a `httpretty` bug when returning None as the body I'm not sure if this is a bug or not. The docs state this must be a string. So this is as empty as we can get.
Python
bsd-2-clause
hypothesis/via,hypothesis/via,hypothesis/via
import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http://localhost:90...
import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http://localhost:90...
<commit_before>import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http...
import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http://localhost:90...
import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http://localhost:90...
<commit_before>import httpretty import pytest import webtest from via.app import create_app @pytest.fixture def test_app(pyramid_settings): return webtest.TestApp(create_app(None, **pyramid_settings)) @pytest.fixture def checkmate_pass(pyramid_settings): httpretty.register_uri( httpretty.GET, "http...
c0c1f964892289dd240de4d6121ebdda6c1753c1
penchy/jvms.py
penchy/jvms.py
class JVM(object): """ Base class for JVMs. Inheriting classes must implement: - ``get_commandline(*args, **options)`` to return a commandline that contains the options and runs the JVM """ def get_commandline(self, *args, **options): """ Return a commandline that ca...
class JVM(object): """ This class represents a JVM. """ def __init__(self, path, options=""): """ :param path: path to jvm executable relative to basepath :param options: string of options that will be passed to jvm """ self.basepath = '/' self.path = pa...
Move to new jvm specification.
Move to new jvm specification. Signed-off-by: Michael Markert <5eb998b7ac86da375651a4cd767b88c9dad25896@googlemail.com>
Python
mit
fhirschmann/penchy,fhirschmann/penchy
class JVM(object): """ Base class for JVMs. Inheriting classes must implement: - ``get_commandline(*args, **options)`` to return a commandline that contains the options and runs the JVM """ def get_commandline(self, *args, **options): """ Return a commandline that ca...
class JVM(object): """ This class represents a JVM. """ def __init__(self, path, options=""): """ :param path: path to jvm executable relative to basepath :param options: string of options that will be passed to jvm """ self.basepath = '/' self.path = pa...
<commit_before>class JVM(object): """ Base class for JVMs. Inheriting classes must implement: - ``get_commandline(*args, **options)`` to return a commandline that contains the options and runs the JVM """ def get_commandline(self, *args, **options): """ Return a comm...
class JVM(object): """ This class represents a JVM. """ def __init__(self, path, options=""): """ :param path: path to jvm executable relative to basepath :param options: string of options that will be passed to jvm """ self.basepath = '/' self.path = pa...
class JVM(object): """ Base class for JVMs. Inheriting classes must implement: - ``get_commandline(*args, **options)`` to return a commandline that contains the options and runs the JVM """ def get_commandline(self, *args, **options): """ Return a commandline that ca...
<commit_before>class JVM(object): """ Base class for JVMs. Inheriting classes must implement: - ``get_commandline(*args, **options)`` to return a commandline that contains the options and runs the JVM """ def get_commandline(self, *args, **options): """ Return a comm...
3ca9ae145e70a3339028d9de55544da739a86899
cura/CameraAnimation.py
cura/CameraAnimation.py
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def __init__(self, ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def __init__(self, ...
Undo logging and splitting up QVector3D. CURA-3334
Undo logging and splitting up QVector3D. CURA-3334
Python
agpl-3.0
hmflash/Cura,fieldOfView/Cura,Curahelper/Cura,ynotstartups/Wanhao,hmflash/Cura,Curahelper/Cura,fieldOfView/Cura,ynotstartups/Wanhao
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def __init__(self, ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def __init__(self, ...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def __init__(self, ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def __init__(self, ...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector from UM.Logger import Logger class CameraAnimation(QVariantAnimation): def ...
b870f61d131483dd42b3302057351f2461b2cfc6
tests/test_enrichment_fdr.py
tests/test_enrichment_fdr.py
import os def test(): """Test to find this error below. Traceback (most recent call last): File "../scripts/find_enrichment.py", line 130, in <module> study=study, methods=methods) File "../scripts/../goatools/go_enrichment.py", line 93, in __init__ self.run_study(stu...
import os def test(): """Ensure that a study with only unknown GO Terms will run gracefully.""" os.system("python {SCR} --alpha=0.05 {STUDY} {POP} {ASSN} --fdr --obo={OBO}".format( SCR="../scripts/find_enrichment.py", OBO="../go-basic.obo", STUDY="data/study_unknown", POP="../data/population", ...
Make Test description more elegant.
Make Test description more elegant.
Python
bsd-2-clause
fidelram/goatools,mfiers/goatools,lileiting/goatools,tanghaibao/goatools,mfiers/goatools,tanghaibao/goatools,fidelram/goatools,lileiting/goatools
import os def test(): """Test to find this error below. Traceback (most recent call last): File "../scripts/find_enrichment.py", line 130, in <module> study=study, methods=methods) File "../scripts/../goatools/go_enrichment.py", line 93, in __init__ self.run_study(stu...
import os def test(): """Ensure that a study with only unknown GO Terms will run gracefully.""" os.system("python {SCR} --alpha=0.05 {STUDY} {POP} {ASSN} --fdr --obo={OBO}".format( SCR="../scripts/find_enrichment.py", OBO="../go-basic.obo", STUDY="data/study_unknown", POP="../data/population", ...
<commit_before> import os def test(): """Test to find this error below. Traceback (most recent call last): File "../scripts/find_enrichment.py", line 130, in <module> study=study, methods=methods) File "../scripts/../goatools/go_enrichment.py", line 93, in __init__ sel...
import os def test(): """Ensure that a study with only unknown GO Terms will run gracefully.""" os.system("python {SCR} --alpha=0.05 {STUDY} {POP} {ASSN} --fdr --obo={OBO}".format( SCR="../scripts/find_enrichment.py", OBO="../go-basic.obo", STUDY="data/study_unknown", POP="../data/population", ...
import os def test(): """Test to find this error below. Traceback (most recent call last): File "../scripts/find_enrichment.py", line 130, in <module> study=study, methods=methods) File "../scripts/../goatools/go_enrichment.py", line 93, in __init__ self.run_study(stu...
<commit_before> import os def test(): """Test to find this error below. Traceback (most recent call last): File "../scripts/find_enrichment.py", line 130, in <module> study=study, methods=methods) File "../scripts/../goatools/go_enrichment.py", line 93, in __init__ sel...
fda563e9661c0a65256ba6b1a7416a0f4171f18e
sentence_transformers/readers/InputExample.py
sentence_transformers/readers/InputExample.py
from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: Union[List[str], List[int]] = [], label: Union[int, float] = None): """ Creates one InputExample with the given tex...
from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: List[str] = None, texts_tokenized: List[List[int]] = None, label: Union[int, float] = None): """ Creates one InputE...
Add field for pre-tokenized texts
Add field for pre-tokenized texts
Python
apache-2.0
UKPLab/sentence-transformers
from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: Union[List[str], List[int]] = [], label: Union[int, float] = None): """ Creates one InputExample with the given tex...
from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: List[str] = None, texts_tokenized: List[List[int]] = None, label: Union[int, float] = None): """ Creates one InputE...
<commit_before>from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: Union[List[str], List[int]] = [], label: Union[int, float] = None): """ Creates one InputExample wit...
from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: List[str] = None, texts_tokenized: List[List[int]] = None, label: Union[int, float] = None): """ Creates one InputE...
from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: Union[List[str], List[int]] = [], label: Union[int, float] = None): """ Creates one InputExample with the given tex...
<commit_before>from typing import Union, List class InputExample: """ Structure for one input example with texts, the label and a unique id """ def __init__(self, guid: str = '', texts: Union[List[str], List[int]] = [], label: Union[int, float] = None): """ Creates one InputExample wit...
08199327c411663a199ebf36379e88a514935399
chdb.py
chdb.py
import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE categories ''') db.execute(''' DROP TABLE articles ''') db.execute(''' ...
import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE IF EXISTS categories ''') db.execute(''' DROP TABLE IF EXISTS articles ''') ...
Revert "Remove IF EXISTS from DROP TABLE when resetting the db."
Revert "Remove IF EXISTS from DROP TABLE when resetting the db." This reverts commit a7dce25964cd740b0d0db86b255ede60c913e73d.
Python
mit
jhsoby/citationhunt,Stryn/citationhunt,jhsoby/citationhunt,Stryn/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,Stryn/citationhunt,Stryn/citationhunt
import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE categories ''') db.execute(''' DROP TABLE articles ''') db.execute(''' ...
import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE IF EXISTS categories ''') db.execute(''' DROP TABLE IF EXISTS articles ''') ...
<commit_before>import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE categories ''') db.execute(''' DROP TABLE articles ''') ...
import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE IF EXISTS categories ''') db.execute(''' DROP TABLE IF EXISTS articles ''') ...
import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE categories ''') db.execute(''' DROP TABLE articles ''') db.execute(''' ...
<commit_before>import sqlite3 DB_FILENAME = 'citationhunt.sqlite3' def init_db(): return sqlite3.connect(DB_FILENAME) def reset_db(): db = init_db() with db: db.execute(''' DROP TABLE categories ''') db.execute(''' DROP TABLE articles ''') ...
3e28adb3b32e1c88e9295c44e79840ebfe67f83f
py/foxgami/db.py
py/foxgami/db.py
import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result: return list(result) def query_single(sql,...
import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result.returns_rows: return list(result) def quer...
Use .returns_rows to determine if we should return list type
Use .returns_rows to determine if we should return list type
Python
mit
flubstep/foxgami.com,flubstep/foxgami.com
import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result: return list(result) def query_single(sql,...
import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result.returns_rows: return list(result) def quer...
<commit_before>import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result: return list(result) def qu...
import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result.returns_rows: return list(result) def quer...
import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result: return list(result) def query_single(sql,...
<commit_before>import functools from sqlalchemy import create_engine @functools.lru_cache() def engine(): return create_engine('postgresql://foxgami:foxgami@localhost/foxgami') def query(sql, args=()): e = engine() result = e.execute(sql, tuple(args)) if result: return list(result) def qu...
b3f3325484426e2f77dc2df092c316ed38584970
test/proper_noun_test.py
test/proper_noun_test.py
from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis"]) def test_...
from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis"]) def test_...
Update test now 'is' is a common word
Update test now 'is' is a common word
Python
mit
ejh243/MunroeJargonProfiler,ejh243/MunroeJargonProfiler
from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis"]) def test_...
from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis"]) def test_...
<commit_before> from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis...
from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis"]) def test_...
from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis"]) def test_...
<commit_before> from jargonprofiler.util import tag_proper_nouns from jargonprofiler.munroe import munroe_score def test_proper_noun_in_sentance(): assert tag_proper_nouns("My name is Eilis.") == set(["Eilis"]) def test_proper_noun_begins_sentance(): assert tag_proper_nouns("Eilis is a girl") == set(["Eilis...
50d8ad485549159d2186df2b6b01aee21e51cbc2
notebooks/machine_learning/track_meta.py
notebooks/machine_learning/track_meta.py
# See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='How Models Work'), dict(topic='Explore Your Data') ] notebooks = [ dict( filename='tut1.ipynb', lesson_idx=0, type='tu...
# See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='how models work'), dict(topic='exploring your data'), dict(topic='building your first machine learning model'), ] notebooks = [ dict( ...
Add third lesson and reword lesson topics
Add third lesson and reword lesson topics
Python
apache-2.0
Kaggle/learntools,Kaggle/learntools
# See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='How Models Work'), dict(topic='Explore Your Data') ] notebooks = [ dict( filename='tut1.ipynb', lesson_idx=0, type='tu...
# See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='how models work'), dict(topic='exploring your data'), dict(topic='building your first machine learning model'), ] notebooks = [ dict( ...
<commit_before># See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='How Models Work'), dict(topic='Explore Your Data') ] notebooks = [ dict( filename='tut1.ipynb', lesson_idx=0, ...
# See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='how models work'), dict(topic='exploring your data'), dict(topic='building your first machine learning model'), ] notebooks = [ dict( ...
# See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='How Models Work'), dict(topic='Explore Your Data') ] notebooks = [ dict( filename='tut1.ipynb', lesson_idx=0, type='tu...
<commit_before># See also examples/example_track/example_meta.py for a longer, commented example track = dict( author_username='dansbecker', ) lessons = [ dict(topic='How Models Work'), dict(topic='Explore Your Data') ] notebooks = [ dict( filename='tut1.ipynb', lesson_idx=0, ...
939a3be5b24715aae5fd334e6529ec96e1612def
allauth/socialaccount/providers/reddit/provider.py
allauth/socialaccount/providers/reddit/provider.py
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", dflt) re...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", dflt) re...
Use Reddit name as username
chore(reddit): Use Reddit name as username Using Reddit's screen name as username instead of first name will allow the sign to skip one more field.
Python
mit
pennersr/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth,rsalmaso/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", dflt) re...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", dflt) re...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", d...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", dflt) re...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", dflt) re...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", d...
d0380db930dbf145108a7ef0330dd19475f7fdee
test_arrange_schedule.py
test_arrange_schedule.py
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_crawler_cwb_img(system_setting): send_msg = ...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
Add test case for read_arrange_mode()
Add test case for read_arrange_mode()
Python
apache-2.0
Billy4195/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,chenyang14/electronic-blackboard,SWLBot/electronic-blackboard,Billy4195/electronic-blackboard,stvreumi/electronic-blackboard,chenyang14/electronic-blackboard,stvreumi/electronic-blackboard,Billy4195/electronic-blackboard,stvreum...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_crawler_cwb_img(system_setting): send_msg = ...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
<commit_before>from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_crawler_cwb_img(system_setting): ...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_crawler_cwb_img(system_setting): send_msg = ...
<commit_before>from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_crawler_cwb_img(system_setting): ...
3d46ec43570013bd68135126127c4027e25e3cfa
shapely/geos.py
shapely/geos.py
""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import os, sys # The GEOS shared lib if os.name == 'nt': dll = 'libgeos_c-1.dll' else: dll = 'libgeos_c.so' lgeos = CDLL(dll) # Exceptions class ReadingError(Except...
""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import sys # The GEOS shared lib if sys.platform == 'win32': dll = 'libgeos_c-1.dll' elif sys.platform == 'darwin': dll = 'libgeos_c.dylib' else: dll = 'libgeos_c....
Add untested support for the darwin platform
Add untested support for the darwin platform git-svn-id: 30e8e193f18ae0331cc1220771e45549f871ece9@762 b426a367-1105-0410-b9ff-cdf4ab011145
Python
bsd-3-clause
abali96/Shapely,jdmcbr/Shapely,abali96/Shapely,mouadino/Shapely,jdmcbr/Shapely,mouadino/Shapely,mindw/shapely,mindw/shapely
""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import os, sys # The GEOS shared lib if os.name == 'nt': dll = 'libgeos_c-1.dll' else: dll = 'libgeos_c.so' lgeos = CDLL(dll) # Exceptions class ReadingError(Except...
""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import sys # The GEOS shared lib if sys.platform == 'win32': dll = 'libgeos_c-1.dll' elif sys.platform == 'darwin': dll = 'libgeos_c.dylib' else: dll = 'libgeos_c....
<commit_before>""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import os, sys # The GEOS shared lib if os.name == 'nt': dll = 'libgeos_c-1.dll' else: dll = 'libgeos_c.so' lgeos = CDLL(dll) # Exceptions class Read...
""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import sys # The GEOS shared lib if sys.platform == 'win32': dll = 'libgeos_c-1.dll' elif sys.platform == 'darwin': dll = 'libgeos_c.dylib' else: dll = 'libgeos_c....
""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import os, sys # The GEOS shared lib if os.name == 'nt': dll = 'libgeos_c-1.dll' else: dll = 'libgeos_c.so' lgeos = CDLL(dll) # Exceptions class ReadingError(Except...
<commit_before>""" Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities. """ import atexit from ctypes import CDLL, CFUNCTYPE, c_char_p import os, sys # The GEOS shared lib if os.name == 'nt': dll = 'libgeos_c-1.dll' else: dll = 'libgeos_c.so' lgeos = CDLL(dll) # Exceptions class Read...
4c3e9723f67448e93da65ff10142a98176cebe9b
publishconf.py
publishconf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://pappasam.github.io' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' DELETE_OUTPUT_D...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://softwarejourneyman.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' DELETE_OUTP...
Change publish site to softwarejourneyman.com
Change publish site to softwarejourneyman.com
Python
mit
pappasam/pappasam.github.io,pappasam/pappasam.github.io
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://pappasam.github.io' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' DELETE_OUTPUT_D...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://softwarejourneyman.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' DELETE_OUTP...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://pappasam.github.io' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://softwarejourneyman.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' DELETE_OUTP...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://pappasam.github.io' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' DELETE_OUTPUT_D...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://pappasam.github.io' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' ...
e4427016abdc7ef146cd7550f2ac1dace07be442
plinky.py
plinky.py
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run(debug=True)
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run()
Remove debug flag from app
Remove debug flag from app
Python
mit
RaspberryPiFoundation/plinky,CodeClub/plinky,codecleaner/plinky,codecleaner/plinky,CodeClub/plinky,martinpeck/plinky,martinpeck/plinky,RaspberryPiFoundation/plinky,RaspberryPiFoundation/plinky
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run(debug=True) Remove debug flag from app
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run()
<commit_before>from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run(debug=True) <commit_msg>Remove debug flag from app<commit_after>
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run()
from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run(debug=True) Remove debug flag from appfrom flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.ru...
<commit_before>from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run(debug=True) <commit_msg>Remove debug flag from app<commit_after>from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World...
5998d66442ac0881309005a7bdbedc4ff91b0ea6
hs_core/management/commands/solr_queries.py
hs_core/management/commands/solr_queries.py
""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information about logical fi...
""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information about logical fi...
Clean up response to no queries.
Clean up response to no queries.
Python
bsd-3-clause
hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare
""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information about logical fi...
""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information about logical fi...
<commit_before>""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information a...
""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information about logical fi...
""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information about logical fi...
<commit_before>""" This prints the state of a facet query. It is used for debugging the faceting system. """ from django.core.management.base import BaseCommand from haystack.query import SearchQuerySet from hs_core.discovery_parser import ParseSQ class Command(BaseCommand): help = "Print debugging information a...
67f3694254e08331152cd410dec128c11e965222
daisyproducer/settings.py
daisyproducer/settings.py
from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djangoproject.com/wi...
from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djangopr...
Fix the path to external tools
Fix the path to external tools
Python
agpl-3.0
sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer
from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djangoproject.com/wi...
from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djangopr...
<commit_before>from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djang...
from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djangopr...
from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djangoproject.com/wi...
<commit_before>from settings_common import * PACKAGE_VERSION = "0.5" DEBUG = TEMPLATE_DEBUG = True DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline') EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp') SERVE_STATIC_FILES = True # the following is an idea from https://code.djang...
9fd54adcbd1d21232306d15dc7c6a786c867e455
src/som/compiler/sourcecode_compiler.py
src/som/compiler/sourcecode_compiler.py
import os def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_class, universe) class _Sourc...
import os from StringIO import StringIO def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_...
Use Python file objects directly as input
Use Python file objects directly as input - fix wrong separator between path and filename Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
Python
mit
SOM-st/PySOM,SOM-st/RPySOM,smarr/RTruffleSOM,smarr/PySOM,SOM-st/RTruffleSOM,smarr/PySOM,SOM-st/RPySOM,SOM-st/PySOM,smarr/RTruffleSOM,SOM-st/RTruffleSOM
import os def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_class, universe) class _Sourc...
import os from StringIO import StringIO def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_...
<commit_before>import os def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_class, universe...
import os from StringIO import StringIO def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_...
import os def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_class, universe) class _Sourc...
<commit_before>import os def compile_class_from_file(path, filename, system_class, universe): return _SourcecodeCompiler().compile(path, filename, system_class, universe) def compile_class_from_string(stmt, system_class, universe): return _SourcecodeCompiler().compile_class_string(stmt, system_class, universe...
9b10bd93191913aaedaa28fc693620a6c2e6d203
pml/load_csv.py
pml/load_csv.py
import os import csv from pml import lattice, element, device def load(directory, name, control_system): lat = lattice.Lattice(name, control_system) with open(os.path.join(directory, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e = ele...
import os import csv from pml import lattice, element, device def load(directory, mode, control_system): lat = lattice.Lattice(mode, control_system) with open(os.path.join(directory, mode, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e...
Simplify the way modes are loaded into a lattice
Simplify the way modes are loaded into a lattice
Python
apache-2.0
willrogers/pml,willrogers/pml
import os import csv from pml import lattice, element, device def load(directory, name, control_system): lat = lattice.Lattice(name, control_system) with open(os.path.join(directory, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e = ele...
import os import csv from pml import lattice, element, device def load(directory, mode, control_system): lat = lattice.Lattice(mode, control_system) with open(os.path.join(directory, mode, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e...
<commit_before>import os import csv from pml import lattice, element, device def load(directory, name, control_system): lat = lattice.Lattice(name, control_system) with open(os.path.join(directory, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: ...
import os import csv from pml import lattice, element, device def load(directory, mode, control_system): lat = lattice.Lattice(mode, control_system) with open(os.path.join(directory, mode, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e...
import os import csv from pml import lattice, element, device def load(directory, name, control_system): lat = lattice.Lattice(name, control_system) with open(os.path.join(directory, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: e = ele...
<commit_before>import os import csv from pml import lattice, element, device def load(directory, name, control_system): lat = lattice.Lattice(name, control_system) with open(os.path.join(directory, 'elements.csv')) as elements: csv_reader = csv.DictReader(elements) for item in csv_reader: ...
1619ba48666be69710cd6bcbffe663cd1f7c1066
troposphere/codeguruprofiler.py
troposphere/codeguruprofiler.py
# Copyright (c) 2020, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::ProfilingGroup" props = { 'AgentPermissions': (dict, False), 'ProfilingGroupName': (b...
# Copyright (c) 2012-2019, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 16.1.0 from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::Prof...
Add AWS::CodeGuruProfiler::ProfilingGroup.ComputePlatform per 2020-07-09 update
Add AWS::CodeGuruProfiler::ProfilingGroup.ComputePlatform per 2020-07-09 update
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere
# Copyright (c) 2020, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::ProfilingGroup" props = { 'AgentPermissions': (dict, False), 'ProfilingGroupName': (b...
# Copyright (c) 2012-2019, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 16.1.0 from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::Prof...
<commit_before># Copyright (c) 2020, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::ProfilingGroup" props = { 'AgentPermissions': (dict, False), 'Profilin...
# Copyright (c) 2012-2019, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 16.1.0 from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::Prof...
# Copyright (c) 2020, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::ProfilingGroup" props = { 'AgentPermissions': (dict, False), 'ProfilingGroupName': (b...
<commit_before># Copyright (c) 2020, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject class ProfilingGroup(AWSObject): resource_type = "AWS::CodeGuruProfiler::ProfilingGroup" props = { 'AgentPermissions': (dict, False), 'Profilin...
227ae986590bf2d5daa5aef028f5f4cd4c1e8917
tests/xtests/base.py
tests/xtests/base.py
from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=username, is_superus...
from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=username, is_superus...
Add session in tests Mock HttpRequest
Add session in tests Mock HttpRequest
Python
bsd-3-clause
alexsilva/django-xadmin,jneight/django-xadmin,merlian/django-xadmin,pobear/django-xadmin,cupen/django-xadmin,wbcyclist/django-xadmin,cgcgbcbc/django-xadmin,pobear/django-xadmin,t0nyren/django-xadmin,t0nyren/django-xadmin,marguslaak/django-xadmin,t0nyren/django-xadmin,vincent-fei/django-xadmin,iedparis8/django-xadmin,vi...
from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=username, is_superus...
from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=username, is_superus...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=usern...
from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=username, is_superus...
from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=username, is_superus...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from django.test.client import RequestFactory class BaseTest(TestCase): def setUp(self): self.factory = RequestFactory() def _create_superuser(self, username): return User.objects.create(username=usern...
58846603f8a5310bb0e6e1eaa9f9f599c315b041
django_webtest/response.py
django_webtest/response.py
# -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to make more django...
# -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to make more django...
Add url property to DjangoWebtestResponse so assertRedirects works in 1.6.
Add url property to DjangoWebtestResponse so assertRedirects works in 1.6.
Python
mit
kmike/django-webtest,helenst/django-webtest,vaad2/django-webtest,django-webtest/django-webtest,abbottc/django-webtest,kharandziuk/django-webtest,abbottc/django-webtest,MikeAmy/django-webtest,andrewyoung1991/django-webtest,helenst/django-webtest,yrik/django-webtest,andrewyoung1991/django-webtest,andriisoldatenko/django-...
# -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to make more django...
# -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to make more django...
<commit_before># -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to m...
# -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to make more django...
# -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to make more django...
<commit_before># -*- coding: utf-8 -*- from django.test import Client from django.http import SimpleCookie from webtest import TestResponse from django_webtest.compat import urlparse class DjangoWebtestResponse(TestResponse): """ WebOb's Response quacking more like django's HttpResponse. This is here to m...
124487f204c5dedea471bd2c45ad8b929ff7fae0
app/clients/sms/loadtesting.py
app/clients/sms/loadtesting.py
import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): super(FiretextClie...
import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): super(FiretextClie...
Fix from number on Load testing client
Fix from number on Load testing client
Python
mit
alphagov/notifications-api,alphagov/notifications-api
import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): super(FiretextClie...
import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): super(FiretextClie...
<commit_before>import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): sup...
import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): super(FiretextClie...
import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): super(FiretextClie...
<commit_before>import logging from flask import current_app from app.clients.sms.firetext import ( FiretextClient ) logger = logging.getLogger(__name__) class LoadtestingClient(FiretextClient): ''' Loadtest sms client. ''' def init_app(self, config, statsd_client, *args, **kwargs): sup...
b394f79132d952be20baf15725715691ace69ced
web/slas-web/web/urls.py
web/slas-web/web/urls.py
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
Change web admin page title
Change web admin page title
Python
mit
chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
<commit_before>"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'...
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
<commit_before>"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'...
e836f3c558085aa0a1275546ac45b8146254ee6b
test/default.py
test/default.py
from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" error = {"action": "GET", "exception_cls": "NotFound", "exception_msg": "(NotFound)", "status": "failed", "status_code": 404, "target": "/api...
"""Test module for pbs client.""" from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" config = MagicMock() config.server = 'http://server' config.api_key = 'apikey' config.pbclient = pbclient config.project = {'name': 'name', ...
Refactor error as a property.
Refactor error as a property.
Python
agpl-3.0
PyBossa/pbs,PyBossa/pbs,PyBossa/pbs
from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" error = {"action": "GET", "exception_cls": "NotFound", "exception_msg": "(NotFound)", "status": "failed", "status_code": 404, "target": "/api...
"""Test module for pbs client.""" from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" config = MagicMock() config.server = 'http://server' config.api_key = 'apikey' config.pbclient = pbclient config.project = {'name': 'name', ...
<commit_before>from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" error = {"action": "GET", "exception_cls": "NotFound", "exception_msg": "(NotFound)", "status": "failed", "status_code": 404, ...
"""Test module for pbs client.""" from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" config = MagicMock() config.server = 'http://server' config.api_key = 'apikey' config.pbclient = pbclient config.project = {'name': 'name', ...
from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" error = {"action": "GET", "exception_cls": "NotFound", "exception_msg": "(NotFound)", "status": "failed", "status_code": 404, "target": "/api...
<commit_before>from mock import MagicMock import pbclient class TestDefault(object): """Test class for pbs.helpers.""" error = {"action": "GET", "exception_cls": "NotFound", "exception_msg": "(NotFound)", "status": "failed", "status_code": 404, ...
fc561301c3a3aea79043348a01e6a468a5693d3e
tests/test_importable.py
tests/test_importable.py
"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api import isort.c...
"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api import isort.c...
Remove no longer needed import check
Remove no longer needed import check
Python
mit
PyCQA/isort,PyCQA/isort
"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api import isort.c...
"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api import isort.c...
<commit_before>"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api ...
"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api import isort.c...
"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api import isort.c...
<commit_before>"""Basic set of tests to ensure entire code base is importable""" import pytest def test_importable(): """Simple smoketest to ensure all isort modules are importable""" import isort import isort._future import isort._future._dataclasses import isort._version import isort.api ...
e3aa12af05003222b295a4cea39a1c05c911024a
main.py
main.py
from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() # start the game connect_four.start() if __name__ == "__main__": # Default "main method" idiom. main()
from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() menu_choice = 1 while menu_choice == 1: # start the game connect_four.start_new() # menu print("Menu") print("1 - Play again") print("2 - Quit") ...
Add menu to start new game and quit
Add menu to start new game and quit
Python
mit
LouisBarranqueiro/ia-connect-four-game
from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() # start the game connect_four.start() if __name__ == "__main__": # Default "main method" idiom. main()Add menu to start new game and quit
from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() menu_choice = 1 while menu_choice == 1: # start the game connect_four.start_new() # menu print("Menu") print("1 - Play again") print("2 - Quit") ...
<commit_before>from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() # start the game connect_four.start() if __name__ == "__main__": # Default "main method" idiom. main()<commit_msg>Add menu to start new game and quit<commit_after>
from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() menu_choice = 1 while menu_choice == 1: # start the game connect_four.start_new() # menu print("Menu") print("1 - Play again") print("2 - Quit") ...
from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() # start the game connect_four.start() if __name__ == "__main__": # Default "main method" idiom. main()Add menu to start new game and quitfrom connect_four import ConnectFour def main(): """...
<commit_before>from connect_four import ConnectFour def main(): """ Play a game! """ connect_four = ConnectFour() # start the game connect_four.start() if __name__ == "__main__": # Default "main method" idiom. main()<commit_msg>Add menu to start new game and quit<commit_after>from connect_four...
08c2e9144e605063ac3c6313efe639eb7139ba75
main.py
main.py
# Fox, rewritten in Python for literally no reason at all. import discord import asyncio print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox user ID: ' + fox.user.id) print('--...
# Fox, rewritten in Python for literally no reason at all. import discord import asyncio import plugins import plugins.core print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox u...
Add import statements for plugin system
Add import statements for plugin system Signed-off-by: Reed <f5cabf8735907151a446812c9875d6c0c712d847@plusreed.com>
Python
mit
plusreed/foxpy
# Fox, rewritten in Python for literally no reason at all. import discord import asyncio print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox user ID: ' + fox.user.id) print('--...
# Fox, rewritten in Python for literally no reason at all. import discord import asyncio import plugins import plugins.core print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox u...
<commit_before># Fox, rewritten in Python for literally no reason at all. import discord import asyncio print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox user ID: ' + fox.user.id...
# Fox, rewritten in Python for literally no reason at all. import discord import asyncio import plugins import plugins.core print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox u...
# Fox, rewritten in Python for literally no reason at all. import discord import asyncio print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox user ID: ' + fox.user.id) print('--...
<commit_before># Fox, rewritten in Python for literally no reason at all. import discord import asyncio print("Just a moment, Fox is initializing...") fox = discord.Client() @fox.event async def on_ready(): print('Fox is ready!') print('Fox username: ' + fox.user.name) print('Fox user ID: ' + fox.user.id...
ddc82357cafbf58822f4d98f484fbe4dd860743e
sqlviz.py
sqlviz.py
#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(self, source): ...
#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(self, source): ...
Fix reference to static var
Fix reference to static var
Python
mit
hawkw/sqlviz
#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(self, source): ...
#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(self, source): ...
<commit_before>#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(se...
#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(self, source): ...
#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(self, source): ...
<commit_before>#! usr/bin/env python3 from docopt import docopt from matplotlib import pyplot import re class Schema: """ Wraps the SQL source code for a schema and provides methods to get information about that schema. """ table_def = re.compile(r"CREATE TABLE|create table") def __init__(se...
cc08100734df4eea053758a04610d889ced8c476
dataportal/utils/diagnostics.py
dataportal/utils/diagnostics.py
from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns ------- resu...
from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns ------- resu...
Make watermark more resilient to err on import.
ENN: Make watermark more resilient to err on import.
Python
bsd-3-clause
tacaswell/dataportal,NSLS-II/dataportal,tacaswell/dataportal,danielballan/dataportal,danielballan/datamuxer,danielballan/datamuxer,ericdill/datamuxer,danielballan/dataportal,ericdill/databroker,ericdill/datamuxer,NSLS-II/dataportal,NSLS-II/datamuxer,ericdill/databroker
from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns ------- resu...
from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns ------- resu...
<commit_before>from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns -...
from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns ------- resu...
from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns ------- resu...
<commit_before>from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import OrderedDict import importlib import sys import six def watermark(): """ Give the version of each of the dependencies -- useful for bug reports. Returns -...
9ea9b0bed617dc8a309c0d2dd90f02ffbc34edbc
client/bin/daemon.py
client/bin/daemon.py
#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching request.') ...
#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching request.') ...
Fix POSTing from the client
Fix POSTing from the client
Python
agpl-3.0
strugee/realtime.recurse.com,strugee/realtime.recurse.com,strugee/realtime.recurse.com
#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching request.') ...
#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching request.') ...
<commit_before>#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching ...
#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching request.') ...
#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching request.') ...
<commit_before>#!/usr/bin/python import time import subprocess from os import path, chdir, getcwd import requests from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class ProjectEventHandler(FileSystemEventHandler): def on_any_event(self, event): print('Dispatching ...
c95fdbeb145e5bcef2ded646c2319b58ae9e996d
rpg_base/urls.py
rpg_base/urls.py
from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campaign.view, name='...
from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='campaign_index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campaign.vie...
Change name for campaign index url
Change name for campaign index url
Python
mit
ncphillips/django_rpg,ncphillips/django_rpg
from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campaign.view, name='...
from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='campaign_index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campaign.vie...
<commit_before>from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campai...
from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='campaign_index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campaign.vie...
from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campaign.view, name='...
<commit_before>from django.conf.urls import include, url from rpg_base.views import * urlpatterns = [ # Examples: # url(r'^$', 'django_rpg.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^campaign/$', campaign.index, name='index'), url(r'^campaign/(?P<pk>[0-9]+)/$', campai...
5203ecdaf839f58e7f00ef74fec9dbecbeb52583
tests/backends/__init__.py
tests/backends/__init__.py
from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_add(self): playlist = self.backend.current_playlist for uri in self.uris: playlist.add(uri...
from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_uri_set(self): self.assert_(self.uris) def test_add(self): playlist = self.backend.current_playlis...
Add test to check that uris are set
Add test to check that uris are set
Python
apache-2.0
kingosticks/mopidy,abarisain/mopidy,mopidy/mopidy,kingosticks/mopidy,dbrgn/mopidy,SuperStarPL/mopidy,ZenithDK/mopidy,jodal/mopidy,pacificIT/mopidy,diandiankan/mopidy,glogiotatidis/mopidy,pacificIT/mopidy,diandiankan/mopidy,abarisain/mopidy,ZenithDK/mopidy,dbrgn/mopidy,SuperStarPL/mopidy,diandiankan/mopidy,bencevans/mop...
from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_add(self): playlist = self.backend.current_playlist for uri in self.uris: playlist.add(uri...
from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_uri_set(self): self.assert_(self.uris) def test_add(self): playlist = self.backend.current_playlis...
<commit_before>from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_add(self): playlist = self.backend.current_playlist for uri in self.uris: p...
from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_uri_set(self): self.assert_(self.uris) def test_add(self): playlist = self.backend.current_playlis...
from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_add(self): playlist = self.backend.current_playlist for uri in self.uris: playlist.add(uri...
<commit_before>from mopidy.models import Track class BaseCurrentPlaylistControllerTest(object): uris = [] backend_class = None def setUp(self): self.backend = self.backend_class() def test_add(self): playlist = self.backend.current_playlist for uri in self.uris: p...
462b6878507e3928068745cccc80720e8699dafa
server.py
server.py
from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/sparql') spa...
from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request, jsonify from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/sparql'...
Return json object in flask app
Return json object in flask app Instead of a string, the flask app now returns the json object retrieved from the knowledge store.
Python
apache-2.0
NLeSC/EmbodiedEmotions,NLeSC/EmbodiedEmotions,NLeSC/UncertaintyVisualization,NLeSC/UncertaintyVisualization,NLeSC/EmbodiedEmotions
from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/sparql') spa...
from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request, jsonify from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/sparql'...
<commit_before>from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/s...
from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request, jsonify from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/sparql'...
from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/sparql') spa...
<commit_before>from flask import Flask from SPARQLWrapper import SPARQLWrapper, JSON from flask import request from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/') def hello_world(): auth = request.authorization sparql = SPARQLWrapper('https://knowledgestore2.fbk.eu/nwr/dutchhouse/s...
c5f75072707dbe9a723ffbff71ab01d0519b6baa
tools/generateDataset.py
tools/generateDataset.py
import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.request('vget /c...
import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.request('vget /c...
Structure of data generator iimproved
:muscle: Structure of data generator iimproved Structure of dataset generator improved
Python
bsd-2-clause
fkenghagho/RobotVQA
import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.request('vget /c...
import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.request('vget /c...
<commit_before>import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.r...
import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.request('vget /c...
import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.request('vget /c...
<commit_before>import numpy as np import os import sys import time from unrealcv import client class Dataset(object): def __init__(self,folder,nberOfImages): self.folder=folder self.nberOfImages=nberOfImages self.client.connect() def scan(): try: p=self.client.r...
0f2bc9cc1216dfd1e5a8f2aa8467428dc2be6781
scikits/learn/pyem/misc.py
scikits/learn/pyem/misc.py
# Last Change: Sat Jun 09 07:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = [0, 1] DEF_ELL_NP = ...
# Last Change: Sat Jun 09 08:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = (0, 1) DEF_ELL_NP = ...
Set def arguments to immutable to avoid nasty side effect.
Set def arguments to immutable to avoid nasty side effect. From: cdavid <cdavid@cb17146a-f446-4be1-a4f7-bd7c5bb65646> git-svn-id: a2d1b0e147e530765aaf3e1662d4a98e2f63c719@110 22fbfee3-77ab-4535-9bad-27d1bd3bc7d8
Python
bsd-3-clause
f3r/scikit-learn,cainiaocome/scikit-learn,tmhm/scikit-learn,schets/scikit-learn,chrsrds/scikit-learn,theoryno3/scikit-learn,harshaneelhg/scikit-learn,waterponey/scikit-learn,mayblue9/scikit-learn,larsmans/scikit-learn,florian-f/sklearn,IshankGulati/scikit-learn,etkirsch/scikit-learn,arabenjamin/scikit-learn,IssamLaradj...
# Last Change: Sat Jun 09 07:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = [0, 1] DEF_ELL_NP = ...
# Last Change: Sat Jun 09 08:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = (0, 1) DEF_ELL_NP = ...
<commit_before># Last Change: Sat Jun 09 07:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = [0, 1...
# Last Change: Sat Jun 09 08:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = (0, 1) DEF_ELL_NP = ...
# Last Change: Sat Jun 09 07:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = [0, 1] DEF_ELL_NP = ...
<commit_before># Last Change: Sat Jun 09 07:00 PM 2007 J #======================================================== # Constants used throughout the module (def args, etc...) #======================================================== # This is the default dimension for representing confidence ellipses DEF_VIS_DIM = [0, 1...
726beb71b45c7320b4e2e883f246d389709efe19
run_tracker.py
run_tracker.py
import sys from cloudtracker import main def run_tracker(input_dir): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input_dir + "\" \n" ) main.main(input_dir) print( "\n Entrainment analysis completed " ) if __name__ == '__main__': if len(sys.argv) == 1: ...
import sys, json from cloudtracker import main as tracker_main def run_tracker(input): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input + "\" \n" ) # Read .json configuration file with open('model_config.json', 'r') as json_file: config = json.load(json...
Read .json file from starter
Read .json file from starter
Python
bsd-2-clause
lorenghoh/loh_tracker
import sys from cloudtracker import main def run_tracker(input_dir): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input_dir + "\" \n" ) main.main(input_dir) print( "\n Entrainment analysis completed " ) if __name__ == '__main__': if len(sys.argv) == 1: ...
import sys, json from cloudtracker import main as tracker_main def run_tracker(input): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input + "\" \n" ) # Read .json configuration file with open('model_config.json', 'r') as json_file: config = json.load(json...
<commit_before>import sys from cloudtracker import main def run_tracker(input_dir): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input_dir + "\" \n" ) main.main(input_dir) print( "\n Entrainment analysis completed " ) if __name__ == '__main__': if len(sys.ar...
import sys, json from cloudtracker import main as tracker_main def run_tracker(input): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input + "\" \n" ) # Read .json configuration file with open('model_config.json', 'r') as json_file: config = json.load(json...
import sys from cloudtracker import main def run_tracker(input_dir): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input_dir + "\" \n" ) main.main(input_dir) print( "\n Entrainment analysis completed " ) if __name__ == '__main__': if len(sys.argv) == 1: ...
<commit_before>import sys from cloudtracker import main def run_tracker(input_dir): print( " Running the cloud-tracking algorithm... " ) print( " Input dir: \"" + input_dir + "\" \n" ) main.main(input_dir) print( "\n Entrainment analysis completed " ) if __name__ == '__main__': if len(sys.ar...
116708c5458b68110e75a593a0edaa0298bb5586
cyder/core/fields.py
cyder/core/fields.py
from django.db.models import CharField from django.core.exceptions import ValidationError from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC address. clean() removes colons and hyphens from the field value, raising...
from django.db.models import CharField, NOT_PROVIDED from django.core.exceptions import ValidationError from south.modelsinspector import add_introspection_rules from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC addre...
Add introspection rule; prevent South weirdness
Add introspection rule; prevent South weirdness
Python
bsd-3-clause
drkitty/cyder,murrown/cyder,OSU-Net/cyder,akeym/cyder,murrown/cyder,murrown/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,drkitty/cyder,zeeman/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder,OSU-Net/cyder,drkitty/cyder,zeeman/cyder,murrown/cyder,zeeman/cyder
from django.db.models import CharField from django.core.exceptions import ValidationError from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC address. clean() removes colons and hyphens from the field value, raising...
from django.db.models import CharField, NOT_PROVIDED from django.core.exceptions import ValidationError from south.modelsinspector import add_introspection_rules from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC addre...
<commit_before>from django.db.models import CharField from django.core.exceptions import ValidationError from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC address. clean() removes colons and hyphens from the field...
from django.db.models import CharField, NOT_PROVIDED from django.core.exceptions import ValidationError from south.modelsinspector import add_introspection_rules from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC addre...
from django.db.models import CharField from django.core.exceptions import ValidationError from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC address. clean() removes colons and hyphens from the field value, raising...
<commit_before>from django.db.models import CharField from django.core.exceptions import ValidationError from cyder.cydhcp.validation import validate_mac class MacAddrField(CharField): """A general purpose MAC address field This field holds a MAC address. clean() removes colons and hyphens from the field...
f2312d1546eb3f6de75cc03a2dabb427a2174e17
examples/sequencealignment.py
examples/sequencealignment.py
# Create sequences to be aligned. from alignment.sequence import Sequence a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a print "Sequence B:", b print # Create a vocabulary and encode the sequences. from alignment.vocabulary import Vocabulary v...
from alignment.sequence import Sequence from alignment.vocabulary import Vocabulary from alignment.sequencealigner import SimpleScoring, GlobalSequenceAligner # Create sequences to be aligned. a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a pr...
Update the sequence alignment example.
Update the sequence alignment example.
Python
bsd-3-clause
eseraygun/python-entities,eseraygun/python-alignment
# Create sequences to be aligned. from alignment.sequence import Sequence a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a print "Sequence B:", b print # Create a vocabulary and encode the sequences. from alignment.vocabulary import Vocabulary v...
from alignment.sequence import Sequence from alignment.vocabulary import Vocabulary from alignment.sequencealigner import SimpleScoring, GlobalSequenceAligner # Create sequences to be aligned. a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a pr...
<commit_before># Create sequences to be aligned. from alignment.sequence import Sequence a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a print "Sequence B:", b print # Create a vocabulary and encode the sequences. from alignment.vocabulary impo...
from alignment.sequence import Sequence from alignment.vocabulary import Vocabulary from alignment.sequencealigner import SimpleScoring, GlobalSequenceAligner # Create sequences to be aligned. a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a pr...
# Create sequences to be aligned. from alignment.sequence import Sequence a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a print "Sequence B:", b print # Create a vocabulary and encode the sequences. from alignment.vocabulary import Vocabulary v...
<commit_before># Create sequences to be aligned. from alignment.sequence import Sequence a = Sequence("what a beautiful day".split()) b = Sequence("what a disappointingly bad day".split()) print "Sequence A:", a print "Sequence B:", b print # Create a vocabulary and encode the sequences. from alignment.vocabulary impo...
5b9e168b4a855197b07527c468ef6b60c50ec0c7
avalanche/__init__.py
avalanche/__init__.py
from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.1.0a0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils import Avalanch...
from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.2.0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils import AvalancheD...
Set package version to 0.2.0
Set package version to 0.2.0
Python
mit
ContinualAI/avalanche,ContinualAI/avalanche
from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.1.0a0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils import Avalanch...
from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.2.0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils import AvalancheD...
<commit_before>from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.1.0a0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils ...
from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.2.0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils import AvalancheD...
from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.1.0a0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils import Avalanch...
<commit_before>from avalanche import benchmarks from avalanche import evaluation from avalanche import logging from avalanche import models from avalanche import training __version__ = "0.1.0a0" _dataset_add = None def _avdataset_radd(self, other, *args, **kwargs): from avalanche.benchmarks.utils ...
d584ccea9fe985fa230c937ee2e6a03ef6b99967
audio_pipeline/util/__init__.py
audio_pipeline/util/__init__.py
from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_name(cls, artist):...
from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_name(cls, artist):...
Check to make sure artist is not None, or evil will occur...
Check to make sure artist is not None, or evil will occur...
Python
mit
hidat/audio_pipeline
from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_name(cls, artist):...
from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_name(cls, artist):...
<commit_before>from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_nam...
from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_name(cls, artist):...
from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_name(cls, artist):...
<commit_before>from . import Exceptions from . import MBInfo from . import Tag from . import Util from . import format from . import Discogs import re # unknown artist input pattern: class Utilities: unknown_artist_pattern = re.compile(r'unknown artist|^\s*$', flags=re.I) @classmethod def know_artist_nam...
19e9080f06aa2264e77b65a9c1ad6d30e6b7da4c
app/aflafrettir/routes.py
app/aflafrettir/routes.py
from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/') def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', categories=categories, ...
from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/frettir') @aflafrettir.route('/', alias=True) def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', ...
Add a route for displaying posts by categories
Add a route for displaying posts by categories
Python
mit
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/') def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', categories=categories, ...
from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/frettir') @aflafrettir.route('/', alias=True) def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', ...
<commit_before>from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/') def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', categories=categories...
from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/frettir') @aflafrettir.route('/', alias=True) def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', ...
from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/') def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', categories=categories, ...
<commit_before>from flask import render_template from . import aflafrettir from ..models import User, Category, Post @aflafrettir.route('/') def index(): categories = Category.get_all_active() posts = Post.get_all() return render_template('aflafrettir/index.html', categories=categories...
1e5d549b6fdf62c1016451f9dfe566c9546b2f38
bcbio/bed/__init__.py
bcbio/bed/__init__.py
import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ if len(bed_files) == 0: if catted: return catted.sort() else: return catted if not catt...
import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ bed_files = [x for x in bed_files if x] if len(bed_files) == 0: if catted: # move to a .bed extension for do...
Move the file to have an extension of .bed.
Move the file to have an extension of .bed. A lot of tools detect what type of file it is by the extension, so this lets us pass on the BedTool.fn as the filename and not break things.
Python
mit
guillermo-carrasco/bcbio-nextgen,lbeltrame/bcbio-nextgen,gifford-lab/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen,vladsaveliev/bcbio-nextgen,brainstorm/bcbio-nextgen,mjafin/bcbio-nextgen,lbeltrame/bcbio-nextgen,elkingtonmcb/bcbio-nextgen,brainstorm/bcbio-nextgen,fw1121/bcbio-nextgen,verdurin/bcbio-nextgen,lpantano/bcbio-ne...
import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ if len(bed_files) == 0: if catted: return catted.sort() else: return catted if not catt...
import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ bed_files = [x for x in bed_files if x] if len(bed_files) == 0: if catted: # move to a .bed extension for do...
<commit_before>import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ if len(bed_files) == 0: if catted: return catted.sort() else: return catted ...
import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ bed_files = [x for x in bed_files if x] if len(bed_files) == 0: if catted: # move to a .bed extension for do...
import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ if len(bed_files) == 0: if catted: return catted.sort() else: return catted if not catt...
<commit_before>import pybedtools as bt import six def concat(bed_files, catted=None): """ recursively concat a set of BED files, returning a sorted bedtools object of the result """ if len(bed_files) == 0: if catted: return catted.sort() else: return catted ...
8abf65d6b364bd71e8aa32e25d319c77d716a85f
bin/verify_cached_graphs.py
bin/verify_cached_graphs.py
#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): graph = flow.build_graph(ignore_balances) cached = flow.get_cached_graph(ignore_balances) diff = compare(cached, graph) if diff: ...
#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): cached = flow.get_cached_graph(ignore_balances) if not cached: continue graph = flow.build_graph(ignore_balances) diff = com...
Fix cached graph verifier tool to handle case where no graph is cached ATM.
Fix cached graph verifier tool to handle case where no graph is cached ATM.
Python
agpl-3.0
rfugger/villagescc,rfugger/villagescc,rfugger/villagescc,rfugger/villagescc
#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): graph = flow.build_graph(ignore_balances) cached = flow.get_cached_graph(ignore_balances) diff = compare(cached, graph) if diff: ...
#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): cached = flow.get_cached_graph(ignore_balances) if not cached: continue graph = flow.build_graph(ignore_balances) diff = com...
<commit_before>#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): graph = flow.build_graph(ignore_balances) cached = flow.get_cached_graph(ignore_balances) diff = compare(cached, graph) i...
#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): cached = flow.get_cached_graph(ignore_balances) if not cached: continue graph = flow.build_graph(ignore_balances) diff = com...
#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): graph = flow.build_graph(ignore_balances) cached = flow.get_cached_graph(ignore_balances) diff = compare(cached, graph) if diff: ...
<commit_before>#!/usr/bin/env python import sys from pprint import pprint as pp from cc.payment import flow def verify(): for ignore_balances in (True, False): graph = flow.build_graph(ignore_balances) cached = flow.get_cached_graph(ignore_balances) diff = compare(cached, graph) i...
5d63656e9b03aaed2ef9042ff61a86bc4b8ee715
django_rq/decorators.py
django_rq/decorators.py
from django.utils import six from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, it allows simpl...
from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, it allows simplified ``@job`` syntax to put ...
Add a fallback for older Django versions that doesn't come with "six"
Add a fallback for older Django versions that doesn't come with "six"
Python
mit
meteozond/django-rq,sbussetti/django-rq,sbussetti/django-rq,ui/django-rq,viaregio/django-rq,1024inc/django-rq,meteozond/django-rq,lechup/django-rq,ui/django-rq,mjec/django-rq,1024inc/django-rq,ryanisnan/django-rq,ryanisnan/django-rq,viaregio/django-rq,mjec/django-rq,lechup/django-rq
from django.utils import six from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, it allows simpl...
from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, it allows simplified ``@job`` syntax to put ...
<commit_before>from django.utils import six from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, ...
from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, it allows simplified ``@job`` syntax to put ...
from django.utils import six from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, it allows simpl...
<commit_before>from django.utils import six from rq.decorators import job as _rq_job from .queues import get_queue def job(func_or_queue, connection=None, *args, **kwargs): """ The same as RQ's job decorator, but it works automatically works out the ``connection`` argument from RQ_QUEUES. And also, ...
34da1ea604d1aea4fcefae188f259df4bd8119a5
indra/sources/crog/processor.py
indra/sources/crog/processor.py
# -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ 'chemica...
# -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ 'chemica...
Add space after EC prefix
Add space after EC prefix Co-authored-by: Charles Tapley Hoyt <71cbf5b94f8862eb69e356b36e0cdaee3e60b67f@gmail.com>
Python
bsd-2-clause
johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,johnbachman/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra
# -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ 'chemica...
# -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ 'chemica...
<commit_before># -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ ...
# -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ 'chemica...
# -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ 'chemica...
<commit_before># -*- coding: utf-8 -*- """Processor for the `Chemical Roles Graph (CRoG) <https://github.com/chemical-roles/chemical-roles>`_. """ from typing import Optional from ..utils import RemoteProcessor __all__ = [ 'CrogProcessor', ] CROG_URL = 'https://raw.githubusercontent.com/chemical-roles/' \ ...
bd1719885b1328c5aca34bc8d78b761e846f4037
tests/query_test/test_decimal_queries.py
tests/query_test/test_decimal_queries.py
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
Fix the ASAN build by xfailing test_decimal when ASAN_OPTIONS is set.
Fix the ASAN build by xfailing test_decimal when ASAN_OPTIONS is set. Adding decimal columns crashes an ASAN built impalad. This change skips the test. Change-Id: Ic94055a3f0d00f89354177de18bc27d2f4cecec2 Reviewed-on: http://gerrit.ent.cloudera.com:8080/2532 Reviewed-by: Ishaan Joshi <d1d1e60202ec9f2503deb1b724986485...
Python
apache-2.0
cchanning/Impala,XiaominZhang/Impala,tempbottle/Impala,cgvarela/Impala,kapilrastogi/Impala,grundprinzip/Impala,scalingdata/Impala,bratatidas9/Impala-1,mapr/impala,ImpalaToGo/ImpalaToGo,cchanning/Impala,lnliuxing/Impala,gerashegalov/Impala,theyaa/Impala,lirui-intel/Impala,bowlofstew/Impala,ImpalaToGo/ImpalaToGo,gerasheg...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SI...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SI...
9611fcd38c8d75b1c101870ae59de3db326c6951
pyfive/tests/test_pyfive.py
pyfive/tests/test_pyfive.py
import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py def test_read_basic_example(): # reading with HDF5 hfile = h5py.File('basic_example.hdf5', 'r') assert hfile['/example'].attrs['foo'] == 99.5 assert hfile['/example'].attrs['bar'] == 42 np.testing.assert_ar...
""" Unit tests for pyfive. """ import os import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py DIRNAME = os.path.dirname(__file__) BASIC_HDF5_FILE = os.path.join(DIRNAME, 'basic_example.hdf5') BASIC_NETCDF4_FILE = os.path.join(DIRNAME, 'basic_example.nc') def test_read_basic_exa...
Make unit tests path aware
Make unit tests path aware
Python
bsd-3-clause
jjhelmus/pyfive
import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py def test_read_basic_example(): # reading with HDF5 hfile = h5py.File('basic_example.hdf5', 'r') assert hfile['/example'].attrs['foo'] == 99.5 assert hfile['/example'].attrs['bar'] == 42 np.testing.assert_ar...
""" Unit tests for pyfive. """ import os import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py DIRNAME = os.path.dirname(__file__) BASIC_HDF5_FILE = os.path.join(DIRNAME, 'basic_example.hdf5') BASIC_NETCDF4_FILE = os.path.join(DIRNAME, 'basic_example.nc') def test_read_basic_exa...
<commit_before> import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py def test_read_basic_example(): # reading with HDF5 hfile = h5py.File('basic_example.hdf5', 'r') assert hfile['/example'].attrs['foo'] == 99.5 assert hfile['/example'].attrs['bar'] == 42 np.te...
""" Unit tests for pyfive. """ import os import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py DIRNAME = os.path.dirname(__file__) BASIC_HDF5_FILE = os.path.join(DIRNAME, 'basic_example.hdf5') BASIC_NETCDF4_FILE = os.path.join(DIRNAME, 'basic_example.nc') def test_read_basic_exa...
import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py def test_read_basic_example(): # reading with HDF5 hfile = h5py.File('basic_example.hdf5', 'r') assert hfile['/example'].attrs['foo'] == 99.5 assert hfile['/example'].attrs['bar'] == 42 np.testing.assert_ar...
<commit_before> import numpy as np from numpy.testing import assert_array_equal import pyfive import h5py def test_read_basic_example(): # reading with HDF5 hfile = h5py.File('basic_example.hdf5', 'r') assert hfile['/example'].attrs['foo'] == 99.5 assert hfile['/example'].attrs['bar'] == 42 np.te...
2cc8a541814cc353e7b60767afd2128dce38918a
tests/test_plugins/test_plugin/server.py
tests/test_plugins/test_plugin/server.py
#!/usr/bin/env python # -*- 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 ...
#!/usr/bin/env python # -*- 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 ...
Fix failing python style test
Fix failing python style test
Python
apache-2.0
jbeezley/girder,jcfr/girder,RafaelPalomar/girder,opadron/girder,Kitware/girder,essamjoubori/girder,RafaelPalomar/girder,adsorensen/girder,Xarthisius/girder,adsorensen/girder,data-exp-lab/girder,jcfr/girder,girder/girder,opadron/girder,Xarthisius/girder,data-exp-lab/girder,jcfr/girder,kotfic/girder,manthey/girder,msmole...
#!/usr/bin/env python # -*- 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 ...
#!/usr/bin/env python # -*- 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 ...
<commit_before>#!/usr/bin/env python # -*- 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 ob...
#!/usr/bin/env python # -*- 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 ...
#!/usr/bin/env python # -*- 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 ...
<commit_before>#!/usr/bin/env python # -*- 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 ob...
db99f77edfb7318ee3b4a443a98c837611054515
utils/fields.py
utils/fields.py
import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) super().__init__(*args, **kwargs) def prepare_value(self, value): if isinstance(value...
import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField from django.forms import ValidationError class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) self.__dict_only = kwargs.pop('dict_only', False) ...
Add list_only and dict_only to JSONPrettyField
Add list_only and dict_only to JSONPrettyField
Python
mit
bulv1ne/django-utils,bulv1ne/django-utils
import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) super().__init__(*args, **kwargs) def prepare_value(self, value): if isinstance(value...
import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField from django.forms import ValidationError class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) self.__dict_only = kwargs.pop('dict_only', False) ...
<commit_before>import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) super().__init__(*args, **kwargs) def prepare_value(self, value): if i...
import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField from django.forms import ValidationError class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) self.__dict_only = kwargs.pop('dict_only', False) ...
import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) super().__init__(*args, **kwargs) def prepare_value(self, value): if isinstance(value...
<commit_before>import json from django.contrib.postgres.forms.jsonb import InvalidJSONInput, JSONField class JSONPrettyField(JSONField): def __init__(self, *args, **kwargs): self.__indent = kwargs.pop('indent', 2) super().__init__(*args, **kwargs) def prepare_value(self, value): if i...
30b6a5364dc22261a4d47aec2e0a77e0c5b8ccd4
wsme/release.py
wsme/release.py
name = "WSME" version = "0.1.0a2" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "cdevienne@gmail.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT"
name = "WSME" version = "0.1.0a3" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "python-wsme@googlegroups.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT"
Update the contact mail and version
Update the contact mail and version
Python
mit
stackforge/wsme
name = "WSME" version = "0.1.0a2" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "cdevienne@gmail.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT" Update the contact ...
name = "WSME" version = "0.1.0a3" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "python-wsme@googlegroups.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT"
<commit_before>name = "WSME" version = "0.1.0a2" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "cdevienne@gmail.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT" <com...
name = "WSME" version = "0.1.0a3" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "python-wsme@googlegroups.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT"
name = "WSME" version = "0.1.0a2" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "cdevienne@gmail.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT" Update the contact ...
<commit_before>name = "WSME" version = "0.1.0a2" description = "Web Services Made Easy" long_description = """ Web Service Made Easy is a pure-wsgi and modular rewrite of TGWebServices. """ author = "Christophe de Vienne" email = "cdevienne@gmail.com" url = "http://bitbucket.org/cdevienne/wsme" license = "MIT" <com...
49263d5e43be6ab9a5c3faf2ee6478840526cccb
flatten-array/flatten_array.py
flatten-array/flatten_array.py
def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" if isinstance(lst, (list, tuple)): for item in lst: if item is None: continue else: ...
def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" for item in lst: if isinstance(item, (list, tuple)): yield from _flatten(item) elif item is not None: ...
Tidy and simplify generator code
Tidy and simplify generator code
Python
agpl-3.0
CubicComet/exercism-python-solutions
def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" if isinstance(lst, (list, tuple)): for item in lst: if item is None: continue else: ...
def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" for item in lst: if isinstance(item, (list, tuple)): yield from _flatten(item) elif item is not None: ...
<commit_before>def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" if isinstance(lst, (list, tuple)): for item in lst: if item is None: continue ...
def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" for item in lst: if isinstance(item, (list, tuple)): yield from _flatten(item) elif item is not None: ...
def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" if isinstance(lst, (list, tuple)): for item in lst: if item is None: continue else: ...
<commit_before>def flatten(lst): """Completely flatten an arbitrarily-deep list""" return [*_flatten(lst)] def _flatten(lst): """Generator for flattening arbitrarily-deep lists""" if isinstance(lst, (list, tuple)): for item in lst: if item is None: continue ...
614ab31af817fa9775fe2aa904687456656bf6fc
tags/fields.py
tags/fields.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def __init__(self, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def __init__(self, ...
Set except import error on add introspection rules south
Set except import error on add introspection rules south
Python
mit
avelino/django-tags
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def __init__(self, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def __init__(self, ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def __init__(self, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def __init__(self, ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from tags.models import Tag @python_2_unicode_compatible class TagField(CharField): def ...
8934730ac2702d2c88d96ed8bb015f7c6e65566b
js2xml/__init__.py
js2xml/__init__.py
import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree = _parser.parse(text if not isinsta...
import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor import js2xml.jsonlike as jsonlike _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree ...
Allow js2xml.jsonlike... when importing js2xml only
Allow js2xml.jsonlike... when importing js2xml only
Python
mit
redapple/js2xml,redapple/js2xml,redapple/js2xml,redapple/js2xml
import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree = _parser.parse(text if not isinsta...
import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor import js2xml.jsonlike as jsonlike _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree ...
<commit_before>import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree = _parser.parse(text...
import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor import js2xml.jsonlike as jsonlike _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree ...
import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree = _parser.parse(text if not isinsta...
<commit_before>import lxml.etree from js2xml.parser import CustomParser as Parser from js2xml.xmlvisitor import XmlVisitor _parser = Parser() _visitor = XmlVisitor() def parse(text, encoding="utf8", debug=False): if encoding not in (None, "utf8"): text = text.decode(encoding) tree = _parser.parse(text...
be03357a9d18a4a6174c075db1fdd786100925aa
lat_lng.py
lat_lng.py
from math import atan, tan, radians def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than -180 # ...
from math import atan, tan, radians, degrees def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than -180 ...
Change output back to degrees.
Change output back to degrees.
Python
mit
bm5w/lat_lng
from math import atan, tan, radians def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than -180 # ...
from math import atan, tan, radians, degrees def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than -180 ...
<commit_before>from math import atan, tan, radians def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than ...
from math import atan, tan, radians, degrees def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than -180 ...
from math import atan, tan, radians def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than -180 # ...
<commit_before>from math import atan, tan, radians def lat_lng(lat, lng): """ Return corrected lat/lng. Lat: -90 to 90 Lng: -180 to 180 """ # lat # if lat > 180: # reduce to value less than 180 # lat = lat - (lat//180)*180 # if lat < -180: # increase to value greater than ...
f16e8d0bd0765e4d4a8e0f917bf0325a772a1a23
rbm2m/models/record.py
rbm2m/models/record.py
# -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Column(Integer, Fore...
# -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Column(Integer, Fore...
Increase description max length to 2500 characters
Increase description max length to 2500 characters
Python
apache-2.0
notapresent/rbm2m,notapresent/rbm2m
# -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Column(Integer, Fore...
# -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Column(Integer, Fore...
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Colum...
# -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Column(Integer, Fore...
# -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Column(Integer, Fore...
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import (Column, Integer, String, DateTime, ForeignKey) from sqlalchemy.orm import relationship, backref from .base import Base class Record(Base): __tablename__ = 'records' id = Column(Integer, primary_key=True, autoincrement=False) genre_id = Colum...
4657ecdf6889684cf83c77f34233d8bd3ba852a2
tests/events/test_models.py
tests/events/test_models.py
# -*- coding: utf-8 -*- import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFactory() ...
# -*- coding: utf-8 -*- import datetime import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFa...
Test string representations and get_absolute_url() calls.
Test string representations and get_absolute_url() calls.
Python
apache-2.0
hello-base/web,hello-base/web,hello-base/web,hello-base/web
# -*- coding: utf-8 -*- import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFactory() ...
# -*- coding: utf-8 -*- import datetime import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFa...
<commit_before># -*- coding: utf-8 -*- import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFac...
# -*- coding: utf-8 -*- import datetime import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFa...
# -*- coding: utf-8 -*- import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFactory() ...
<commit_before># -*- coding: utf-8 -*- import pytest from components.events.models import Event, Performance, Venue from components.events.factories import (EventFactory, PerformanceFactory, VenueFactory) pytestmark = pytest.mark.django_db class TestEvents: def test_factory(self): factory = EventFac...
dfefb21bd170bf253f0d07dba2931de82ed0b1e8
tests/conftest.py
tests/conftest.py
import os.path import pytest def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, os.path.commonprefix([__file__, item.module.__file__]), ) module_root_dir = module_path.split(os.sep)[0] if modul...
import os.path import pytest @pytest.yield_fixture def tmpdir(request, tmpdir): try: yield tmpdir finally: tmpdir.remove(ignore_errors=True) def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, ...
Fix tmpdir fixture to remove all the sutff (normally it keeps the last 3, which is a lot).
Fix tmpdir fixture to remove all the sutff (normally it keeps the last 3, which is a lot).
Python
mit
ionelmc/virtualenv,ionelmc/virtualenv,ionelmc/virtualenv
import os.path import pytest def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, os.path.commonprefix([__file__, item.module.__file__]), ) module_root_dir = module_path.split(os.sep)[0] if modul...
import os.path import pytest @pytest.yield_fixture def tmpdir(request, tmpdir): try: yield tmpdir finally: tmpdir.remove(ignore_errors=True) def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, ...
<commit_before>import os.path import pytest def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, os.path.commonprefix([__file__, item.module.__file__]), ) module_root_dir = module_path.split(os.sep)[0] ...
import os.path import pytest @pytest.yield_fixture def tmpdir(request, tmpdir): try: yield tmpdir finally: tmpdir.remove(ignore_errors=True) def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, ...
import os.path import pytest def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, os.path.commonprefix([__file__, item.module.__file__]), ) module_root_dir = module_path.split(os.sep)[0] if modul...
<commit_before>import os.path import pytest def pytest_collection_modifyitems(items): for item in items: module_path = os.path.relpath( item.module.__file__, os.path.commonprefix([__file__, item.module.__file__]), ) module_root_dir = module_path.split(os.sep)[0] ...
34754e91a398e35f0e7d16bbd591c5b4a496536a
src/commons.py
src/commons.py
from contextlib import contextmanager from sympy import Eq, Lambda, Function, Indexed def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, Indexed) else ...
from contextlib import contextmanager, redirect_stdout from sympy import Eq, Lambda, Function, Indexed, latex def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, ...
Add a definition about saving latex representation of a term in a file capturing `print` stdout.
Add a definition about saving latex representation of a term in a file capturing `print` stdout.
Python
mit
massimo-nocentini/simulation-methods,massimo-nocentini/simulation-methods
from contextlib import contextmanager from sympy import Eq, Lambda, Function, Indexed def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, Indexed) else ...
from contextlib import contextmanager, redirect_stdout from sympy import Eq, Lambda, Function, Indexed, latex def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, ...
<commit_before> from contextlib import contextmanager from sympy import Eq, Lambda, Function, Indexed def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, Indexed)...
from contextlib import contextmanager, redirect_stdout from sympy import Eq, Lambda, Function, Indexed, latex def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, ...
from contextlib import contextmanager from sympy import Eq, Lambda, Function, Indexed def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, Indexed) else ...
<commit_before> from contextlib import contextmanager from sympy import Eq, Lambda, Function, Indexed def define(let, be, **kwds): return Eq(let, be, **kwds) @contextmanager def lift_to_Lambda(eq, return_eq=False, lhs_handler=lambda args: []): lhs = eq.lhs args = (lhs.args[1:] if isinstance(lhs, Indexed)...
c33e9cbf0f08c4ec93c9aeea899d93ac257b9bea
sysrev/tests.py
sysrev/tests.py
from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_paper(self): ...
from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_paper(self): ...
Add (failing) test for ADHD query. Returns results on site, not through API. Needs investigation
Add (failing) test for ADHD query. Returns results on site, not through API. Needs investigation
Python
mit
iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview
from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_paper(self): ...
from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_paper(self): ...
<commit_before>from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_pape...
from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_paper(self): ...
from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_paper(self): ...
<commit_before>from django.test import TestCase from api import PubMed from sysrev.models import Review class PubmedQueryTestCase(TestCase): def test_query(self): result = PubMed.query("smoking") self.assertGreater(result[u'Count'], 25000, "Expected >25000 results for smoking") def test_pape...
8922e6ff0570fc3b073746b01e6ee1d963315448
udger/__init__.py
udger/__init__.py
from .parser import Udger __version__ = '4.0.1' __all__ = ['Udger']
from .parser import Udger __version__ = '4.0.2' __all__ = ['Udger']
Allow MutableMapping for python >= 3.10
Allow MutableMapping for python >= 3.10
Python
mit
udger/udger-python
from .parser import Udger __version__ = '4.0.1' __all__ = ['Udger'] Allow MutableMapping for python >= 3.10
from .parser import Udger __version__ = '4.0.2' __all__ = ['Udger']
<commit_before>from .parser import Udger __version__ = '4.0.1' __all__ = ['Udger'] <commit_msg>Allow MutableMapping for python >= 3.10<commit_after>
from .parser import Udger __version__ = '4.0.2' __all__ = ['Udger']
from .parser import Udger __version__ = '4.0.1' __all__ = ['Udger'] Allow MutableMapping for python >= 3.10from .parser import Udger __version__ = '4.0.2' __all__ = ['Udger']
<commit_before>from .parser import Udger __version__ = '4.0.1' __all__ = ['Udger'] <commit_msg>Allow MutableMapping for python >= 3.10<commit_after>from .parser import Udger __version__ = '4.0.2' __all__ = ['Udger']
f2396815912b1698c4969d86d1f4176122489222
taemin/plugin.py
taemin/plugin.py
""" Base class for all taemin plugin """ class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pubmsg(self, msg): pass def o...
""" Base class for all taemin plugin """ import itertools MAX_MSG_LENGTH = 400 class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pu...
Split privmsg if their are too long
Split privmsg if their are too long
Python
mit
ningirsu/taemin,ningirsu/taemin
""" Base class for all taemin plugin """ class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pubmsg(self, msg): pass def o...
""" Base class for all taemin plugin """ import itertools MAX_MSG_LENGTH = 400 class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pu...
<commit_before>""" Base class for all taemin plugin """ class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pubmsg(self, msg): ...
""" Base class for all taemin plugin """ import itertools MAX_MSG_LENGTH = 400 class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pu...
""" Base class for all taemin plugin """ class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pubmsg(self, msg): pass def o...
<commit_before>""" Base class for all taemin plugin """ class TaeminPlugin(object): helper = {} def __init__(self, taemin): self.taemin = taemin def start(self): pass def stop(self): pass def on_join(self, connection): pass def on_pubmsg(self, msg): ...
6c93bfc862ceb598747531dc5aef4f9445162e68
src/config/api-server/setup.py
src/config/api-server/setup.py
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip_safe=False, ...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip_safe=False, ...
Remove strong dependency to geventhttpclient>=1.0a
[geventhttpclient] Remove strong dependency to geventhttpclient>=1.0a We can remove the strong dependency on 1.0a, Deepinder Setia manage this fix in https://bugs.launchpad.net/opencontrail/+bug/1306715 Refs: http://lists.opencontrail.org/pipermail/dev_lists.opencontrail.org/2014-April/000930.html And already merged...
Python
apache-2.0
reiaaoyama/contrail-controller,nischalsheth/contrail-controller,rombie/contrail-controller,cloudwatt/contrail-controller,sajuptpm/contrail-controller,tcpcloud/contrail-controller,cloudwatt/contrail-controller,Juniper/contrail-dev-controller,DreamLab/contrail-controller,DreamLab/contrail-controller,srajag/contrail-contr...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip_safe=False, ...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip_safe=False, ...
<commit_before># # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip_safe=False, ...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip_safe=False, ...
<commit_before># # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup setup( name='vnc_cfg_api_server', version='0.1dev', packages=[ 'vnc_cfg_api_server', 'vnc_cfg_api_server.gen', ], package_data={'': ['*.html', '*.css', '*.xml']}, zip...
c52a39b8a89e1fc8bfe607d2bfa92970d7ae17ad
evelink/parsing/assets.py
evelink/parsing/assets.py
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), ...
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), ...
Fix test involving Element object
Fix test involving Element object
Python
mit
zigdon/evelink,FashtimeDotCom/evelink,Morloth1274/EVE-Online-POCO-manager,ayust/evelink,bastianh/evelink
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), ...
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), ...
<commit_before>from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['type...
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), ...
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), ...
<commit_before>from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['type...
07999d1f24acbbfde50fe94897054e7c8df7fea1
api/jsonstore.py
api/jsonstore.py
import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return tf if __name__ ...
import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return os.path.split(tf...
Tweak JSON api return value to be friendlier
Tweak JSON api return value to be friendlier
Python
mit
controversial/wikipedia-map,controversial/wikipedia-map,controversial/wikipedia-map
import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return tf if __name__ ...
import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return os.path.split(tf...
<commit_before>import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return t...
import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return os.path.split(tf...
import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return tf if __name__ ...
<commit_before>import json import os import tempfile def store(data, directory="/var/www/luke/wikipedia/graphs/"): try: json.loads(data) except ValueError: return "not-json" tf = tempfile.mkstemp(prefix="", dir=directory)[1] with open(tf, "w") as f: f.write(data) return t...
56e3225329d2f7fae37139ec1d6727784718d339
test_portend.py
test_portend.py
import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, socktype) def id_for_info(inf...
import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None # all available interfaces port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, soc...
Add indication of what None means
Add indication of what None means
Python
mit
jaraco/portend
import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, socktype) def id_for_info(inf...
import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None # all available interfaces port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, soc...
<commit_before>import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, socktype) def ...
import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None # all available interfaces port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, soc...
import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, socktype) def id_for_info(inf...
<commit_before>import socket import pytest import portend def socket_infos(): """ Generate addr infos for connections to localhost """ host = None port = portend.find_available_local_port() family = socket.AF_UNSPEC socktype = socket.SOCK_STREAM return socket.getaddrinfo(host, port, family, socktype) def ...
6bb3321c0a2e4221d08f39e46e1d21220361cdc6
shuup_tests/api/conftest.py
shuup_tests/api/conftest.py
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings def pytest_runtest_setup(item): sett...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings ORIGINAL_SETTINGS = [] def pytest_runt...
Fix unit test by adding back front apps after API tests
Fix unit test by adding back front apps after API tests
Python
agpl-3.0
shoopio/shoop,shoopio/shoop,shoopio/shoop
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings def pytest_runtest_setup(item): sett...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings ORIGINAL_SETTINGS = [] def pytest_runt...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings def pytest_runtest_setup(...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings ORIGINAL_SETTINGS = [] def pytest_runt...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings def pytest_runtest_setup(item): sett...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2018, Shuup Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings def pytest_runtest_setup(...
de4df4feb7f38577bb3db8852610398ecc238870
stella/llvm.py
stella/llvm.py
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int() tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_generic_value(tp, ...
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int(64) tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_generic_value(tp...
Change types to get the tests to complete.
Change types to get the tests to complete.
Python
apache-2.0
squisher/stella,squisher/stella,squisher/stella,squisher/stella
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int() tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_generic_value(tp, ...
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int(64) tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_generic_value(tp...
<commit_before>from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int() tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_gen...
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int(64) tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_generic_value(tp...
from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int() tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_generic_value(tp, ...
<commit_before>from llvm import * from llvm.core import * from llvm.ee import * import logging tp_int = Type.int() tp_float = Type.float() def py_type_to_llvm(tp): if tp == int: return tp_int elif tp == float: return tp_float else: raise TypeError("Unknown type " + tp) def get_gen...
46ea832db6db8a98c5b9f5a58a37bfed16a27a10
app/actions/peptable/base.py
app/actions/peptable/base.py
from app.dataformats import peptable as peptabledata from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] } ...
from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, key, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] } if track_psms: if not new: ...
Use input param key instead of using HEADER field
Use input param key instead of using HEADER field
Python
mit
glormph/msstitch
from app.dataformats import peptable as peptabledata from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] } ...
from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, key, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] } if track_psms: if not new: ...
<commit_before>from app.dataformats import peptable as peptabledata from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] ...
from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, key, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] } if track_psms: if not new: ...
from app.dataformats import peptable as peptabledata from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] } ...
<commit_before>from app.dataformats import peptable as peptabledata from app.dataformats import mzidtsv as psmtsvdata def add_peptide(allpeps, psm, scorecol=False, fncol=None, new=False, track_psms=True): peptide = {'score': psm[scorecol], 'line': psm, 'psms': [] ...
02f7edc042b46f091663fc12451aa043106f4f38
correctiv_justizgelder/urls.py
correctiv_justizgelder/urls.py
from functools import wraps from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def cache_page_ano...
from functools import wraps from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def cache_page_anonymous(req...
Update urlpatterns and remove old patterns pattern
Update urlpatterns and remove old patterns pattern
Python
mit
correctiv/correctiv-justizgelder,correctiv/correctiv-justizgelder
from functools import wraps from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def cache_page_ano...
from functools import wraps from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def cache_page_anonymous(req...
<commit_before>from functools import wraps from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def...
from functools import wraps from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def cache_page_anonymous(req...
from functools import wraps from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def cache_page_ano...
<commit_before>from functools import wraps from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.cache import cache_page from .views import OrganisationSearchView, OrganisationDetail CACHE_TIME = 15 * 60 def c(view): @wraps(view) def...
db9703ef5cb277e4556d94503c581cbdf46a8419
api/addons/serializers.py
api/addons/serializers.py
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): """ Overrides AddonSettingsSerializer to return node-specific fields """ class Meta: type_...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): class Meta: type_ = 'node_addon_folders' id = ser.CharField(source='provider', read_only=True) ...
Remove other docstring of lies
Remove other docstring of lies
Python
apache-2.0
chennan47/osf.io,CenterForOpenScience/osf.io,pattisdr/osf.io,brianjgeiger/osf.io,HalcyonChimera/osf.io,alexschiller/osf.io,saradbowman/osf.io,chrisseto/osf.io,cwisecarver/osf.io,acshi/osf.io,monikagrabowska/osf.io,Johnetordoff/osf.io,Nesiehr/osf.io,mluo613/osf.io,adlius/osf.io,sloria/osf.io,icereval/osf.io,adlius/osf.i...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): """ Overrides AddonSettingsSerializer to return node-specific fields """ class Meta: type_...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): class Meta: type_ = 'node_addon_folders' id = ser.CharField(source='provider', read_only=True) ...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): """ Overrides AddonSettingsSerializer to return node-specific fields """ class Meta...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): class Meta: type_ = 'node_addon_folders' id = ser.CharField(source='provider', read_only=True) ...
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): """ Overrides AddonSettingsSerializer to return node-specific fields """ class Meta: type_...
<commit_before>from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField from api.base.utils import absolute_reverse class NodeAddonFolderSerializer(JSONAPISerializer): """ Overrides AddonSettingsSerializer to return node-specific fields """ class Meta...
f64582d7b254e5b4861a0d06ea40f9e608e3cc30
modules/urlparser/twitter.py
modules/urlparser/twitter.py
import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality """ pa...
import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality """ pa...
Change regex, added some non-catching groups
Change regex, added some non-catching groups
Python
mit
billyvg/piebot
import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality """ pa...
import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality """ pa...
<commit_before>import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality ...
import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality """ pa...
import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality """ pa...
<commit_before>import re import urllib2 import traceback try: import simplejson as json except ImportError: import json class Twitter(object): """Checks incoming messages for Twitter urls and calls the Twitter API to retrieve the tweet. TODO: Implement commands for Twitter functionality ...