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
fcdcf2b997c4adebd852ce399492a76868e8b0ad
greenmine/base/monkey.py
greenmine/base/monkey.py
# -*- coding: utf-8 -*- from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return views._APIView = views.APIView views._patched ...
# -*- coding: utf-8 -*- from __future__ import print_function import sys from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return v...
Send print message to sys.stderr
Smallfix: Send print message to sys.stderr
Python
agpl-3.0
astronaut1712/taiga-back,gauravjns/taiga-back,obimod/taiga-back,gauravjns/taiga-back,Tigerwhit4/taiga-back,EvgeneOskin/taiga-back,rajiteh/taiga-back,CoolCloud/taiga-back,bdang2012/taiga-back-casting,jeffdwyatt/taiga-back,astronaut1712/taiga-back,frt-arch/taiga-back,bdang2012/taiga-back-casting,crr0004/taiga-back,CMLL/t...
# -*- coding: utf-8 -*- from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return views._APIView = views.APIView views._patched ...
# -*- coding: utf-8 -*- from __future__ import print_function import sys from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return v...
<commit_before># -*- coding: utf-8 -*- from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return views._APIView = views.APIView ...
# -*- coding: utf-8 -*- from __future__ import print_function import sys from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return v...
# -*- coding: utf-8 -*- from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return views._APIView = views.APIView views._patched ...
<commit_before># -*- coding: utf-8 -*- from rest_framework import views from rest_framework import status, exceptions from rest_framework.response import Response def patch_api_view(): from django.views.generic import View if hasattr(views, "_patched"): return views._APIView = views.APIView ...
06914af3d8df899947a53c2fe3b3ce1de208d04d
robot-framework-needle.py
robot-framework-needle.py
from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc.co.uk/news/') ...
from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc.co.uk/news/') ...
Fix locators used in needle example on BBC site
Fix locators used in needle example on BBC site
Python
apache-2.0
laurentbristiel/robotframework-needle
from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc.co.uk/news/') ...
from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc.co.uk/news/') ...
<commit_before>from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc....
from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc.co.uk/news/') ...
from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc.co.uk/news/') ...
<commit_before>from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec class TestLogo(NeedleTestCase): def test_logo(self): self.driver.get('http://www.bbc....
061306d137b85ac59e182ffbba29d22bc8c624ba
characters/views.py
characters/views.py
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
Order character listing by name
Order character listing by name
Python
mit
mpirnat/django-tutorial-v2
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
<commit_before>from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
<commit_before>from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_...
ede4689ce3f9e03db5f250617e793083333af3a5
notification/backends/email.py
notification/backends/email.py
from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from notification import backends from notification.message import message_to_text # favour djan...
from django.conf import settings from django.db.models.loading import get_app from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigur...
Use get_app over to include django-mailer support over a standard import and ImportError exception handling.
pluggable-backends: Use get_app over to include django-mailer support over a standard import and ImportError exception handling. git-svn-id: 12265af7f62f437cb19748843ef653b20b846039@130 590c3fc9-4838-0410-bb95-17a0c9b37ca9
Python
mit
brosner/django-notification,arctelix/django-notification-automated
from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from notification import backends from notification.message import message_to_text # favour djan...
from django.conf import settings from django.db.models.loading import get_app from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigur...
<commit_before> from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from notification import backends from notification.message import message_to_text...
from django.conf import settings from django.db.models.loading import get_app from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigur...
from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from notification import backends from notification.message import message_to_text # favour djan...
<commit_before> from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.translation import ugettext from django.contrib.sites.models import Site from notification import backends from notification.message import message_to_text...
24c1309a9f221ec8be6a3b15dc843769f4157cf1
allauth/socialaccount/providers/twitch/views.py
allauth/socialaccount/providers/twitch/views.py
import requests from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchProvider.id access_token_url = 'https://api.twitch.tv/kraken/oauth2/...
import requests from allauth.socialaccount.providers.oauth2.client import OAuth2Error from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchPr...
Add error checking in API response
twitch: Add error checking in API response
Python
mit
rsalmaso/django-allauth,lukeburden/django-allauth,pennersr/django-allauth,AltSchool/django-allauth,pztrick/django-allauth,AltSchool/django-allauth,rsalmaso/django-allauth,bittner/django-allauth,pztrick/django-allauth,pennersr/django-allauth,lukeburden/django-allauth,lukeburden/django-allauth,pztrick/django-allauth,bitt...
import requests from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchProvider.id access_token_url = 'https://api.twitch.tv/kraken/oauth2/...
import requests from allauth.socialaccount.providers.oauth2.client import OAuth2Error from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchPr...
<commit_before>import requests from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchProvider.id access_token_url = 'https://api.twitch.tv...
import requests from allauth.socialaccount.providers.oauth2.client import OAuth2Error from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchPr...
import requests from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchProvider.id access_token_url = 'https://api.twitch.tv/kraken/oauth2/...
<commit_before>import requests from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import TwitchProvider class TwitchOAuth2Adapter(OAuth2Adapter): provider_id = TwitchProvider.id access_token_url = 'https://api.twitch.tv...
8d9bb10d5281fe89f693068143e45ff761200abd
01_Built-in_Types/list.py
01_Built-in_Types/list.py
#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test print(type(sys.argv)) print(id(sys.argv)) print(type(sys.argv) is list) if len(sys.argv) != 2: print("%s filename" % sys.argv[0]) raise SystemExit(1) file = open(sys.argv[1], "w") line = [] while True: line = sys.s...
#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test # type and id are unique # ref: https://docs.python.org/2/reference/datamodel.html # mutable object: value can be changed # immutable object: value can NOT be changed after created # This means readonly # ex: ...
Add comment for object types
Add comment for object types
Python
bsd-2-clause
zzz0072/Python_Exercises,zzz0072/Python_Exercises
#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test print(type(sys.argv)) print(id(sys.argv)) print(type(sys.argv) is list) if len(sys.argv) != 2: print("%s filename" % sys.argv[0]) raise SystemExit(1) file = open(sys.argv[1], "w") line = [] while True: line = sys.s...
#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test # type and id are unique # ref: https://docs.python.org/2/reference/datamodel.html # mutable object: value can be changed # immutable object: value can NOT be changed after created # This means readonly # ex: ...
<commit_before>#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test print(type(sys.argv)) print(id(sys.argv)) print(type(sys.argv) is list) if len(sys.argv) != 2: print("%s filename" % sys.argv[0]) raise SystemExit(1) file = open(sys.argv[1], "w") line = [] while True: ...
#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test # type and id are unique # ref: https://docs.python.org/2/reference/datamodel.html # mutable object: value can be changed # immutable object: value can NOT be changed after created # This means readonly # ex: ...
#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test print(type(sys.argv)) print(id(sys.argv)) print(type(sys.argv) is list) if len(sys.argv) != 2: print("%s filename" % sys.argv[0]) raise SystemExit(1) file = open(sys.argv[1], "w") line = [] while True: line = sys.s...
<commit_before>#!/usr/bin/env python import sys print("argv: %d" % len(sys.argv)) # Object related test print(type(sys.argv)) print(id(sys.argv)) print(type(sys.argv) is list) if len(sys.argv) != 2: print("%s filename" % sys.argv[0]) raise SystemExit(1) file = open(sys.argv[1], "w") line = [] while True: ...
8386d7372f9ff8bfad651efe43504746aff19b73
app/models/rooms/rooms.py
app/models/rooms/rooms.py
from models.people.people import Staff, Fellow from models.rooms.rooms import Office, LivingSpace import random class Dojo(object): def __init__(self): self.offices = [] self.livingrooms = [] self.staff = [] self.fellows = [] self.all_rooms = [] self.all_people = []...
import os import sys from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) class Room(object): """Models the kind of rooms available at Andela, It forms the base class Room from which OfficeSpace and LivingRoom inherit""" def __init__(self, room_name, room_type, room_...
Implement the Room base class
Implement the Room base class
Python
mit
Alweezy/alvin-mutisya-dojo-project
from models.people.people import Staff, Fellow from models.rooms.rooms import Office, LivingSpace import random class Dojo(object): def __init__(self): self.offices = [] self.livingrooms = [] self.staff = [] self.fellows = [] self.all_rooms = [] self.all_people = []...
import os import sys from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) class Room(object): """Models the kind of rooms available at Andela, It forms the base class Room from which OfficeSpace and LivingRoom inherit""" def __init__(self, room_name, room_type, room_...
<commit_before>from models.people.people import Staff, Fellow from models.rooms.rooms import Office, LivingSpace import random class Dojo(object): def __init__(self): self.offices = [] self.livingrooms = [] self.staff = [] self.fellows = [] self.all_rooms = [] self....
import os import sys from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) class Room(object): """Models the kind of rooms available at Andela, It forms the base class Room from which OfficeSpace and LivingRoom inherit""" def __init__(self, room_name, room_type, room_...
from models.people.people import Staff, Fellow from models.rooms.rooms import Office, LivingSpace import random class Dojo(object): def __init__(self): self.offices = [] self.livingrooms = [] self.staff = [] self.fellows = [] self.all_rooms = [] self.all_people = []...
<commit_before>from models.people.people import Staff, Fellow from models.rooms.rooms import Office, LivingSpace import random class Dojo(object): def __init__(self): self.offices = [] self.livingrooms = [] self.staff = [] self.fellows = [] self.all_rooms = [] self....
fe25e0d68647af689c4015f1728cd7dd2d48b7ee
scripts/example_parser.py
scripts/example_parser.py
# This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % report_header['prob...
# This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % report_header['prob...
Update parser to the changes in the report format
Update parser to the changes in the report format
Python
bsd-2-clause
0xPoly/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,0xPoly/...
# This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % report_header['prob...
# This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % report_header['prob...
<commit_before># This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % repo...
# This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % report_header['prob...
# This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % report_header['prob...
<commit_before># This is an example of how to parse ooniprobe reports import yaml import sys print "Opening %s" % sys.argv[1] f = open(sys.argv[1]) yamloo = yaml.safe_load_all(f) report_header = yamloo.next() print "ASN: %s" % report_header['probe_asn'] print "CC: %s" % report_header['probe_cc'] print "IP: %s" % repo...
df2d24757d8e12035437d152d17dc9016f1cd9df
app/__init__.py
app/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for file structure, should recover later. # from ap...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for fil...
Create model in config file.
Create model in config file.
Python
mit
CAPU-ENG/CAPUHome-API,huxuan/CAPUHome-API
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for file structure, should recover later. # from ap...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for fil...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for file structure, should recover l...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for fil...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for file structure, should recover later. # from ap...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Author: huxuan <i(at)huxuan.org> Description: Initial file for app. """ from flask import Flask app = Flask(__name__) # pylint: disable=invalid-name app.config.from_object('config') # commented as for file structure, should recover l...
8c2996b94cdc3210b24ebeaeb957c625629f68a5
hunting/level/encoder.py
hunting/level/encoder.py
import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d elif is...
import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d elif is...
Add log to encoding output (still fails due to objects)
Add log to encoding output (still fails due to objects)
Python
mit
MoyTW/RL_Arena_Experiment
import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d elif is...
import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d elif is...
<commit_before>import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d ...
import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d elif is...
import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d elif is...
<commit_before>import json import hunting.sim.entities as entities class GameObjectEncoder(json.JSONEncoder): def default(self, o): d = o.__dict__ d.pop('owner', None) if isinstance(o, entities.GameObject): d.pop('log', None) d.pop('ai', None) return d ...
28960dc03e5e14db94d18b968947257029f934d8
cw_draw_stairs.py
cw_draw_stairs.py
"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like this: I I I ...
"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like this: I I I ...
Simplify adding spaces and add time/space complexity
Simplify adding spaces and add time/space complexity
Python
bsd-2-clause
bowen0701/algorithms_data_structures
"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like this: I I I ...
"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like this: I I I ...
<commit_before>"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like t...
"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like this: I I I ...
"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like this: I I I ...
<commit_before>"""Codewars: Draw stairs 8 kyu URL: https://www.codewars.com/kata/draw-stairs/ Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Another example, a 7-step stairs should be drawn like t...
b723cbceb896f7ca8690eaa13c38ffb20fecd0be
avocado/search_indexes.py
avocado/search_indexes.py
import warnings from haystack import indexes from avocado.conf import settings from avocado.models import DataConcept, DataField # Warn if either of the settings are set to false if not getattr(settings, 'CONCEPT_SEARCH_ENABLED', True) or \ not getattr(settings, 'FIELD_SEARCH_ENABLED', True): warnings.warn...
from haystack import indexes from avocado.models import DataConcept, DataField class DataIndex(indexes.SearchIndex): text = indexes.CharField(document=True, use_template=True) text_auto = indexes.EdgeNgramField(use_template=True) def index_queryset(self, using=None): return self.get_model().objec...
Change DataIndex to restrict on published and archived flags only
Change DataIndex to restrict on published and archived flags only In addition, the warnings of the deprecated settings have been removed. Fix #290 Signed-off-by: Byron Ruth <e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98@devel.io>
Python
bsd-2-clause
murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado
import warnings from haystack import indexes from avocado.conf import settings from avocado.models import DataConcept, DataField # Warn if either of the settings are set to false if not getattr(settings, 'CONCEPT_SEARCH_ENABLED', True) or \ not getattr(settings, 'FIELD_SEARCH_ENABLED', True): warnings.warn...
from haystack import indexes from avocado.models import DataConcept, DataField class DataIndex(indexes.SearchIndex): text = indexes.CharField(document=True, use_template=True) text_auto = indexes.EdgeNgramField(use_template=True) def index_queryset(self, using=None): return self.get_model().objec...
<commit_before>import warnings from haystack import indexes from avocado.conf import settings from avocado.models import DataConcept, DataField # Warn if either of the settings are set to false if not getattr(settings, 'CONCEPT_SEARCH_ENABLED', True) or \ not getattr(settings, 'FIELD_SEARCH_ENABLED', True): ...
from haystack import indexes from avocado.models import DataConcept, DataField class DataIndex(indexes.SearchIndex): text = indexes.CharField(document=True, use_template=True) text_auto = indexes.EdgeNgramField(use_template=True) def index_queryset(self, using=None): return self.get_model().objec...
import warnings from haystack import indexes from avocado.conf import settings from avocado.models import DataConcept, DataField # Warn if either of the settings are set to false if not getattr(settings, 'CONCEPT_SEARCH_ENABLED', True) or \ not getattr(settings, 'FIELD_SEARCH_ENABLED', True): warnings.warn...
<commit_before>import warnings from haystack import indexes from avocado.conf import settings from avocado.models import DataConcept, DataField # Warn if either of the settings are set to false if not getattr(settings, 'CONCEPT_SEARCH_ENABLED', True) or \ not getattr(settings, 'FIELD_SEARCH_ENABLED', True): ...
c954c153525265b2b4ff0d89f0cf7f89c08a136c
settings/test_settings.py
settings/test_settings.py
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'test.sqlite3'), ...
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'test.sqlite3'), ...
Remove debug toolbar in test settings
Remove debug toolbar in test settings
Python
mit
praba230890/junction,praba230890/junction,farhaanbukhsh/junction,farhaanbukhsh/junction,pythonindia/junction,ChillarAnand/junction,pythonindia/junction,praba230890/junction,ChillarAnand/junction,pythonindia/junction,nava45/junction,nava45/junction,ChillarAnand/junction,nava45/junction,ChillarAnand/junction,praba230890/...
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'test.sqlite3'), ...
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'test.sqlite3'), ...
<commit_before># -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'te...
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'test.sqlite3'), ...
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'test.sqlite3'), ...
<commit_before># -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'te...
d36a4453eb6b62f8eda4614f276fdf9ba7afb26a
tests/test_main.py
tests/test_main.py
# -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft']...
# -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft']...
Fix compatible error about capsys.
Fix compatible error about capsys.
Python
mit
yanqd0/csft
# -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft']...
# -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft']...
<commit_before># -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', ...
# -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft']...
# -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', 'csft', 'csft']...
<commit_before># -*- coding:utf-8 -*- from os.path import curdir, devnull from subprocess import check_call from pytest import fixture, mark, raises from csft import __main__ as main @fixture def null(): with open(devnull, 'w') as fobj: yield fobj def test_call(null): check_call(['python', '-m', ...
87acf306addc60d7678ff980aef4b87f4225839b
theo_actual_nut.py
theo_actual_nut.py
from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator.evaluate(list(...
from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator.evaluate(list(...
Determine winning hand & compare to nut hand.
Determine winning hand & compare to nut hand.
Python
mit
zimolzak/poker-experiments,zimolzak/poker-experiments,zimolzak/poker-experiments
from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator.evaluate(list(...
from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator.evaluate(list(...
<commit_before>from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator...
from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator.evaluate(list(...
from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator.evaluate(list(...
<commit_before>from itertools import combinations from deuces.deuces import Card, Evaluator, Deck from nuts import nut_hand evaluator = Evaluator() deck = Deck() flop = deck.draw(3) def omaha_eval(hole, board): assert(len(hole)) == 4 ranks = [] for ph in combinations(hole, 2): thisrank = evaluator...
86a2e55954ff4b8f5e005296e2ae336b6be627a0
py/rackattack/clientfactory.py
py/rackattack/clientfactory.py
import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(): if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) request, subscribe, http = os.environ[_VAR_NAME].split("@@") return clie...
import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(connectionString=None): if connectionString is None: if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) connec...
Allow passing the rackattack connection string as an argument to the client factory
Allow passing the rackattack connection string as an argument to the client factory
Python
apache-2.0
eliran-stratoscale/rackattack-api,Stratoscale/rackattack-api
import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(): if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) request, subscribe, http = os.environ[_VAR_NAME].split("@@") return clie...
import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(connectionString=None): if connectionString is None: if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) connec...
<commit_before>import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(): if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) request, subscribe, http = os.environ[_VAR_NAME].split("@@") ...
import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(connectionString=None): if connectionString is None: if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) connec...
import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(): if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) request, subscribe, http = os.environ[_VAR_NAME].split("@@") return clie...
<commit_before>import os from rackattack.tcp import client _VAR_NAME = "RACKATTACK_PROVIDER" def factory(): if _VAR_NAME not in os.environ: raise Exception( "The environment variable '%s' must be defined properly" % _VAR_NAME) request, subscribe, http = os.environ[_VAR_NAME].split("@@") ...
d78fad6937fb20a1ea7374240607b5d6800aa11b
username_to_uuid.py
username_to_uuid.py
""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Parses http://www.lb-stuff.com/Minecraft-Name-History output to retrieve the UUID of an old name that's no longer in use. """ import http.client from bs4 import BeautifulSoup class UsernameToUUID: def __init__(self, username): ...
""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Uses the official Mojang API to fetch player data. """ import http.client import json class UsernameToUUID: def __init__(self, username): self.username = username def get_uuid(self, timestamp=None): """ Ge...
Use the Mojang API directly; reduces overhead.
Use the Mojang API directly; reduces overhead.
Python
mit
mrlolethan/MinecraftUsernameToUUID
""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Parses http://www.lb-stuff.com/Minecraft-Name-History output to retrieve the UUID of an old name that's no longer in use. """ import http.client from bs4 import BeautifulSoup class UsernameToUUID: def __init__(self, username): ...
""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Uses the official Mojang API to fetch player data. """ import http.client import json class UsernameToUUID: def __init__(self, username): self.username = username def get_uuid(self, timestamp=None): """ Ge...
<commit_before>""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Parses http://www.lb-stuff.com/Minecraft-Name-History output to retrieve the UUID of an old name that's no longer in use. """ import http.client from bs4 import BeautifulSoup class UsernameToUUID: def __init__(self, use...
""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Uses the official Mojang API to fetch player data. """ import http.client import json class UsernameToUUID: def __init__(self, username): self.username = username def get_uuid(self, timestamp=None): """ Ge...
""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Parses http://www.lb-stuff.com/Minecraft-Name-History output to retrieve the UUID of an old name that's no longer in use. """ import http.client from bs4 import BeautifulSoup class UsernameToUUID: def __init__(self, username): ...
<commit_before>""" Username to UUID Converts a Minecraft username to it's UUID equivalent. Parses http://www.lb-stuff.com/Minecraft-Name-History output to retrieve the UUID of an old name that's no longer in use. """ import http.client from bs4 import BeautifulSoup class UsernameToUUID: def __init__(self, use...
43f67067c470386b6b24080642cc845ec1655f58
utils/networking.py
utils/networking.py
import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname.encode('ascii')) original_socket = socket.socket def rebound_socket(*args, **kwargs): sock = origi...
import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname) original_socket = socket.socket def rebound_socket(*args, **kwargs): sock = original_socket(*args...
Make _ip_address_for_interface easier to use
Make _ip_address_for_interface easier to use
Python
apache-2.0
OPWEN/opwen-webapp,ascoderu/opwen-webapp,ascoderu/opwen-webapp,OPWEN/opwen-webapp,OPWEN/opwen-webapp,ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver,ascoderu/opwen-webapp
import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname.encode('ascii')) original_socket = socket.socket def rebound_socket(*args, **kwargs): sock = origi...
import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname) original_socket = socket.socket def rebound_socket(*args, **kwargs): sock = original_socket(*args...
<commit_before>import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname.encode('ascii')) original_socket = socket.socket def rebound_socket(*args, **kwargs): ...
import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname) original_socket = socket.socket def rebound_socket(*args, **kwargs): sock = original_socket(*args...
import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname.encode('ascii')) original_socket = socket.socket def rebound_socket(*args, **kwargs): sock = origi...
<commit_before>import fcntl import socket import struct from contextlib import contextmanager @contextmanager def use_interface(ifname): """ :type ifname: str """ ip = _ip_address_for_interface(ifname.encode('ascii')) original_socket = socket.socket def rebound_socket(*args, **kwargs): ...
c80a68b81e936435434931f0b5bf748bcbea54dc
statistics/webui.py
statistics/webui.py
from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by = request.args....
from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by = request.args....
Add proto of average page. Without sorting.
Add proto of average page. Without sorting.
Python
mit
uvNikita/appstats,uvNikita/appstats,uvNikita/appstats
from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by = request.args....
from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by = request.args....
<commit_before>from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by ...
from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by = request.args....
from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by = request.args....
<commit_before>from flask import render_template, g, redirect, request from db import connect_db, get_all_sum from statistics import app @app.before_request def before_request(): g.db = connect_db() g.fields = ["CPU", "TOTAL", "SQL", "SOLR", "REDIS", "MEMCACHED"] @app.route("/") def main_page(): sort_by ...
236a3e81164e8f7c37c50eaf59bfadd32e76735a
defines.py
defines.py
INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK
INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK from pdb import set_trace as st
Make a shortcut for debugging with pdb
Make a shortcut for debugging with pdb
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK Make a shortcut for debugging with pdb
INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK from pdb import set_trace as st
<commit_before>INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK <commit_msg>Make a shortcut for de...
INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK from pdb import set_trace as st
INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK Make a shortcut for debugging with pdbINFINITY = ...
<commit_before>INFINITY = 1e+31 DIRECTIONS = ((-1,-1),(-1,0),(-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)) EMPTY = 0 BLACK = 1 WHITE = 2 def opposite_colour(col): if col == BLACK: return WHITE if col == WHITE: return BLACK <commit_msg>Make a shortcut for de...
1bd3d7d16da7cc1cf98fa68768910010251f2fea
tests/storage_adapter_tests/test_storage_adapter.py
tests/storage_adapter_tests/test_storage_adapter.py
from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic functionality are ...
from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic functionality are ...
Add test for unimplemented get_response_statements function
Add test for unimplemented get_response_statements function
Python
bsd-3-clause
gunthercox/ChatterBot,vkosuri/ChatterBot
from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic functionality are ...
from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic functionality are ...
<commit_before>from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic fun...
from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic functionality are ...
from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic functionality are ...
<commit_before>from unittest import TestCase from chatterbot.storage import StorageAdapter class StorageAdapterTestCase(TestCase): """ This test case is for the StorageAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic fun...
67b243915ef95ff1b9337bc67053d18df372e79d
unitypack/enums.py
unitypack/enums.py
from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer = 17 MetroPla...
from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer = 17 MetroPla...
Add PSMPlayer and SamsungTVPlayer platforms
Add PSMPlayer and SamsungTVPlayer platforms
Python
mit
andburn/python-unitypack
from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer = 17 MetroPla...
from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer = 17 MetroPla...
<commit_before>from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer...
from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer = 17 MetroPla...
from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer = 17 MetroPla...
<commit_before>from enum import IntEnum class RuntimePlatform(IntEnum): OSXEditor = 0 OSXPlayer = 1 WindowsPlayer = 2 OSXWebPlayer = 3 OSXDashboardPlayer = 4 WindowsWebPlayer = 5 WindowsEditor = 7 IPhonePlayer = 8 PS3 = 9 XBOX360 = 10 Android = 11 NaCl = 12 LinuxPlayer = 13 FlashPlayer = 15 WebGLPlayer...
c4de9152f34d2831d43dfa3769a7a6452bba5814
blockbuster/bb_security.py
blockbuster/bb_security.py
__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_username_exists(username) print (result) return result
__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_credentials_are_valid(username, password) print (result) return result
Update method to check both username and password
Update method to check both username and password
Python
mit
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_username_exists(username) print (result) return result Update method to check both u...
__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_credentials_are_valid(username, password) print (result) return result
<commit_before>__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_username_exists(username) print (result) return result <commit_msg>Up...
__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_credentials_are_valid(username, password) print (result) return result
__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_username_exists(username) print (result) return result Update method to check both u...
<commit_before>__author__ = 'matt' from blockbuster import bb_dbconnector_factory def credentials_are_valid(username, password): db = bb_dbconnector_factory.DBConnectorInterfaceFactory().create() print(username) result = db.api_username_exists(username) print (result) return result <commit_msg>Up...
b28a40e38f0cbd40e01906063b97731ba6cd3fb6
backend/geonature/core/gn_profiles/models.py
backend/geonature/core/gn_profiles/models.py
from geonature.utils.env import DB from utils_flask_sqla.serializers import serializable @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __table_args__ = {"schema": "gn_profiles"} cd_ref = DB.Column(DB.Integer, primary_key=True) period = DB.Column(DB.Integer)...
from flask import current_app from geoalchemy2 import Geometry from utils_flask_sqla.serializers import serializable from utils_flask_sqla_geo.serializers import geoserializable from geonature.utils.env import DB @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __ta...
Add VM valid profile model
Add VM valid profile model
Python
bsd-2-clause
PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature
from geonature.utils.env import DB from utils_flask_sqla.serializers import serializable @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __table_args__ = {"schema": "gn_profiles"} cd_ref = DB.Column(DB.Integer, primary_key=True) period = DB.Column(DB.Integer)...
from flask import current_app from geoalchemy2 import Geometry from utils_flask_sqla.serializers import serializable from utils_flask_sqla_geo.serializers import geoserializable from geonature.utils.env import DB @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __ta...
<commit_before>from geonature.utils.env import DB from utils_flask_sqla.serializers import serializable @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __table_args__ = {"schema": "gn_profiles"} cd_ref = DB.Column(DB.Integer, primary_key=True) period = DB.Col...
from flask import current_app from geoalchemy2 import Geometry from utils_flask_sqla.serializers import serializable from utils_flask_sqla_geo.serializers import geoserializable from geonature.utils.env import DB @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __ta...
from geonature.utils.env import DB from utils_flask_sqla.serializers import serializable @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __table_args__ = {"schema": "gn_profiles"} cd_ref = DB.Column(DB.Integer, primary_key=True) period = DB.Column(DB.Integer)...
<commit_before>from geonature.utils.env import DB from utils_flask_sqla.serializers import serializable @serializable class VmCorTaxonPhenology(DB.Model): __tablename__ = "vm_cor_taxon_phenology" __table_args__ = {"schema": "gn_profiles"} cd_ref = DB.Column(DB.Integer, primary_key=True) period = DB.Col...
80531076a713618cda6de815bdd6675bdf6f85f1
bluebottle/clients/management/commands/export_tenants.py
bluebottle/clients/management/commands/export_tenants.py
import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant class C...
import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant class C...
Use client_name instead of schema_name
Use client_name instead of schema_name
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant class C...
import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant class C...
<commit_before>import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalT...
import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant class C...
import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant class C...
<commit_before>import json from rest_framework.authtoken.models import Token from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalT...
753f5bdc3f023cf31c0f189dd835978aad2b5d49
djs_playground/urls.py
djs_playground/urls.py
from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ url(r'^$', index, name='index'), url(r'^admin/', admin.site.urls), url(r'^summernote/', include('djan...
from django.conf import settings from django.urls import re_path, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ re_path(r'^$', index, name='index'), re_path(r'^admin/', admin.site.urls), re_path(r'^summernote/', in...
Change url in favor of the re_path
Change url in favor of the re_path
Python
mit
summernote/django-summernote,summernote/django-summernote,summernote/django-summernote
from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ url(r'^$', index, name='index'), url(r'^admin/', admin.site.urls), url(r'^summernote/', include('djan...
from django.conf import settings from django.urls import re_path, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ re_path(r'^$', index, name='index'), re_path(r'^admin/', admin.site.urls), re_path(r'^summernote/', in...
<commit_before>from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ url(r'^$', index, name='index'), url(r'^admin/', admin.site.urls), url(r'^summernote/'...
from django.conf import settings from django.urls import re_path, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ re_path(r'^$', index, name='index'), re_path(r'^admin/', admin.site.urls), re_path(r'^summernote/', in...
from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ url(r'^$', index, name='index'), url(r'^admin/', admin.site.urls), url(r'^summernote/', include('djan...
<commit_before>from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from django.contrib import admin from djs_playground.views import index urlpatterns = [ url(r'^$', index, name='index'), url(r'^admin/', admin.site.urls), url(r'^summernote/'...
5a641736faf6bb3ce335480848464a1f22fab040
fabfile.py
fabfile.py
# -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PATH), pre...
# -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PATH), pre...
Make Fabric honor .ssh/config settings
Make Fabric honor .ssh/config settings
Python
mit
zsiciarz/variablestars.net,zsiciarz/variablestars.net,zsiciarz/variablestars.net
# -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PATH), pre...
# -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PATH), pre...
<commit_before># -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PAT...
# -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PATH), pre...
# -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PATH), pre...
<commit_before># -*- coding: utf-8 -*- from contextlib import nested from fabric.api import * def prepare_project(): u""" Enters the directory and sources environment configuration. I know ``nested`` is deprecated, but what a nice shortcut it is here ;) """ return nested( cd(PROJECT_PAT...
dc1cf6fabcf871e3661125f7ac5d1cf9567798d6
cms/management/commands/load_dev_fixtures.py
cms/management/commands/load_dev_fixtures.py
import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help = "Download and...
import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help = "Download and...
Use self.stdout.write() instead of print().
Use self.stdout.write() instead of print(). This is the recommended way in the Django documentation: https://docs.djangoproject.com/en/1.7/howto/custom-management-commands/
Python
apache-2.0
manhhomienbienthuy/pythondotorg,python/pythondotorg,SujaySKumar/pythondotorg,lebronhkh/pythondotorg,SujaySKumar/pythondotorg,lepture/pythondotorg,python/pythondotorg,proevo/pythondotorg,Mariatta/pythondotorg,malemburg/pythondotorg,willingc/pythondotorg,fe11x/pythondotorg,berkerpeksag/pythondotorg,demvher/pythondotorg,p...
import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help = "Download and...
import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help = "Download and...
<commit_before>import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help ...
import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help = "Download and...
import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help = "Download and...
<commit_before>import requests from django.core.management import call_command from django.core.management.base import NoArgsCommand from django.conf import settings from django.utils.six.moves import input class Command(NoArgsCommand): """ Download and load dev fixtures from www.python.org """ help ...
06f0edb71086573a3d7f9efb01b97b073cf415a3
tests/DdlTextWrterTest.py
tests/DdlTextWrterTest.py
import io import os import unittest from pyddl import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): # creat...
import os import unittest from pyddl import * from pyddl.enum import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): ...
Create a document in DdlTextWriterTest.test_full()
Create a document in DdlTextWriterTest.test_full() Signed-off-by: Squareys <0f6a03d4883e012ba4cb2c581a68f35544703cd6@googlemail.com>
Python
mit
Squareys/PyDDL
import io import os import unittest from pyddl import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): # creat...
import os import unittest from pyddl import * from pyddl.enum import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): ...
<commit_before>import io import os import unittest from pyddl import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): ...
import os import unittest from pyddl import * from pyddl.enum import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): ...
import io import os import unittest from pyddl import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): # creat...
<commit_before>import io import os import unittest from pyddl import * __author__ = "Jonathan Hale" class DdlTextWriterTest(unittest.TestCase): def tearDown(self): try: os.remove("test.oddl") except FileNotFoundError: pass # test_empty failed? def test_empty(self): ...
125dfa47e5656c3f9b1e8846be03010ed02c6f91
tests/rules_tests/isValid_tests/InvalidSyntaxTest.py
tests/rules_tests/isValid_tests/InvalidSyntaxTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule from grammpy.exceptions import RuleSyntaxException from .grammar import * class InvalidSyntaxTest(TestCase): def test_rulesMissingEncloseLis...
Add base set of rule's invalid syntax tests
Add base set of rule's invalid syntax tests
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()Add base set of rule's invalid syntax tests
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule from grammpy.exceptions import RuleSyntaxException from .grammar import * class InvalidSyntaxTest(TestCase): def test_rulesMissingEncloseLis...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()<commit_msg>Add base set of rule's invalid syn...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule from grammpy.exceptions import RuleSyntaxException from .grammar import * class InvalidSyntaxTest(TestCase): def test_rulesMissingEncloseLis...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()Add base set of rule's invalid syntax tests#!/usr/bin/env pyt...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()<commit_msg>Add base set of rule's invalid syn...
12cb8ca101faa09e4cc07f9e257b3d3130892297
tests/sentry/web/frontend/tests.py
tests/sentry/web/frontend/tests.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import pytest from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase @pytest.mark.xfail class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-replay', kwargs={ ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-replay', kwargs={ 'organization_slug': s...
Remove xfail from replay test
Remove xfail from replay test
Python
bsd-3-clause
mitsuhiko/sentry,fotinakis/sentry,beeftornado/sentry,mvaled/sentry,mvaled/sentry,BuildingLink/sentry,alexm92/sentry,mvaled/sentry,mvaled/sentry,BuildingLink/sentry,nicholasserra/sentry,JackDanger/sentry,fotinakis/sentry,gencer/sentry,fotinakis/sentry,beeftornado/sentry,ifduyue/sentry,JamesMura/sentry,imankulov/sentry,l...
# -*- coding: utf-8 -*- from __future__ import absolute_import import pytest from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase @pytest.mark.xfail class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-replay', kwargs={ ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-replay', kwargs={ 'organization_slug': s...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import pytest from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase @pytest.mark.xfail class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-rep...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-replay', kwargs={ 'organization_slug': s...
# -*- coding: utf-8 -*- from __future__ import absolute_import import pytest from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase @pytest.mark.xfail class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-replay', kwargs={ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import pytest from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase @pytest.mark.xfail class ReplayTest(TestCase): @fixture def path(self): return reverse('sentry-rep...
f920f7e765dac7057e3c48ebe0aa9723c3d431f5
src/cclib/progress/__init__.py
src/cclib/progress/__init__.py
__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress
__revision__ = "$Revision$" from textprogress import TextProgress import sys if 'qt' in sys.modules.keys(): from qtprogress import QtProgress
Check to see if qt is loaded; if so, export QtProgress class
Check to see if qt is loaded; if so, export QtProgress class git-svn-id: d468cea6ffe92bc1eb1f3bde47ad7e70b065426a@224 5acbf244-8a03-4a8b-a19b-0d601add4d27
Python
lgpl-2.1
Clyde-fare/cclib_bak,Clyde-fare/cclib_bak
__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress Check to see if qt is loaded; if so, export QtProgress class git-svn-id: d468cea6ffe92bc1eb1f3bde47ad7e70b065426a@224 5...
__revision__ = "$Revision$" from textprogress import TextProgress import sys if 'qt' in sys.modules.keys(): from qtprogress import QtProgress
<commit_before>__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress <commit_msg>Check to see if qt is loaded; if so, export QtProgress class git-svn-id: d468cea6ffe92bc1eb1...
__revision__ = "$Revision$" from textprogress import TextProgress import sys if 'qt' in sys.modules.keys(): from qtprogress import QtProgress
__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress Check to see if qt is loaded; if so, export QtProgress class git-svn-id: d468cea6ffe92bc1eb1f3bde47ad7e70b065426a@224 5...
<commit_before>__revision__ = "$Revision$" from textprogress import TextProgress try: import qt except ImportError: pass # import QtProgress will cause an error else: from qtprogress import QtProgress <commit_msg>Check to see if qt is loaded; if so, export QtProgress class git-svn-id: d468cea6ffe92bc1eb1...
23675e41656cac48f390d97f065b36de39e27d58
duckbot.py
duckbot.py
import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = discord.utils.oauth_url(duckbot...
import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) rand = random.SystemRandom() @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = di...
Add a real roll command
Add a real roll command
Python
mit
andrewlin16/duckbot,andrewlin16/duckbot
import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = discord.utils.oauth_url(duckbot...
import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) rand = random.SystemRandom() @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = di...
<commit_before>import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = discord.utils.oa...
import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) rand = random.SystemRandom() @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = di...
import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = discord.utils.oauth_url(duckbot...
<commit_before>import discord import duckbot_settings import random from discord.ext import commands _DESCRIPTION = '''quack''' bot = commands.Bot(command_prefix='/', description=_DESCRIPTION) @bot.event async def on_ready(): print('logged in: %s (%s)' % (bot.user.name, bot.user.id)) oauth_url = discord.utils.oa...
30ed3800fdeec4aec399e6e0ec0760e46eb891ec
djangoautoconf/model_utils/model_reversion.py
djangoautoconf/model_utils/model_reversion.py
from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version from reversion.revisions import default_revision_manager global_save_signal_receiver = [] class PreSaveHandler(object): def __init__(s...
from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version def create_initial_version(obj): try: from reversion.revisions import default_revision_manager default_revision_manager...
Fix broken initial version creation.
Fix broken initial version creation.
Python
bsd-3-clause
weijia/djangoautoconf,weijia/djangoautoconf
from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version from reversion.revisions import default_revision_manager global_save_signal_receiver = [] class PreSaveHandler(object): def __init__(s...
from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version def create_initial_version(obj): try: from reversion.revisions import default_revision_manager default_revision_manager...
<commit_before>from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version from reversion.revisions import default_revision_manager global_save_signal_receiver = [] class PreSaveHandler(object): ...
from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version def create_initial_version(obj): try: from reversion.revisions import default_revision_manager default_revision_manager...
from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version from reversion.revisions import default_revision_manager global_save_signal_receiver = [] class PreSaveHandler(object): def __init__(s...
<commit_before>from django.contrib.contenttypes.models import ContentType from django.db.models.signals import pre_save from django.dispatch import receiver from reversion.models import Version from reversion.revisions import default_revision_manager global_save_signal_receiver = [] class PreSaveHandler(object): ...
5237cb7f1339eb13b4c01f1c3611448a8f865726
terms/templatetags/terms.py
terms/templatetags/terms.py
# coding: utf-8 from django.template import Library from ..html import TermsHTMLReconstructor register = Library() @register.filter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out
# coding: utf-8 from django.template import Library from django.template.defaultfilters import stringfilter from ..html import TermsHTMLReconstructor register = Library() @register.filter @stringfilter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out
Make sure the filter arg is a string.
Make sure the filter arg is a string.
Python
bsd-3-clause
BertrandBordage/django-terms,philippeowagner/django-terms,BertrandBordage/django-terms,philippeowagner/django-terms
# coding: utf-8 from django.template import Library from ..html import TermsHTMLReconstructor register = Library() @register.filter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out Make sure the filter arg is a string.
# coding: utf-8 from django.template import Library from django.template.defaultfilters import stringfilter from ..html import TermsHTMLReconstructor register = Library() @register.filter @stringfilter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out
<commit_before># coding: utf-8 from django.template import Library from ..html import TermsHTMLReconstructor register = Library() @register.filter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out <commit_msg>Make sure the filter arg is a string.<commit_after...
# coding: utf-8 from django.template import Library from django.template.defaultfilters import stringfilter from ..html import TermsHTMLReconstructor register = Library() @register.filter @stringfilter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out
# coding: utf-8 from django.template import Library from ..html import TermsHTMLReconstructor register = Library() @register.filter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out Make sure the filter arg is a string.# coding: utf-8 from django.template im...
<commit_before># coding: utf-8 from django.template import Library from ..html import TermsHTMLReconstructor register = Library() @register.filter def replace_terms(html): parser = TermsHTMLReconstructor() parser.feed(html) return parser.out <commit_msg>Make sure the filter arg is a string.<commit_after...
1b218de76e8b09c70abcd88a2c6dd2c043bfc7f0
drcli/__main__.py
drcli/__main__.py
#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=sys.argv[1:]): lo...
#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=None): if args is...
Allow sub-commands to use same main function
Allow sub-commands to use same main function
Python
mit
schwa-lab/dr-apps-python
#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=sys.argv[1:]): lo...
#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=None): if args is...
<commit_before>#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=sys....
#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=None): if args is...
#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=sys.argv[1:]): lo...
<commit_before>#!/usr/bin/env python import os.path import sys import imp import argparse from api import App, add_subparsers def load_plugins(dir): for f in os.listdir(dir): module_name, ext = os.path.splitext(f) if ext == '.py': imp.load_source('arbitrary', os.path.join(dir, f)) def main(args=sys....
85d684369e72aa2968f9ffbd0632f84558e1b44e
tests/test_vector2_dot.py
tests/test_vector2_dot.py
from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x MAGNITUDE=1e10 @given(x=vectors(max_magn...
from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x @given(x=vectors()) def test_dot_length(x...
Test that x² == |x|²
tests/dot: Test that x² == |x|²
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x MAGNITUDE=1e10 @given(x=vectors(max_magn...
from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x @given(x=vectors()) def test_dot_length(x...
<commit_before>from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x MAGNITUDE=1e10 @given(x=v...
from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x @given(x=vectors()) def test_dot_length(x...
from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x MAGNITUDE=1e10 @given(x=vectors(max_magn...
<commit_before>from ppb_vector import Vector2 from math import isclose, sqrt import pytest # type: ignore from hypothesis import assume, given, note from utils import floats, vectors @given(x=vectors(), y=vectors()) def test_dot_commutes(x: Vector2, y: Vector2): assert x * y == y * x MAGNITUDE=1e10 @given(x=v...
99e1377deb066b9bee64b40799caaeaccd0db7d8
src/conditions/signals.py
src/conditions/signals.py
# coding: utf-8 import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb set_trace = pdb.set_trace def signal...
# coding: utf-8 from __future__ import print_function import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb ...
Fix use of Python 2 print
Fix use of Python 2 print
Python
bsd-2-clause
svetlyak40wt/python-cl-conditions
# coding: utf-8 import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb set_trace = pdb.set_trace def signal...
# coding: utf-8 from __future__ import print_function import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb ...
<commit_before># coding: utf-8 import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb set_trace = pdb.set_tra...
# coding: utf-8 from __future__ import print_function import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb ...
# coding: utf-8 import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb set_trace = pdb.set_trace def signal...
<commit_before># coding: utf-8 import os import traceback from .handlers import find_handler _activate_debugger = os.environ.get('DEBUG') == 'yes' if _activate_debugger: try: from trepan.api import debug set_trace = debug except ImportError: import pdb set_trace = pdb.set_tra...
fd81c4cea0d28275123539c23c27dcfdd71e9aef
scipy/testing/nulltester.py
scipy/testing/nulltester.py
''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, labels=None, *args, ...
''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, labels=None, *args, ...
Fix bench error on scipy import when nose is not installed
Fix bench error on scipy import when nose is not installed
Python
bsd-3-clause
aman-iitj/scipy,maciejkula/scipy,efiring/scipy,gfyoung/scipy,teoliphant/scipy,pizzathief/scipy,pbrod/scipy,Eric89GXL/scipy,jor-/scipy,larsmans/scipy,anntzer/scipy,behzadnouri/scipy,pschella/scipy,ogrisel/scipy,sriki18/scipy,aarchiba/scipy,WarrenWeckesser/scipy,newemailjdm/scipy,Srisai85/scipy,pbrod/scipy,surhudm/scipy,...
''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, labels=None, *args, ...
''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, labels=None, *args, ...
<commit_before>''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, label...
''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, labels=None, *args, ...
''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, labels=None, *args, ...
<commit_before>''' Null tester (when nose not importable) Merely returns error reporting lack of nose package See pkgtester, nosetester modules ''' nose_url = 'http://somethingaboutorange.com/mrl/projects/nose' class NullTester(object): def __init__(self, *args, **kwargs): pass def test(self, label...
6d08c13fbf42eb4251d3477a904ab6d8513620df
dataset.py
dataset.py
from scrapy.item import Item, Field class DatasetItem(Item): name = Field() frequency = Field()
from scrapy.item import Item, Field class DatasetItem(Item): url = Field() name = Field() frequency = Field()
Add url field to Dataset web item
Add url field to Dataset web item
Python
mit
MaxLikelihood/CODE
from scrapy.item import Item, Field class DatasetItem(Item): name = Field() frequency = Field() Add url field to Dataset web item
from scrapy.item import Item, Field class DatasetItem(Item): url = Field() name = Field() frequency = Field()
<commit_before>from scrapy.item import Item, Field class DatasetItem(Item): name = Field() frequency = Field() <commit_msg>Add url field to Dataset web item<commit_after>
from scrapy.item import Item, Field class DatasetItem(Item): url = Field() name = Field() frequency = Field()
from scrapy.item import Item, Field class DatasetItem(Item): name = Field() frequency = Field() Add url field to Dataset web itemfrom scrapy.item import Item, Field class DatasetItem(Item): url = Field() name = Field() frequency = Field()
<commit_before>from scrapy.item import Item, Field class DatasetItem(Item): name = Field() frequency = Field() <commit_msg>Add url field to Dataset web item<commit_after>from scrapy.item import Item, Field class DatasetItem(Item): url = Field() name = Field() frequency = Field()
b7a24dca6b52d8924f59dc0e8ecd8e25cac998a2
common/djangoapps/enrollment/urls.py
common/djangoapps/enrollment/urls.py
""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{course_key}$'.f...
""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{course_key}/$'....
Add options trailing slashes to the Enrollment API.
Add options trailing slashes to the Enrollment API. This allows the edX REST API Client to perform a sucessful GET against this API, since Slumber (which our client is based off of) appends the trailing slash by default.
Python
agpl-3.0
zhenzhai/edx-platform,zhenzhai/edx-platform,zhenzhai/edx-platform,zhenzhai/edx-platform,zhenzhai/edx-platform
""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{course_key}$'.f...
""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{course_key}/$'....
<commit_before>""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{...
""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{course_key}/$'....
""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{course_key}$'.f...
<commit_before>""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import patterns, url from .views import ( EnrollmentView, EnrollmentListView, EnrollmentCourseDetailView ) urlpatterns = patterns( 'enrollment.views', url( r'^enrollment/{username},{...
62317424b7e318ac9c59aecc768a4487788bd179
content/test/gpu/gpu_tests/pixel_expectations.py
content/test/gpu/gpu_tests/pixel_expectations.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTestExpectations): ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTestExpectations): ...
Mark pixel tests as failing on all platform
Mark pixel tests as failing on all platform BUG=511580 R=kbr@chromium.org Review URL: https://codereview.chromium.org/1245243003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#340191}
Python
bsd-3-clause
lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBacke...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTestExpectations): ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTestExpectations): ...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTest...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTestExpectations): ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTestExpectations): ...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class PixelExpectations(GpuTest...
b5006a2820051e00c9fe4f5efe43e90129c12b4d
troposphere/cloudtrail.py
troposphere/cloudtrail.py
from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "IncludeManagementE...
from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "ExcludeManagementE...
Update Cloudtrail per 2021-09-10 changes
Update Cloudtrail per 2021-09-10 changes
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere
from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "IncludeManagementE...
from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "ExcludeManagementE...
<commit_before>from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "Inc...
from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "ExcludeManagementE...
from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "IncludeManagementE...
<commit_before>from . import AWSObject, AWSProperty, Tags from .validators import boolean class DataResource(AWSProperty): props = { "Type": (str, True), "Values": ([str], False), } class EventSelector(AWSProperty): props = { "DataResources": ([DataResource], False), "Inc...
fddd44624f1c8ff6f66a2f33cafe908a5853389d
glaciercmd/command_delete_archive_from_vault.py
glaciercmd/command_delete_archive_from_vault.py
import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_sec...
import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError from boto.dynamodb2.table import Table from boto.dynamodb2.layer1 import DynamoDBConnection class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=confi...
Clean up dynamodb table when deleting an archive
Clean up dynamodb table when deleting an archive
Python
mit
carsonmcdonald/glacier-cmd
import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_sec...
import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError from boto.dynamodb2.table import Table from boto.dynamodb2.layer1 import DynamoDBConnection class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=confi...
<commit_before>import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configura...
import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError from boto.dynamodb2.table import Table from boto.dynamodb2.layer1 import DynamoDBConnection class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=confi...
import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_sec...
<commit_before>import boto from boto.glacier.exceptions import UnexpectedHTTPResponseError class CommandDeleteArchiveFromVault(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configura...
053d6a2ca13b1f36a02fa3223092a10af35f6579
erpnext/patches/v10_0/item_barcode_childtable_migrate.py
erpnext/patches/v10_0/item_barcode_childtable_migrate.py
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') }) frappe.reload_doc("stock", "doctype", "item") frappe...
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("stock", "doctype", "item_barcode") items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') })...
Move reload doc before get query
Move reload doc before get query
Python
agpl-3.0
gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') }) frappe.reload_doc("stock", "doctype", "item") frappe...
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("stock", "doctype", "item_barcode") items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') })...
<commit_before># Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') }) frappe.reload_doc("stock", "doctype", ...
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("stock", "doctype", "item_barcode") items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') })...
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') }) frappe.reload_doc("stock", "doctype", "item") frappe...
<commit_before># Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') }) frappe.reload_doc("stock", "doctype", ...
16b9f48c2b6548a16e1c34a57c103b325fae381d
farmers_api/farmers/models.py
farmers_api/farmers/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=True) class...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=True) class...
Repair bug in the Farmer model
Repair bug in the Farmer model
Python
bsd-2-clause
tm-kn/farmers-api
from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=True) class...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=True) class...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=T...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=True) class...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=True) class...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class Farmer(models.Model): first_name = models.CharField(_('first name'), max_length=50) surname = models.CharField(_('surname'), max_length=50) town = models.CharField(_('town'), max_length=50, db_index=T...
70f9275d7b87d56ae560a2ff60c3eed3469739af
edx_rest_api_client/tests/mixins.py
edx_rest_api_client/tests/mixins.py
import responses class AuthenticationTestMixin(object): """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.add( ...
import responses class AuthenticationTestMixin: """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.add( response...
Fix new lint errors now that we've dropped python 2 support.
Fix new lint errors now that we've dropped python 2 support.
Python
apache-2.0
edx/ecommerce-api-client,edx/edx-rest-api-client
import responses class AuthenticationTestMixin(object): """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.add( ...
import responses class AuthenticationTestMixin: """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.add( response...
<commit_before>import responses class AuthenticationTestMixin(object): """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.ad...
import responses class AuthenticationTestMixin: """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.add( response...
import responses class AuthenticationTestMixin(object): """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.add( ...
<commit_before>import responses class AuthenticationTestMixin(object): """ Mixin for testing authentication. """ def setUp(self): super(AuthenticationTestMixin, self).setUp() responses.reset() def _mock_auth_api(self, url, status, body=None): body = body or {} responses.ad...
a2efdbc7c790df31f511d9a347774a961132d565
txircd/modules/cmode_l.py
txircd/modules/cmode_l.py
from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): intParam = int(param) if str(intParam) != param: return [False, param] return [(intParam >= 0), param] def checkPermission(self, user,...
from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): try: intParam = int(param) except ValueError: return [False, param] if str(intParam) != param: return [False, param] ...
Fix checking of limit parameter
Fix checking of limit parameter
Python
bsd-3-clause
DesertBus/txircd,Heufneutje/txircd,ElementalAlchemist/txircd
from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): intParam = int(param) if str(intParam) != param: return [False, param] return [(intParam >= 0), param] def checkPermission(self, user,...
from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): try: intParam = int(param) except ValueError: return [False, param] if str(intParam) != param: return [False, param] ...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): intParam = int(param) if str(intParam) != param: return [False, param] return [(intParam >= 0), param] def checkPermiss...
from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): try: intParam = int(param) except ValueError: return [False, param] if str(intParam) != param: return [False, param] ...
from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): intParam = int(param) if str(intParam) != param: return [False, param] return [(intParam >= 0), param] def checkPermission(self, user,...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Mode class LimitMode(Mode): def checkSet(self, user, target, param): intParam = int(param) if str(intParam) != param: return [False, param] return [(intParam >= 0), param] def checkPermiss...
380331a54ae09a54e458b30a0fb6a459faa76f37
emission/analysis/point_features.py
emission/analysis/point_features.py
# Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, point2): re...
# Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, point2): re...
Change the feature calculation to match the new unified format
Change the feature calculation to match the new unified format - the timestamps are now in seconds, so no need to divide them - the field is called ts, not mTime
Python
bsd-3-clause
e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,joshzarrabi/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-mission-server,yw374cornell/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission...
# Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, point2): re...
# Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, point2): re...
<commit_before># Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, ...
# Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, point2): re...
# Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, point2): re...
<commit_before># Standard imports import math import logging import numpy as np import emission.core.common as ec import emission.analysis.section_features as sf def calDistance(point1, point2): return ec.calDistance([point1.longitude, point1.latitude], [point2.longitude, point2.latitude]) def calHeading(point1, ...
4de5050deda6c73fd9812a5e53938fea11e0b2cc
tests/unit/minion_test.py
tests/unit/minion_test.py
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch from salt import minion from salt.exceptions import ...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import python libs import os # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch # Import salt libs f...
Add test for sock path length
Add test for sock path length
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch from salt import minion from salt.exceptions import ...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import python libs import os # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch # Import salt libs f...
<commit_before># -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch from salt import minion from salt.exc...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import python libs import os # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch # Import salt libs f...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch from salt import minion from salt.exceptions import ...
<commit_before># -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import Salt Testing libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, patch from salt import minion from salt.exc...
1fc6eb9ccc9789e2717898108f286adf5b351031
payments/management/commands/init_plans.py
payments/management/commands/init_plans.py
from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in settings.PAYMENTS_P...
from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in settings.PAYMENTS_P...
Make sure this value is always an integer
Make sure this value is always an integer
Python
bsd-3-clause
wahuneke/django-stripe-payments,aibon/django-stripe-payments,boxysean/django-stripe-payments,crehana/django-stripe-payments,adi-li/django-stripe-payments,wahuneke/django-stripe-payments,jawed123/django-stripe-payments,jamespacileo/django-stripe-payments,ZeevG/django-stripe-payments,ZeevG/django-stripe-payments,crehana/...
from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in settings.PAYMENTS_P...
from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in settings.PAYMENTS_P...
<commit_before>from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in sett...
from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in settings.PAYMENTS_P...
from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in settings.PAYMENTS_P...
<commit_before>from django.conf import settings from django.core.management.base import BaseCommand import stripe class Command(BaseCommand): help = "Make sure your Stripe account has the plans" def handle(self, *args, **options): stripe.api_key = settings.STRIPE_SECRET_KEY for plan in sett...
27ab83010f7cc8308debfec16fab38544a9c7ce7
running.py
running.py
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser import json # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tc...
Print all hourly temperatures from run date
Print all hourly temperatures from run date
Python
mit
briansuhr/slowburn
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser import json # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tc...
<commit_before>import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = pars...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser import json # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tc...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
<commit_before>import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = pars...
e379aa75690d5bacc1d0bdec325ed4c16cf1a183
lims/permissions/views.py
lims/permissions/views.py
from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer
from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer search_fields = ('name',)
Add search functionality to permissions endpoint
Add search functionality to permissions endpoint
Python
mit
GETLIMS/LIMS-Backend,GETLIMS/LIMS-Backend
from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer Add search functionality to permissions endp...
from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer search_fields = ('name',)
<commit_before>from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer <commit_msg>Add search functi...
from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer search_fields = ('name',)
from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer Add search functionality to permissions endp...
<commit_before>from django.contrib.auth.models import Permission from rest_framework import viewsets from .serializers import PermissionSerializer class PermissionViewSet(viewsets.ReadOnlyModelViewSet): queryset = Permission.objects.all() serializer_class = PermissionSerializer <commit_msg>Add search functi...
00922099d6abb03a0dbcca19781eb586d367eab0
skimage/measure/__init__.py
skimage/measure/__init__.py
from .find_contours import find_contours from ._regionprops import regionprops from .find_contours import find_contours from ._structural_similarity import ssim
from .find_contours import find_contours from ._regionprops import regionprops from ._structural_similarity import ssim
Remove double import of find contours.
BUG: Remove double import of find contours.
Python
bsd-3-clause
robintw/scikit-image,WarrenWeckesser/scikits-image,ofgulban/scikit-image,ajaybhat/scikit-image,rjeli/scikit-image,SamHames/scikit-image,chintak/scikit-image,ofgulban/scikit-image,SamHames/scikit-image,dpshelio/scikit-image,chintak/scikit-image,rjeli/scikit-image,oew1v07/scikit-image,almarklein/scikit-image,pratapvardha...
from .find_contours import find_contours from ._regionprops import regionprops from .find_contours import find_contours from ._structural_similarity import ssim BUG: Remove double import of find contours.
from .find_contours import find_contours from ._regionprops import regionprops from ._structural_similarity import ssim
<commit_before>from .find_contours import find_contours from ._regionprops import regionprops from .find_contours import find_contours from ._structural_similarity import ssim <commit_msg>BUG: Remove double import of find contours.<commit_after>
from .find_contours import find_contours from ._regionprops import regionprops from ._structural_similarity import ssim
from .find_contours import find_contours from ._regionprops import regionprops from .find_contours import find_contours from ._structural_similarity import ssim BUG: Remove double import of find contours.from .find_contours import find_contours from ._regionprops import regionprops from ._structural_similarity import s...
<commit_before>from .find_contours import find_contours from ._regionprops import regionprops from .find_contours import find_contours from ._structural_similarity import ssim <commit_msg>BUG: Remove double import of find contours.<commit_after>from .find_contours import find_contours from ._regionprops import regionpr...
985cefd81472069240b074423a831fe6031d6887
website_sale_available/controllers/website_sale_available.py
website_sale_available/controllers/website_sale_available.py
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post): res ...
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post): res ...
FIX sale_available integration with delivery
FIX sale_available integration with delivery
Python
mit
it-projects-llc/website-addons,it-projects-llc/website-addons,it-projects-llc/website-addons
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post): res ...
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post): res ...
<commit_before># -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post...
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post): res ...
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post): res ...
<commit_before># -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.addons.website_sale.controllers.main import website_sale class controller(website_sale): @http.route(['/shop/confirm_order'], type='http', auth="public", website=True) def confirm_order(self, **post...
1f409a2732886b6a77d348529e07e9f90fbfd8ba
conanfile.py
conanfile.py
from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.3.0@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): cmake = CMak...
from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.2.2@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): cmake = CMak...
Revert back to older Catch2, part 2
Revert back to older Catch2, part 2 Too quick on the commit button
Python
bsd-3-clause
acgetchell/causal-sets-explorer,acgetchell/causal-sets-explorer
from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.3.0@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): cmake = CMak...
from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.2.2@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): cmake = CMak...
<commit_before>from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.3.0@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): ...
from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.2.2@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): cmake = CMak...
from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.3.0@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): cmake = CMak...
<commit_before>from conans import ConanFile, CMake class CausalSetsExplorer(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "boost/1.67.0@conan/stable", "catch2/2.3.0@bincrafters/stable" generators = "cmake" default_options = "Boost:header_only=True" def build(self): ...
31ee04b2eed6881a4f6642495545868f7c167a20
sipa/blueprints/hooks.py
sipa/blueprints/hooks.py
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
Use ascii in logging message
Use ascii in logging message
Python
mit
MarauderXtreme/sipa,agdsn/sipa,agdsn/sipa,agdsn/sipa,MarauderXtreme/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,agdsn/sipa,MarauderXtreme/sipa
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
<commit_before>import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) de...
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) def content_hook(...
<commit_before>import logging from flask import current_app, request, abort from flask.blueprints import Blueprint from sipa.utils.git_utils import update_repo logger = logging.getLogger(__name__) bp_hooks = Blueprint('hooks', __name__, url_prefix='/hooks') @bp_hooks.route('/update-content', methods=['POST']) de...
3f26d3c53f4bff36ec05da7a51a026b7d3ba5517
tests/modules/test_atbash.py
tests/modules/test_atbash.py
"""Tests for the Caeser module""" import pycipher from lantern.modules import atbash def _test_atbash(plaintext, *fitness_functions, top_n=1): ciphertext = pycipher.Atbash().encipher(plaintext, keep_punct=True) decryption = atbash.decrypt(ciphertext) assert decryption == plaintext.upper() def test_de...
"""Tests for the Caeser module""" from lantern.modules import atbash def test_decrypt(): """Test decryption""" assert atbash.decrypt("uozt{Yzybolm}") == "flag{Babylon}" def test_encrypt(): """Test encryption""" assert ''.join(atbash.encrypt("flag{Babylon}")) == "uozt{Yzybolm}"
Remove unnecessary testing code from atbash
Remove unnecessary testing code from atbash
Python
mit
CameronLonsdale/lantern
"""Tests for the Caeser module""" import pycipher from lantern.modules import atbash def _test_atbash(plaintext, *fitness_functions, top_n=1): ciphertext = pycipher.Atbash().encipher(plaintext, keep_punct=True) decryption = atbash.decrypt(ciphertext) assert decryption == plaintext.upper() def test_de...
"""Tests for the Caeser module""" from lantern.modules import atbash def test_decrypt(): """Test decryption""" assert atbash.decrypt("uozt{Yzybolm}") == "flag{Babylon}" def test_encrypt(): """Test encryption""" assert ''.join(atbash.encrypt("flag{Babylon}")) == "uozt{Yzybolm}"
<commit_before>"""Tests for the Caeser module""" import pycipher from lantern.modules import atbash def _test_atbash(plaintext, *fitness_functions, top_n=1): ciphertext = pycipher.Atbash().encipher(plaintext, keep_punct=True) decryption = atbash.decrypt(ciphertext) assert decryption == plaintext.upper(...
"""Tests for the Caeser module""" from lantern.modules import atbash def test_decrypt(): """Test decryption""" assert atbash.decrypt("uozt{Yzybolm}") == "flag{Babylon}" def test_encrypt(): """Test encryption""" assert ''.join(atbash.encrypt("flag{Babylon}")) == "uozt{Yzybolm}"
"""Tests for the Caeser module""" import pycipher from lantern.modules import atbash def _test_atbash(plaintext, *fitness_functions, top_n=1): ciphertext = pycipher.Atbash().encipher(plaintext, keep_punct=True) decryption = atbash.decrypt(ciphertext) assert decryption == plaintext.upper() def test_de...
<commit_before>"""Tests for the Caeser module""" import pycipher from lantern.modules import atbash def _test_atbash(plaintext, *fitness_functions, top_n=1): ciphertext = pycipher.Atbash().encipher(plaintext, keep_punct=True) decryption = atbash.decrypt(ciphertext) assert decryption == plaintext.upper(...
2c7065f82a242e6f05eaefda4ec902ddf9d90037
tests/test_stanc_warnings.py
tests/test_stanc_warnings.py
"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(program_code=pr...
"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(program_code=pr...
Update test for Stan 2.29
test: Update test for Stan 2.29
Python
isc
stan-dev/pystan,stan-dev/pystan
"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(program_code=pr...
"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(program_code=pr...
<commit_before>"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(...
"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(program_code=pr...
"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(program_code=pr...
<commit_before>"""Test that stanc warnings are visible.""" import contextlib import io import stan def test_stanc_no_warning() -> None: """No warnings.""" program_code = "parameters {real y;} model {y ~ normal(0,1);}" buffer = io.StringIO() with contextlib.redirect_stderr(buffer): stan.build(...
f668956fd37fa2fa0a0c82a8241671bf3cc306cb
tests/unit/moto_test_data.py
tests/unit/moto_test_data.py
""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"Body": b"Fake da...
""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"Body": b"Fake da...
Fix string using py3 only feature.
Fix string using py3 only feature.
Python
mit
DigitalGlobe/gbdxtools,DigitalGlobe/gbdxtools
""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"Body": b"Fake da...
""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"Body": b"Fake da...
<commit_before>""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"B...
""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"Body": b"Fake da...
""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"Body": b"Fake da...
<commit_before>""" These functions are written assuming the under a moto call stack. TODO add check is a fake bucket? """ import boto3 def pre_load_s3_data(bucket_name, prefix, region='us-east-1'): s3 = boto3.client('s3', region_name=region) res = s3.create_bucket(Bucket=bucket_name) default_kwargs = {"B...
03b685055037283279394d940602520c5ff7a817
email_log/models.py
email_log/models.py
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" from_email = mod...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" from_email = mod...
Fix indentation problem and line length (PEP8)
Fix indentation problem and line length (PEP8)
Python
mit
treyhunner/django-email-log,treyhunner/django-email-log
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" from_email = mod...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" from_email = mod...
<commit_before>from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" f...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" from_email = mod...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" from_email = mod...
<commit_before>from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Email(models.Model): """Model to store outgoing email information""" f...
9cbb73371db450599b7a3a964ab43f2f717b8bb7
connector/__manifest__.py
connector/__manifest__.py
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
Remove application flag, not an application
Remove application flag, not an application
Python
agpl-3.0
OCA/connector,OCA/connector
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
<commit_before># -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-...
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
# -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-connector.com',...
<commit_before># -*- coding: utf-8 -*- # Copyright 2013-2017 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'Connector', 'version': '10.0.1.0.0', 'author': 'Camptocamp,Openerp Connector Core Editors,' 'Odoo Community Association (OCA)', 'website': 'http://odoo-...
ad6bb5b787b4b959ff24c71122fc6f4d1a7e7ff9
cooltools/cli/__init__.py
cooltools/cli/__init__.py
# -*- coding: utf-8 -*- from __future__ import division, print_function import click from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_settings=CO...
# -*- coding: utf-8 -*- from __future__ import division, print_function import click import sys from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_...
Add top-level cli debugging and verbosity options
Add top-level cli debugging and verbosity options
Python
mit
open2c/cooltools
# -*- coding: utf-8 -*- from __future__ import division, print_function import click from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_settings=CO...
# -*- coding: utf-8 -*- from __future__ import division, print_function import click import sys from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_...
<commit_before># -*- coding: utf-8 -*- from __future__ import division, print_function import click from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(cont...
# -*- coding: utf-8 -*- from __future__ import division, print_function import click import sys from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_...
# -*- coding: utf-8 -*- from __future__ import division, print_function import click from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_settings=CO...
<commit_before># -*- coding: utf-8 -*- from __future__ import division, print_function import click from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(cont...
efab6ea568c11411d901249d7660765cd987b532
examples/completion.py
examples/completion.py
import gtk from kiwi.ui.widgets.entry import Entry entry = Entry() entry.set_completion_strings(['apa', 'apapa', 'apbla', 'apppa', 'aaspa']) win = gtk.Window() win.connect('delete-event', gtk.main_quit) win.add(entry) win.show_all() gtk.main()
# encoding: iso-8859-1 import gtk from kiwi.ui.widgets.entry import Entry def on_entry_activate(entry): print 'You selected:', entry.get_text().encode('latin1') gtk.main_quit() entry = Entry() entry.connect('activate', on_entry_activate) entry.set_completion_strings(['Belo Horizonte', ...
Extend example to include non-ASCII characters
Extend example to include non-ASCII characters
Python
lgpl-2.1
Schevo/kiwi,Schevo/kiwi,Schevo/kiwi
import gtk from kiwi.ui.widgets.entry import Entry entry = Entry() entry.set_completion_strings(['apa', 'apapa', 'apbla', 'apppa', 'aaspa']) win = gtk.Window() win.connect('delete-event', gtk.main_quit) win.add(entry) win.show_all() gtk.main() Extend example to include non-ASCII charac...
# encoding: iso-8859-1 import gtk from kiwi.ui.widgets.entry import Entry def on_entry_activate(entry): print 'You selected:', entry.get_text().encode('latin1') gtk.main_quit() entry = Entry() entry.connect('activate', on_entry_activate) entry.set_completion_strings(['Belo Horizonte', ...
<commit_before>import gtk from kiwi.ui.widgets.entry import Entry entry = Entry() entry.set_completion_strings(['apa', 'apapa', 'apbla', 'apppa', 'aaspa']) win = gtk.Window() win.connect('delete-event', gtk.main_quit) win.add(entry) win.show_all() gtk.main() <commit_msg>Extend example ...
# encoding: iso-8859-1 import gtk from kiwi.ui.widgets.entry import Entry def on_entry_activate(entry): print 'You selected:', entry.get_text().encode('latin1') gtk.main_quit() entry = Entry() entry.connect('activate', on_entry_activate) entry.set_completion_strings(['Belo Horizonte', ...
import gtk from kiwi.ui.widgets.entry import Entry entry = Entry() entry.set_completion_strings(['apa', 'apapa', 'apbla', 'apppa', 'aaspa']) win = gtk.Window() win.connect('delete-event', gtk.main_quit) win.add(entry) win.show_all() gtk.main() Extend example to include non-ASCII charac...
<commit_before>import gtk from kiwi.ui.widgets.entry import Entry entry = Entry() entry.set_completion_strings(['apa', 'apapa', 'apbla', 'apppa', 'aaspa']) win = gtk.Window() win.connect('delete-event', gtk.main_quit) win.add(entry) win.show_all() gtk.main() <commit_msg>Extend example ...
b25164e69d255beae1a76a9e1f7168a436a81f38
tests/test_utils.py
tests/test_utils.py
import helper from rock import utils class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s.__exit__(None, None, None) self.a...
import helper from rock import utils from rock.exceptions import ConfigError class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s._...
Test isexecutable check in utils.Shell
Test isexecutable check in utils.Shell
Python
mit
silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock,silas/rock
import helper from rock import utils class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s.__exit__(None, None, None) self.a...
import helper from rock import utils from rock.exceptions import ConfigError class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s._...
<commit_before>import helper from rock import utils class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s.__exit__(None, None, None)...
import helper from rock import utils from rock.exceptions import ConfigError class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s._...
import helper from rock import utils class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s.__exit__(None, None, None) self.a...
<commit_before>import helper from rock import utils class UtilsTestCase(helper.unittest.TestCase): def test_shell(self): utils.Shell.run = lambda self: self s = utils.Shell() self.assertTrue(isinstance(s.__enter__(), utils.Shell)) s.write('ok') s.__exit__(None, None, None)...
fc14e41432fece7d724aef73dd8ad7fef5e85c9a
flow/__init__.py
flow/__init__.py
from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ,StringDelimite...
from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ,StringDelimite...
Add IdentityEncoder to top-level exports
Add IdentityEncoder to top-level exports
Python
mit
JohnVinyard/featureflow,JohnVinyard/featureflow
from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ,StringDelimite...
from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ,StringDelimite...
<commit_before>from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ...
from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ,StringDelimite...
from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ,StringDelimite...
<commit_before>from model import BaseModel from feature import Feature,JSONFeature,TextFeature,CompressedFeature,PickleFeature from extractor import Node,Graph,Aggregator,NotEnoughData from bytestream import ByteStream,ByteStreamFeature from data import \ IdProvider,UuidProvider,UserSpecifiedIdProvider,KeyBuilder\ ...
ff4477c870b9c618b7432047071792c3a8055eb7
coffeeraspi/messages.py
coffeeraspi/messages.py
class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], data.get('name...
class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], data.get('name...
Add nicer drink order logging
Add nicer drink order logging
Python
apache-2.0
umbc-hackafe/htcpcp,umbc-hackafe/htcpcp,umbc-hackafe/htcpcp,umbc-hackafe/htcpcp
class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], data.get('name...
class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], data.get('name...
<commit_before>class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], ...
class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], data.get('name...
class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], data.get('name...
<commit_before>class DrinkOrder(): def __init__(self, mug_size, add_ins, name=None): self.mug_size = mug_size self.add_ins = add_ins self.name = name @classmethod def deserialize(cls, data): return DrinkOrder(data['mug_size'], data['add_ins'], ...
056bb4adada68d96f127a7610289d874ebe0cf1b
cray_test.py
cray_test.py
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get_test_suites())...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig, testgenerator, testpostmanager if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.ap...
Add test cases for module post_manager, refactor part of class PostManager and update TODO list.
Add test cases for module post_manager, refactor part of class PostManager and update TODO list.
Python
mit
boluny/cray,boluny/cray
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get_test_suites())...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig, testgenerator, testpostmanager if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.ap...
<commit_before># -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig, testgenerator, testpostmanager if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.ap...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get_test_suites())...
<commit_before># -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get...
ea96ed757e3709fbf8a7c12640e40ed3392d90fb
tensorflow/python/keras/preprocessing/__init__.py
tensorflow/python/keras/preprocessing/__init__.py
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Fix build failure for mac/ubuntu, which relies on an old version for keras-preprocessing.
Fix build failure for mac/ubuntu, which relies on an old version for keras-preprocessing. PiperOrigin-RevId: 273405152
Python
apache-2.0
DavidNorman/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,davidzchen/tensorflow,aldian/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,ten...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
58be36ca646c4bb7fd4263a592cf3a240fbca64f
post_tag.py
post_tag.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_post(m) tags = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_post(m) tags = ...
Fix tag creation with non-ascii chars. (Dammit bottle!)
Fix tag creation with non-ascii chars. (Dammit bottle!)
Python
mit
drougge/wwwwellpapp,drougge/wwwwellpapp,drougge/wwwwellpapp
#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_post(m) tags = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_post(m) tags = ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_p...
#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_post(m) tags = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_post(m) tags = ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from common import init, globaldata, tag_clean, tag_prefix, tag_post, tagtypes from bottle import post, request, redirect, mako_view as view @post("/post-tag") @view("post-tag") def r_post_tag(): client = init() m = request.forms.post post = client.get_p...
bb32f2327d2e3aa386fffd2fd320a7af7b03ce95
corehq/apps/domain/project_access/middleware.py
corehq/apps/domain/project_access/middleware.py
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcache import quickc...
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcache import quickc...
Include superusers in web user domaing access record
Include superusers in web user domaing access record
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcache import quickc...
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcache import quickc...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcach...
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcache import quickc...
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcache import quickc...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY from corehq.util.quickcach...
dd336c7555390d2713ef896f49ba27dbadc80a14
tests/server/extensions/test_execute_command.py
tests/server/extensions/test_execute_command.py
"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("GITHUB") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a command to run...
"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("CI") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a command to run in ...
Use correct env to check if on github
Use correct env to check if on github
Python
bsd-3-clause
Clinical-Genomics/scout,Clinical-Genomics/scout,Clinical-Genomics/scout
"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("GITHUB") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a command to run...
"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("CI") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a command to run in ...
<commit_before>"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("GITHUB") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a...
"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("CI") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a command to run in ...
"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("GITHUB") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a command to run...
<commit_before>"""Tests for execute commands function""" import os import subprocess import pytest from scout.server.extensions.loqus_extension import execute_command TRAVIS = os.getenv("TRAVIS") GITHUB = os.getenv("GITHUB") def test_run_execute_command(): """Test run echo with execute command""" # GIVEN a...
6d8e535a56ee2f05f051d101ee5f3903176f19fe
rnacentral/rnacentral/local_settings_default.py
rnacentral/rnacentral/local_settings_default.py
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 a...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 a...
Update the default settings file to include the database threaded option
Update the default settings file to include the database threaded option
Python
apache-2.0
RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 a...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 a...
<commit_before>""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 appl...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 a...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 a...
<commit_before>""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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 appl...
3d3809931b5683b69e57507320b6d78df102f8d1
warehouse/database/mixins.py
warehouse/database/mixins.py
from sqlalchemy.dialects import postgresql as pg from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), primary_key=True, server_defaul...
from sqlalchemy.dialects import postgresql as pg from sqlalchemy.schema import FetchedValue from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), ...
Mark TimeStampedMixin.modified as an onupdate FetchedValue
Mark TimeStampedMixin.modified as an onupdate FetchedValue
Python
bsd-2-clause
davidfischer/warehouse
from sqlalchemy.dialects import postgresql as pg from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), primary_key=True, server_defaul...
from sqlalchemy.dialects import postgresql as pg from sqlalchemy.schema import FetchedValue from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), ...
<commit_before>from sqlalchemy.dialects import postgresql as pg from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), primary_key=True...
from sqlalchemy.dialects import postgresql as pg from sqlalchemy.schema import FetchedValue from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), ...
from sqlalchemy.dialects import postgresql as pg from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), primary_key=True, server_defaul...
<commit_before>from sqlalchemy.dialects import postgresql as pg from sqlalchemy.sql import func from sqlalchemy.sql.expression import text from warehouse import db from warehouse.database.schema import TableDDL class UUIDPrimaryKeyMixin(object): id = db.Column(pg.UUID(as_uuid=True), primary_key=True...
d9f20935f6a0d5bf4e2c1dd1a3c5b41167f8518b
email_log/migrations/0001_initial.py
email_log/migrations/0001_initial.py
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ (u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=Tru...
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, ...
Fix migration file for Python 3.2 (and PEP8)
Fix migration file for Python 3.2 (and PEP8)
Python
mit
treyhunner/django-email-log,treyhunner/django-email-log
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ (u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=Tru...
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, ...
<commit_before># encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ (u'id', models.AutoField(verbose_name=u'ID', serialize=False, a...
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, ...
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ (u'id', models.AutoField(verbose_name=u'ID', serialize=False, auto_created=Tru...
<commit_before># encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Email', fields=[ (u'id', models.AutoField(verbose_name=u'ID', serialize=False, a...
733404ba2eb7218bb4d253cd74fe88107ff75afc
test/test_live_openid_login.py
test/test_live_openid_login.py
import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login(): """ Tests login to the Stack Exchange OpenID provider. """ browser = SEChatBrowser() # avoid hitting the SE servers...
import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login_recognizes_failure(): """ Tests that failed SE OpenID logins raise errors. """ browser = SEChatBrowser() # avoid hitti...
Remove successful OpenID login live test. It's redundant with our message-related live tests.
Remove successful OpenID login live test. It's redundant with our message-related live tests.
Python
apache-2.0
ByteCommander/ChatExchange6,hichris1234/ChatExchange,Charcoal-SE/ChatExchange,hichris1234/ChatExchange,ByteCommander/ChatExchange6,Charcoal-SE/ChatExchange
import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login(): """ Tests login to the Stack Exchange OpenID provider. """ browser = SEChatBrowser() # avoid hitting the SE servers...
import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login_recognizes_failure(): """ Tests that failed SE OpenID logins raise errors. """ browser = SEChatBrowser() # avoid hitti...
<commit_before>import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login(): """ Tests login to the Stack Exchange OpenID provider. """ browser = SEChatBrowser() # avoid hitting...
import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login_recognizes_failure(): """ Tests that failed SE OpenID logins raise errors. """ browser = SEChatBrowser() # avoid hitti...
import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login(): """ Tests login to the Stack Exchange OpenID provider. """ browser = SEChatBrowser() # avoid hitting the SE servers...
<commit_before>import time import pytest from chatexchange.browser import SEChatBrowser, LoginError import live_testing if live_testing.enabled: def test_openid_login(): """ Tests login to the Stack Exchange OpenID provider. """ browser = SEChatBrowser() # avoid hitting...
210e99b9b19484991f4d7d4106ed9c0ae802b2f7
windmill/server/__init__.py
windmill/server/__init__.py
# Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 # # ...
# Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 # # ...
Stop forwarding flash by default, it breaks more than it doesn't.
Stop forwarding flash by default, it breaks more than it doesn't. git-svn-id: 87d19257dd11500985d055ec4730e446075a5f07@1279 78c7df6f-8922-0410-bcd3-9426b1ad491b
Python
apache-2.0
windmill/windmill,windmill/windmill,windmill/windmill,windmill/windmill,windmill/windmill,windmill/windmill
# Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 # # ...
# Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 # # ...
<commit_before># Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 L...
# Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 # # ...
# Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 # # ...
<commit_before># Copyright (c) 2006-2007 Open Source Applications Foundation # Copyright (c) 2008-2009 Mikeal Rogers <mikeal.rogers@gmail.com> # # 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 L...
9c428fbfb69c93ef3da935d0d2ab098fbeb1c317
dsh.py
dsh.py
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
Revert "Testing NoOpDSH() when database commands are executed without a connection being opened."
Revert "Testing NoOpDSH() when database commands are executed without a connection being opened." This reverts commit 57dd36da6f558e9bd5c9b7c97e955600c2fa0b8e.
Python
mit
mcmontero/tinyAPI,mcmontero/tinyAPI
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
<commit_before># ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ =...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ = [ 'dsh' ] ...
<commit_before># ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.data_store.provider import DataStoreProvider import tinyAPI __all__ =...
eced06f6f523fa6fd475987ae688b7ca2b6c3415
checks/system/__init__.py
checks/system/__init__.py
""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform return name.start...
""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform return name.start...
Add win32 to platform information
Add win32 to platform information
Python
bsd-3-clause
jraede/dd-agent,tebriel/dd-agent,JohnLZeller/dd-agent,a20012251/dd-agent,remh/dd-agent,tebriel/dd-agent,AntoCard/powerdns-recursor_check,tebriel/dd-agent,AniruddhaSAtre/dd-agent,urosgruber/dd-agent,polynomial/dd-agent,JohnLZeller/dd-agent,Mashape/dd-agent,JohnLZeller/dd-agent,eeroniemi/dd-agent,c960657/dd-agent,mderomp...
""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform return name.start...
""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform return name.start...
<commit_before>""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform re...
""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform return name.start...
""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform return name.start...
<commit_before>""" Return information about the given platform. """ import sys class Platform(object): @staticmethod def is_darwin(name=None): name = name or sys.platform return 'darwin' in name @staticmethod def is_freebsd(name=None): name = name or sys.platform re...
1c5f36b0f133ff668f17a1f023c2d52dc2bfbf49
generate_files_json.py
generate_files_json.py
#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.walk("comparison...
#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.walk("comparison...
Fix extension detection in JSON generation
Fix extension detection in JSON generation
Python
bsd-3-clause
WyohKnott/image-comparison-sources
#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.walk("comparison...
#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.walk("comparison...
<commit_before>#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.w...
#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.walk("comparison...
#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.walk("comparison...
<commit_before>#!/usr/bin/python3 import os import json import glob data = {} data['comparisonfiles'] = {} for subset in next(os.walk("comparisonfiles/"))[1]: data['comparisonfiles'][subset] = {} data['comparisonfiles'][subset]["format"] = [] format_list = [ format for format in next(os.w...
ba6ef2ac850c91ac8a72401b7bd7b130bc2cc1d6
docs/conf.py
docs/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full ve...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..', relative_to=__...
Fix version detection for tests
Fix version detection for tests
Python
mit
jaraco/jaraco.logging
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full ve...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..', relative_to=__...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..')...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..', relative_to=__...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..') # The full ve...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', ] # General information about the project. project = 'jaraco.logging' copyright = '2015 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..')...
b974bbcc7e243fca7c3dc63fbbaf530fe9b69e50
runtests.py
runtests.py
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
import os import sys try: sys.path.append('demoproject') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demoproject.settings") from django.conf import settings from django.core.management import call_command settings.DATABASES['default']['NAME'] = ':memory:' settings.INSTALLED_APPS.append('...
Load DB migrations before testing and use verbose=2 and failfast
Load DB migrations before testing and use verbose=2 and failfast Note that we use `manage.py test` instead of `manage.py migrate` and manually running the tests. This lets Django take care of applying migrations before running tests. This works around https://code.djangoproject.com/ticket/22487 which causes a test fai...
Python
bsd-2-clause
pgollakota/django-chartit,pgollakota/django-chartit,pgollakota/django-chartit
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
import os import sys try: sys.path.append('demoproject') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demoproject.settings") from django.conf import settings from django.core.management import call_command settings.DATABASES['default']['NAME'] = ':memory:' settings.INSTALLED_APPS.append('...
<commit_before>import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", ...
import os import sys try: sys.path.append('demoproject') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demoproject.settings") from django.conf import settings from django.core.management import call_command settings.DATABASES['default']['NAME'] = ':memory:' settings.INSTALLED_APPS.append('...
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } ...
<commit_before>import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", ...
471bb3847b78f36f79af6cbae288a8876357cb3c
runtests.py
runtests.py
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'consol...
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'consol...
Add missing config that caused test to fail
Add missing config that caused test to fail
Python
mit
Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'consol...
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'consol...
<commit_before>#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { ...
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'consol...
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'consol...
<commit_before>#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: params = dict( LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { ...
25224af8c002c05397e5c3163f0b77cb82ce325e
data_collection/management/commands/assignfirms.py
data_collection/management/commands/assignfirms.py
from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) def handle(sel...
from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools, random class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) par...
Add ability to proportionally assign to different users
Add ability to proportionally assign to different users
Python
bsd-3-clause
sunlightlabs/hanuman,sunlightlabs/hanuman,sunlightlabs/hanuman
from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) def handle(sel...
from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools, random class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) par...
<commit_before>from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) ...
from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools, random class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) par...
from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) def handle(sel...
<commit_before>from django.core.management.base import BaseCommand, CommandError from data_collection.models import User, Firm, Assignment import itertools class Command(BaseCommand): help = "Assign firms to users" def add_arguments(self, parser): parser.add_argument('users', nargs='+', type=str) ...
54b3b69d152611d55ce7db66c2c34dc2b1140cc7
wellknown/models.py
wellknown/models.py
from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # class Resource(mo...
from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # class Resource(mo...
Remove code that was causing a problem running syncdb. Code seems to be redundant anyway.
Remove code that was causing a problem running syncdb. Code seems to be redundant anyway.
Python
bsd-3-clause
jcarbaugh/django-wellknown
from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # class Resource(mo...
from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # class Resource(mo...
<commit_before>from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # cl...
from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # class Resource(mo...
from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # class Resource(mo...
<commit_before>from django.db import models from django.db.models.signals import post_save import mimetypes import wellknown # # create default host-meta handler # from wellknown.resources import HostMeta wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml') # # resource model # cl...
4e7917ab5a2e112af8c69b89805af6b097eed97e
examples/custom_table_caching/grammar.py
examples/custom_table_caching/grammar.py
from parglare import Grammar grammar = Grammar.from_string(""" start: ab EOF; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start'
from parglare import Grammar grammar = Grammar.from_string(""" start: ab; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start'
Remove `EOF` -- update examples
Remove `EOF` -- update examples refs #64
Python
mit
igordejanovic/parglare,igordejanovic/parglare
from parglare import Grammar grammar = Grammar.from_string(""" start: ab EOF; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start' Remove `EOF` -- update examples refs #64
from parglare import Grammar grammar = Grammar.from_string(""" start: ab; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start'
<commit_before>from parglare import Grammar grammar = Grammar.from_string(""" start: ab EOF; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start' <commit_msg>Remove `EOF` -- update examples refs #64<commit_after>
from parglare import Grammar grammar = Grammar.from_string(""" start: ab; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start'
from parglare import Grammar grammar = Grammar.from_string(""" start: ab EOF; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start' Remove `EOF` -- update examples refs #64from parglare import Grammar grammar = Grammar.from_string(""" start: ab; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start'
<commit_before>from parglare import Grammar grammar = Grammar.from_string(""" start: ab EOF; ab: "a" ab "b" | EMPTY; """) start_symbol = 'start' <commit_msg>Remove `EOF` -- update examples refs #64<commit_after>from parglare import Grammar grammar = Grammar.from_string(""" start: ab; ab: "a" ab "b...
75289980c658e081fec2d7e34651837c4629d4b7
settings.py
settings.py
# -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = 'your-app-i...
# -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = 'your-web-c...
Fix the placeholder for better understanding
fix: Fix the placeholder for better understanding
Python
mit
iraquitan/udacity-fsnd-p4-conference-app,iraquitan/udacity-fsnd-p4-conference-app,iraquitan/udacity-fsnd-p4-conference-app
# -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = 'your-app-i...
# -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = 'your-web-c...
<commit_before># -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_I...
# -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = 'your-web-c...
# -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = 'your-app-i...
<commit_before># -*- coding: utf-8 -*- """ * Project: udacity-fsnd-p4-conference-app * Author name: Iraquitan Cordeiro Filho * Author login: iraquitan * File: settings * Date: 3/23/16 * Time: 12:16 AM """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_I...
68b52fedf5b22891a4fc9cf121417ced38d0ea00
rolepermissions/utils.py
rolepermissions/utils.py
from __future__ import unicode_literals import re import collections def user_is_authenticated(user): if isinstance(user.is_authenticated, collections.Callable): authenticated = user.is_authenticated() else: authenticated = user.is_authenticated return authenticated def camelToSnake(s)...
from __future__ import unicode_literals import re try: from collections.abc import Callable except ImportError: from collections import Callable def user_is_authenticated(user): if isinstance(user.is_authenticated, Callable): authenticated = user.is_authenticated() else: authenticated...
Fix import of Callable for Python 3.9
Fix import of Callable for Python 3.9 Python 3.3 moved Callable to collections.abc and Python 3.9 removes Callable from collections module
Python
mit
vintasoftware/django-role-permissions
from __future__ import unicode_literals import re import collections def user_is_authenticated(user): if isinstance(user.is_authenticated, collections.Callable): authenticated = user.is_authenticated() else: authenticated = user.is_authenticated return authenticated def camelToSnake(s)...
from __future__ import unicode_literals import re try: from collections.abc import Callable except ImportError: from collections import Callable def user_is_authenticated(user): if isinstance(user.is_authenticated, Callable): authenticated = user.is_authenticated() else: authenticated...
<commit_before>from __future__ import unicode_literals import re import collections def user_is_authenticated(user): if isinstance(user.is_authenticated, collections.Callable): authenticated = user.is_authenticated() else: authenticated = user.is_authenticated return authenticated def ...
from __future__ import unicode_literals import re try: from collections.abc import Callable except ImportError: from collections import Callable def user_is_authenticated(user): if isinstance(user.is_authenticated, Callable): authenticated = user.is_authenticated() else: authenticated...
from __future__ import unicode_literals import re import collections def user_is_authenticated(user): if isinstance(user.is_authenticated, collections.Callable): authenticated = user.is_authenticated() else: authenticated = user.is_authenticated return authenticated def camelToSnake(s)...
<commit_before>from __future__ import unicode_literals import re import collections def user_is_authenticated(user): if isinstance(user.is_authenticated, collections.Callable): authenticated = user.is_authenticated() else: authenticated = user.is_authenticated return authenticated def ...
7f7fd4e7547af3a6d7e3cd4da025c2b0ab24508b
widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('review_qu...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('widgy', '...
Remove dependency for ReviewedVersionTracker in migrations
Remove dependency for ReviewedVersionTracker in migrations The base widgy migrations had references to ReviewedVersionTracker, which is not part of the base widgy install. This commit changes the dependency to VersionTracker instead, which is part of the base widgy install.
Python
apache-2.0
j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('review_qu...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('widgy', '...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('widgy', '...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ('review_qu...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import widgy.db.fields import django.db.models.deletion import widgy.contrib.widgy_mezzanine.models class Migration(migrations.Migration): dependencies = [ ('pages', '__first__'), ...
e9dc10532a0357bc90ebaa2655b36822f9249673
test/__init__.py
test/__init__.py
from cellulario import iocell import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) iocell.DEBUG = True
from cellulario import iocell iocell.DEBUG = True
Remove uvloop from test run.
Remove uvloop from test run.
Python
mit
mayfield/cellulario
from cellulario import iocell import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) iocell.DEBUG = True Remove uvloop from test run.
from cellulario import iocell iocell.DEBUG = True
<commit_before>from cellulario import iocell import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) iocell.DEBUG = True <commit_msg>Remove uvloop from test run.<commit_after>
from cellulario import iocell iocell.DEBUG = True
from cellulario import iocell import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) iocell.DEBUG = True Remove uvloop from test run.from cellulario import iocell iocell.DEBUG = True
<commit_before>from cellulario import iocell import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) iocell.DEBUG = True <commit_msg>Remove uvloop from test run.<commit_after>from cellulario import iocell iocell.DEBUG = True
16369ed6a11aaa39e94479b06ed78eb75f5b33e1
src/args.py
src/args.py
#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from argparse import ArgumentParser from gl...
#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from glob import glob from os import path ...
Fix --crx arg error reporting.
Fix --crx arg error reporting.
Python
mpl-2.0
ghostwords/chameleon-crawler,ghostwords/chameleon-crawler,ghostwords/chameleon-crawler
#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from argparse import ArgumentParser from gl...
#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from glob import glob from os import path ...
<commit_before>#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from argparse import Argumen...
#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from glob import glob from os import path ...
#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from argparse import ArgumentParser from gl...
<commit_before>#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2014 ghostwords. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from argparse import Argumen...
78675420e9d23d9978f68ed002de0fc1284d3d0c
node.py
node.py
class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.inbound_nodes: ...
class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.inbound_nodes: ...
Add forward function declaration to Class Node
Add forward function declaration to Class Node
Python
mit
YabinHu/miniflow
class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.inbound_nodes: ...
class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.inbound_nodes: ...
<commit_before>class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.in...
class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.inbound_nodes: ...
class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.inbound_nodes: ...
<commit_before>class Node(object): def __init__(self): # Node(s) from which this Node receives values self.inbound_nodes = inbound_nodes # Node(s) to which this Node passes values self.outbound_nodes = [] # For each inbound Node here, add this Node as an outbound to that Node. for n in self.in...
238578d41beec33d7428cb53d79fc21c028cfc87
tests/specifications/external_spec_test.py
tests/specifications/external_spec_test.py
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator ...
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(item_type, item_id, item): if item_type == "check" and item_id in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", ...
Use auto_register's filter_func to filter tests
Use auto_register's filter_func to filter tests
Python
apache-2.0
moyogo/fontbakery,moyogo/fontbakery,googlefonts/fontbakery,googlefonts/fontbakery,moyogo/fontbakery,graphicore/fontbakery,graphicore/fontbakery,graphicore/fontbakery,googlefonts/fontbakery
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator ...
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(item_type, item_id, item): if item_type == "check" and item_id in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", ...
<commit_before>from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Fo...
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(item_type, item_id, item): if item_type == "check" and item_id in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", ...
from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Font Validator ...
<commit_before>from fontbakery.checkrunner import Section from fontbakery.fonts_spec import spec_factory def check_filter(checkid, font=None, **iterargs): if checkid in ( "com.google.fonts/check/035", # ftxvalidator "com.google.fonts/check/036", # ots-sanitize "com.google.fonts/check/037", # Fo...
a7be90536618ac52c91f599bb167e05f831cddfb
mangopaysdk/entities/transaction.py
mangopaysdk/entities/transaction.py
from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId = None #...
from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId = None #...
Add possibilty to get ResultMessage
Add possibilty to get ResultMessage
Python
mit
chocopoche/mangopay2-python-sdk,Mangopay/mangopay2-python-sdk
from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId = None #...
from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId = None #...
<commit_before>from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId =...
from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId = None #...
from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId = None #...
<commit_before>from mangopaysdk.entities.entitybase import EntityBase from mangopaysdk.types.money import Money class Transaction (EntityBase): """Transaction entity. Base class for: PayIn, PayOut, Transfer. """ def __init__(self, id = None): self.AuthorId = None self.CreditedUserId =...
1a9c5c6cee3b8c31d92ab0949fc312907adf6611
swf/core.py
swf/core.py
# -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the instance attribu...
# -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the instance attribu...
Fix ConnectedSWFObject: pass default value to pop()
Fix ConnectedSWFObject: pass default value to pop()
Python
mit
botify-labs/python-simple-workflow,botify-labs/python-simple-workflow
# -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the instance attribu...
# -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the instance attribu...
<commit_before># -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the i...
# -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the instance attribu...
# -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the instance attribu...
<commit_before># -*- coding:utf-8 -*- # Copyright (c) 2013, Theo Crevon # Copyright (c) 2013, Greg Leclercq # # See the file LICENSE for copying permission. import boto.swf from . import settings SETTINGS = settings.get() class ConnectedSWFObject(object): """Authenticated object interface Provides the i...
3cacced39d9cb8bd5d6a2b3db8aa4b5aa1b37f58
jaraco/util/meta.py
jaraco/util/meta.py
""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_classes'): cls._...
""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_classes'): cls._...
Allow attribute to be customized in TagRegistered
Allow attribute to be customized in TagRegistered
Python
mit
jaraco/jaraco.classes
""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_classes'): cls._...
""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_classes'): cls._...
<commit_before>""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_clas...
""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_classes'): cls._...
""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_classes'): cls._...
<commit_before>""" meta.py Some useful metaclasses. """ from __future__ import unicode_literals class LeafClassesMeta(type): """ A metaclass for classes that keeps track of all of them that aren't base classes. """ _leaf_classes = set() def __init__(cls, name, bases, attrs): if not hasattr(cls, '_leaf_clas...
7b6838ea292e011f96f5212992d00c1009e1f6b2
examples/gitter_example.py
examples/gitter_example.py
# -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) chatbot = ChatBot( 'GitterBot', gitter_room=GITTER['...
# -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) ''' To use this example, create a new file called settings.p...
Add better instructions to the Gitter example
Add better instructions to the Gitter example
Python
bsd-3-clause
gunthercox/ChatterBot,vkosuri/ChatterBot
# -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) chatbot = ChatBot( 'GitterBot', gitter_room=GITTER['...
# -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) ''' To use this example, create a new file called settings.p...
<commit_before># -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) chatbot = ChatBot( 'GitterBot', gitte...
# -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) ''' To use this example, create a new file called settings.p...
# -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) chatbot = ChatBot( 'GitterBot', gitter_room=GITTER['...
<commit_before># -*- coding: utf-8 -*- from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer from settings import GITTER # Uncomment the following lines to enable verbose logging # import logging # logging.basicConfig(level=logging.INFO) chatbot = ChatBot( 'GitterBot', gitte...
260a5601a9b2990374d2f97d92898236e0b9342e
tests/profiling_test_script.py
tests/profiling_test_script.py
#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 for i in xrange...
#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 for i in xrange...
Add diversity to test script
Add diversity to test script
Python
mit
jitseniesen/spyder-memory-profiler,jitseniesen/spyder-memory-profiler,Nodd/spyder_line_profiler,spyder-ide/spyder.line_profiler,spyder-ide/spyder.memory_profiler,spyder-ide/spyder.line-profiler,Nodd/spyder.line_profiler
#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 for i in xrange...
#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 for i in xrange...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 ...
#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 for i in xrange...
#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 for i in xrange...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, division, unicode_literals, absolute_import) import subdir.profiling_test_script2 as script2 @profile def fact(n): result = 1 ...
c0db57b52aa0546fd6f7a2cf4fc0242cbcf76537
test_bot.py
test_bot.py
#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB('http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello world', categor...
#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB(domain='http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello world', ...
Fix the test bot's TPB initialization
Fix the test bot's TPB initialization
Python
mit
karan/TPB,karan/TPB
#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB('http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello world', categor...
#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB(domain='http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello world', ...
<commit_before>#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB('http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello ...
#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB(domain='http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello world', ...
#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB('http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello world', categor...
<commit_before>#!/usr/bin/env python from tpb import TPB t = TPB() # when using a proxy site # t = TPB('http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents(): print '*' * 50 to.print_torrent() print '\n' """ # search for programming ebooks results = t.search('hello ...
97a67e022d094743e806896386bdbe317cb56fb6
gitcloner.py
gitcloner.py
#! /usr/bin/env python3 import sys from gitaccount import GitAccount def main(): if len(sys.argv) < 2: print("""Usage: gitcloner.py [OPTION] [NAME] OPTIONS: -u - for user repositories -o - for organization repositories NAME: Username or Organization Name """) ...
#! /usr/bin/env python3 import sys import argparse from gitaccount import GitAccount def main(): parser = argparse.ArgumentParser( prog='gitcloner', description='Clone all the repositories from a github user/org\naccount to the current directory') group = parser.add_mutually_exclusiv...
Use argparse instead of sys.argv
Use argparse instead of sys.argv
Python
mit
shakib609/gitcloner
#! /usr/bin/env python3 import sys from gitaccount import GitAccount def main(): if len(sys.argv) < 2: print("""Usage: gitcloner.py [OPTION] [NAME] OPTIONS: -u - for user repositories -o - for organization repositories NAME: Username or Organization Name """) ...
#! /usr/bin/env python3 import sys import argparse from gitaccount import GitAccount def main(): parser = argparse.ArgumentParser( prog='gitcloner', description='Clone all the repositories from a github user/org\naccount to the current directory') group = parser.add_mutually_exclusiv...
<commit_before>#! /usr/bin/env python3 import sys from gitaccount import GitAccount def main(): if len(sys.argv) < 2: print("""Usage: gitcloner.py [OPTION] [NAME] OPTIONS: -u - for user repositories -o - for organization repositories NAME: Username or Organization Na...
#! /usr/bin/env python3 import sys import argparse from gitaccount import GitAccount def main(): parser = argparse.ArgumentParser( prog='gitcloner', description='Clone all the repositories from a github user/org\naccount to the current directory') group = parser.add_mutually_exclusiv...
#! /usr/bin/env python3 import sys from gitaccount import GitAccount def main(): if len(sys.argv) < 2: print("""Usage: gitcloner.py [OPTION] [NAME] OPTIONS: -u - for user repositories -o - for organization repositories NAME: Username or Organization Name """) ...
<commit_before>#! /usr/bin/env python3 import sys from gitaccount import GitAccount def main(): if len(sys.argv) < 2: print("""Usage: gitcloner.py [OPTION] [NAME] OPTIONS: -u - for user repositories -o - for organization repositories NAME: Username or Organization Na...