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
2268c381913dced911f3cb008d796f215233addf
pgmpy/__init__.py
pgmpy/__init__.py
from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev11"
from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev"
Make the version number just dev instead of numbers and releases are more frequent now
Make the version number just dev instead of numbers and releases are more frequent now
Python
mit
pgmpy/pgmpy,ankurankan/pgmpy,pgmpy/pgmpy,ankurankan/pgmpy
from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev11" Make the version number just dev instead of numbers and releases are more frequent now
from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev"
<commit_before>from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev11" <commit_msg>Make the version number just dev instead of numbers and releases are more frequent now<commit_after>
from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev"
from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev11" Make the version number just dev instead of numbers and releases are more frequent nowfrom .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev"
<commit_before>from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __version__ = "v0.1.9.dev11" <commit_msg>Make the version number just dev instead of numbers and releases are more frequent now<commit_after>from .global_vars import HAS_PANDAS, device __all__ = ["HAS_PANDAS", "device"] __ve...
81908e5f6304cc1c8e8627b0d4c859df194cc36d
ynr/apps/resultsbot/management/commands/store_modgov_urls.py
ynr/apps/resultsbot/management/commands/store_modgov_urls.py
import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects """ pa...
import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects """ #...
Delete existing urls before each run
Delete existing urls before each run
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects """ pa...
import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects """ #...
<commit_before>import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects ...
import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects """ #...
import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects """ pa...
<commit_before>import csv import os from django.core.management.base import BaseCommand import resultsbot from elections.models import Election class Command(BaseCommand): def handle(self, **options): """ Stores possible modgov urls stored in CSV file against the related election objects ...
afc959e23f21e086f710cbc7f3bb56d0b4d93329
bin/set_deploy_permissions.py
bin/set_deploy_permissions.py
#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-4.0.0/example/s...
#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-4.0.0/example/s...
Add builtAssets to webserver-writable dirs
Add builtAssets to webserver-writable dirs
Python
bsd-2-clause
yourcelf/intertwinkles,yourcelf/intertwinkles
#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-4.0.0/example/s...
#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-4.0.0/example/s...
<commit_before>#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-...
#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-4.0.0/example/s...
#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-4.0.0/example/s...
<commit_before>#!/usr/bin/env python """ Set the file permissions appropriately for deployment. Call with the argument of the webserver user (e.g. 'www-data') that should have permissions to uploads and log files. """ import os import sys import subprocess server_writable_directories = [ "vendor/solr/apache-solr-...
7a1b6d1999682ef114f81143a99d0f4d8e1f4af2
transactions_not_entry_line/models/account_invoice.py
transactions_not_entry_line/models/account_invoice.py
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): ...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): ...
Add ids for balance product in transactions_not_entry_line
[FIX] Add ids for balance product in transactions_not_entry_line
Python
agpl-3.0
Gebesa-Dev/Addons-gebesa
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): ...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): ...
<commit_before># -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_cr...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): ...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_create(self): ...
<commit_before># -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, _, models from openerp.exceptions import UserError class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_move_cr...
e90afe565a4d54e7fb81b4fbd29d44525b81aa89
data_structs/queue.py
data_structs/queue.py
#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self): self.items = list() def is_Empty(self): return self.items == [] def size(self): return len(self.items) def set(self, item): self.Queue.insert(0, item) def get(self): return self...
#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self, items=[]): self.items = items def is_Empty(self): return self.items == [] def size(self): return len(self.items) def enqueue(self, item): self.Queue.insert(0, item) def dequeue(self): ...
Add default values and changed names for getter and setter
LinearQueue: Add default values and changed names for getter and setter
Python
apache-2.0
fedusia/python
#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self): self.items = list() def is_Empty(self): return self.items == [] def size(self): return len(self.items) def set(self, item): self.Queue.insert(0, item) def get(self): return self...
#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self, items=[]): self.items = items def is_Empty(self): return self.items == [] def size(self): return len(self.items) def enqueue(self, item): self.Queue.insert(0, item) def dequeue(self): ...
<commit_before>#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self): self.items = list() def is_Empty(self): return self.items == [] def size(self): return len(self.items) def set(self, item): self.Queue.insert(0, item) def get(self): ...
#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self, items=[]): self.items = items def is_Empty(self): return self.items == [] def size(self): return len(self.items) def enqueue(self, item): self.Queue.insert(0, item) def dequeue(self): ...
#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self): self.items = list() def is_Empty(self): return self.items == [] def size(self): return len(self.items) def set(self, item): self.Queue.insert(0, item) def get(self): return self...
<commit_before>#!/usr/bin/env python3 ''' Linear queue ''' class Queue: def __init__(self): self.items = list() def is_Empty(self): return self.items == [] def size(self): return len(self.items) def set(self, item): self.Queue.insert(0, item) def get(self): ...
ec3d63fb12ad73ee832f11ec5f93d7425e5ce0f0
kboard/board/urls.py
kboard/board/urls.py
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
Delete 'board_slug' in 'view_post' url
Delete 'board_slug' in 'view_post' url
Python
mit
kboard/kboard,cjh5414/kboard,guswnsxodlf/k-board,darjeeling/k-board,kboard/kboard,kboard/kboard,hyesun03/k-board,guswnsxodlf/k-board,cjh5414/kboard,guswnsxodlf/k-board,hyesun03/k-board,hyesun03/k-board,cjh5414/kboard
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
<commit_before># Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_post, name='new...
<commit_before># Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-a-z]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-a-z]+)/new/$', views.new_...
97eabe6697e58f3b4dd8cced9a2c3bf05f3444c2
accounting/apps/books/context_processors.py
accounting/apps/books/context_processors.py
from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all user authorized organizations ...
from django.db.models import Q from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all ...
Use owner or member filter for the dropdown
Use owner or member filter for the dropdown
Python
mit
kenjhim/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting
from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all user authorized organizations ...
from django.db.models import Q from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all ...
<commit_before>from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all user authorized o...
from django.db.models import Q from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all ...
from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all user authorized organizations ...
<commit_before>from .utils import organization_manager from .models import Organization def organizations(request): """ Add some generally useful metadata to the template context """ # selected organization orga = organization_manager.get_selected_organization(request) # all user authorized o...
5bf6d25148f627cd0e56b3530fe4c6c2fca6d913
index/views.py
index/views.py
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.course_id, AVG(main...
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.course_id, AVG(main...
Add LIMIT to 10 rows
Add LIMIT to 10 rows
Python
apache-2.0
PNNutkung/Coursing-Field,PNNutkung/Coursing-Field,PNNutkung/Coursing-Field
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.course_id, AVG(main...
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.course_id, AVG(main...
<commit_before>from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.cour...
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.course_id, AVG(main...
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.course_id, AVG(main...
<commit_before>from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, Review # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_review.cour...
f11528381ba055ebc6042bde4cb35e0dd0512a3c
wandb/integration/sagemaker/resources.py
wandb/integration/sagemaker/resources.py
import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): key, val...
import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): key, val...
Fix issue where sagemaker run ids break run queues
[WB-8591] Fix issue where sagemaker run ids break run queues
Python
mit
wandb/client,wandb/client,wandb/client
import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): key, val...
import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): key, val...
<commit_before>import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): ...
import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): key, val...
import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): key, val...
<commit_before>import json import os import socket from . import files as sm_files def parse_sm_secrets(): """We read our api_key from secrets.env in SageMaker""" env_dict = dict() # Set secret variables if os.path.exists(sm_files.SM_SECRETS): for line in open(sm_files.SM_SECRETS, "r"): ...
c48a7617f0555b264ac25ec76db2bdfe949a1695
dimod/package_info.py
dimod/package_info.py
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Update version 0.8.16 -> 0.8.17
Update version 0.8.16 -> 0.8.17 Fixes ----- * Sample sets with non-integer sample dtypes now correctly serialize
Python
apache-2.0
dwavesystems/dimod,dwavesystems/dimod
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
3bd116a301ce8de9d3ea1b0dd4c0a969c278455a
wsgi.py
wsgi.py
from shale import app if __name__ == '__main__': app.run( host='127.0.0.1', )
from shale import app if __name__ == '__main__': app.run()
Revert "bind flask to 127.0.0.1"
Revert "bind flask to 127.0.0.1" This reverts commit 097b126e511d3d7bf5f431cc6df552843fad4477. I guess I was way wrong about that.
Python
mit
mhluongo/shale,mhluongo/shale,cardforcoin/shale,cardforcoin/shale
from shale import app if __name__ == '__main__': app.run( host='127.0.0.1', ) Revert "bind flask to 127.0.0.1" This reverts commit 097b126e511d3d7bf5f431cc6df552843fad4477. I guess I was way wrong about that.
from shale import app if __name__ == '__main__': app.run()
<commit_before>from shale import app if __name__ == '__main__': app.run( host='127.0.0.1', ) <commit_msg>Revert "bind flask to 127.0.0.1" This reverts commit 097b126e511d3d7bf5f431cc6df552843fad4477. I guess I was way wrong about that.<commit_after>
from shale import app if __name__ == '__main__': app.run()
from shale import app if __name__ == '__main__': app.run( host='127.0.0.1', ) Revert "bind flask to 127.0.0.1" This reverts commit 097b126e511d3d7bf5f431cc6df552843fad4477. I guess I was way wrong about that.from shale import app if __name__ == '__main__': app.run()
<commit_before>from shale import app if __name__ == '__main__': app.run( host='127.0.0.1', ) <commit_msg>Revert "bind flask to 127.0.0.1" This reverts commit 097b126e511d3d7bf5f431cc6df552843fad4477. I guess I was way wrong about that.<commit_after>from shale import app if __name__ == '__main__': ...
d77c0dd6b4b7718421bfde323b8ff4d9667fb696
jasylibrary.py
jasylibrary.py
#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(os.path.abspath...
#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(os.path.abspath...
Fix path resolving in part.url
Fix path resolving in part.url
Python
mit
fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur
#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(os.path.abspath...
#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(os.path.abspath...
<commit_before>#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(...
#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(os.path.abspath...
#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(os.path.abspath...
<commit_before>#import os, json #from jasy.core.Util import executeCommand #import jasy.core.Console as Console #import urllib.parse # Little helper to allow python modules in current jasylibrarys path import sys, os.path, inspect filename = inspect.getframeinfo(inspect.currentframe()).filename path = os.path.dirname(...
4620502ff75cab02650a0e28628afae27084fdb4
magnum_ui/version.py
magnum_ui/version.py
import pbr.version version_info = pbr.version.VersionInfo('magnum-ui')
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
Add Apache 2.0 license to source file
Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shouldn't contain any license header nor comments, and must be left completely empty. [1] http://docs.openstack.org/dev...
Python
apache-2.0
openstack/magnum-ui,openstack/magnum-ui,openstack/magnum-ui,openstack/magnum-ui
import pbr.version version_info = pbr.version.VersionInfo('magnum-ui') Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shouldn't contain any license header nor comment...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
<commit_before>import pbr.version version_info = pbr.version.VersionInfo('magnum-ui') <commit_msg>Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shouldn't contain any...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
import pbr.version version_info = pbr.version.VersionInfo('magnum-ui') Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shouldn't contain any license header nor comment...
<commit_before>import pbr.version version_info = pbr.version.VersionInfo('magnum-ui') <commit_msg>Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shouldn't contain any...
b7e38f3fc299d906ab81ab7826af96ea4769d066
fireplace/cards/wog/neutral_common.py
fireplace/cards/wog/neutral_common.py
from ..utils import * ## # Minions class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate" deathrattle = Buff(RANDOM_FRIENDLY_MINION, "OG_158e") OG_158e = buff(+1, +1) class OG_323: "Po...
from ..utils import * ## # Minions class OG_150: "Aberrant Berserker" enrage = Refresh(SELF, buff="OG_150e") OG_150e = buff(atk=2) class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate...
Implement Aberrant Berserker, Infested Tauren, and Spawn of N'Zoth
Implement Aberrant Berserker, Infested Tauren, and Spawn of N'Zoth
Python
agpl-3.0
NightKev/fireplace,jleclanche/fireplace,beheh/fireplace
from ..utils import * ## # Minions class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate" deathrattle = Buff(RANDOM_FRIENDLY_MINION, "OG_158e") OG_158e = buff(+1, +1) class OG_323: "Po...
from ..utils import * ## # Minions class OG_150: "Aberrant Berserker" enrage = Refresh(SELF, buff="OG_150e") OG_150e = buff(atk=2) class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate...
<commit_before>from ..utils import * ## # Minions class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate" deathrattle = Buff(RANDOM_FRIENDLY_MINION, "OG_158e") OG_158e = buff(+1, +1) cla...
from ..utils import * ## # Minions class OG_150: "Aberrant Berserker" enrage = Refresh(SELF, buff="OG_150e") OG_150e = buff(atk=2) class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate...
from ..utils import * ## # Minions class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate" deathrattle = Buff(RANDOM_FRIENDLY_MINION, "OG_158e") OG_158e = buff(+1, +1) class OG_323: "Po...
<commit_before>from ..utils import * ## # Minions class OG_151: "Tentacle of N'Zoth" deathrattle = Hit(ALL_MINIONS, 1) class OG_156: "Bilefin Tidehunter" play = Summon(CONTROLLER, "OG_156a") class OG_158: "Zealous Initiate" deathrattle = Buff(RANDOM_FRIENDLY_MINION, "OG_158e") OG_158e = buff(+1, +1) cla...
fc97ef04bd5e6f6483b7a26348c5168626180941
rafem/__init__.py
rafem/__init__.py
"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import RiverModule __all__ = ['BmiRiverModule', 'RiverModule']
"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import rivermodule __all__ = ['BmiRiverModule', 'rivermodule']
Rename package from avulsion to rafem.
Rename package from avulsion to rafem.
Python
mit
mcflugen/avulsion-bmi,katmratliff/avulsion-bmi
"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import RiverModule __all__ = ['BmiRiverModule', 'RiverModule'] Rename package from avulsion to rafem.
"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import rivermodule __all__ = ['BmiRiverModule', 'rivermodule']
<commit_before>"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import RiverModule __all__ = ['BmiRiverModule', 'RiverModule'] <commit_msg>Rename package from avulsion to rafem.<commit_after>
"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import rivermodule __all__ = ['BmiRiverModule', 'rivermodule']
"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import RiverModule __all__ = ['BmiRiverModule', 'RiverModule'] Rename package from avulsion to rafem."""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import rivermodule __all__ = ['BmiRiverModule...
<commit_before>"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import RiverModule __all__ = ['BmiRiverModule', 'RiverModule'] <commit_msg>Rename package from avulsion to rafem.<commit_after>"""River Avulsion Module.""" from .riverbmi import BmiRiverModule from .rivermodule import...
6fba51e47053d60eb8cb2f44178e548d8f2c3a8e
api/urls.py
api/urls.py
from django.conf.urls import patterns, url, include from api import views # The API URLs are now determined automatically by the router. # Additionally, we include the login URLs for the browseable API. urlpatterns = patterns('', # list of all readings url(r'^api/all', views.ApiRoot.as_view()), # list of ...
from django.conf.urls import url, include from api.views import ReadingViewSet, UserViewSet from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'readings', ReadingViewSet) router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-...
Use routers instead of manual routes
Use routers instead of manual routes
Python
bsd-3-clause
codefornigeria/dustduino-server,codefornigeria/dustduino-server,codefornigeria/dustduino-server,developmentseed/dustduino-server,developmentseed/dustduino-server,developmentseed/dustduino-server
from django.conf.urls import patterns, url, include from api import views # The API URLs are now determined automatically by the router. # Additionally, we include the login URLs for the browseable API. urlpatterns = patterns('', # list of all readings url(r'^api/all', views.ApiRoot.as_view()), # list of ...
from django.conf.urls import url, include from api.views import ReadingViewSet, UserViewSet from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'readings', ReadingViewSet) router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-...
<commit_before>from django.conf.urls import patterns, url, include from api import views # The API URLs are now determined automatically by the router. # Additionally, we include the login URLs for the browseable API. urlpatterns = patterns('', # list of all readings url(r'^api/all', views.ApiRoot.as_view()), ...
from django.conf.urls import url, include from api.views import ReadingViewSet, UserViewSet from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'readings', ReadingViewSet) router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-...
from django.conf.urls import patterns, url, include from api import views # The API URLs are now determined automatically by the router. # Additionally, we include the login URLs for the browseable API. urlpatterns = patterns('', # list of all readings url(r'^api/all', views.ApiRoot.as_view()), # list of ...
<commit_before>from django.conf.urls import patterns, url, include from api import views # The API URLs are now determined automatically by the router. # Additionally, we include the login URLs for the browseable API. urlpatterns = patterns('', # list of all readings url(r'^api/all', views.ApiRoot.as_view()), ...
7e87a91f48ef9d5a031033991ce68c2596193f01
tests/test_pipe.py
tests/test_pipe.py
from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_in.close() d...
import pytest from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_in...
Add iteration tests on pipes
Add iteration tests on pipes
Python
bsd-3-clause
xonsh/slug
from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_in.close() d...
import pytest from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_in...
<commit_before>from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_i...
import pytest from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_in...
from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_in.close() d...
<commit_before>from slug import Pipe def test_goesthrough(): p = Pipe() p.side_in.write(b"Hello") p.side_in.close() data = p.side_out.read() assert data == b'Hello' def test_eof(): p = Pipe() p.side_in.write(b"spam") data = p.side_out.read() assert data == b'spam' p.side_i...
4975361a86fb2288e84beff0056e90a22225bdae
htmlmin/tests/mocks.py
htmlmin/tests/mocks.py
# Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path class ResponseMock(dict): def __init__(self, *args, **kwargs...
# Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path self._hit_htmlmin = True class RequestBareMock(object): ...
Extend RequestMock, add RequestBareMock w/o flag
Extend RequestMock, add RequestBareMock w/o flag RequestMock always pretends that htmlmin has seen the request, so all other tests work normally.
Python
bsd-2-clause
argollo/django-htmlmin,cobrateam/django-htmlmin,erikdejonge/django-htmlmin,erikdejonge/django-htmlmin,argollo/django-htmlmin,erikdejonge/django-htmlmin,Alcolo47/django-htmlmin,Zowie/django-htmlmin,Alcolo47/django-htmlmin,Zowie/django-htmlmin,cobrateam/django-htmlmin
# Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path class ResponseMock(dict): def __init__(self, *args, **kwargs...
# Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path self._hit_htmlmin = True class RequestBareMock(object): ...
<commit_before># Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path class ResponseMock(dict): def __init__(self, ...
# Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path self._hit_htmlmin = True class RequestBareMock(object): ...
# Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path class ResponseMock(dict): def __init__(self, *args, **kwargs...
<commit_before># Copyright 2013 django-htmlmin authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class RequestMock(object): def __init__(self, path="/"): self.path = path class ResponseMock(dict): def __init__(self, ...
9b2a56c0a0fce70edb644f8a1f07eb2709867201
examples/quickstart/response_info.py
examples/quickstart/response_info.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response code, e.g. 200...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response code, e.g. 200...
Fix response example time output
Fix response example time output
Python
lgpl-2.1
pycurl/pycurl,pycurl/pycurl,pycurl/pycurl
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response code, e.g. 200...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response code, e.g. 200...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response code, e.g. 200...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response code, e.g. 200...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response...
47b00f384dbee0fb3b82696406978669ae80a3c6
tests/test_config.py
tests/test_config.py
# Copyright 2015-2016 Masayuki Yamamoto # # 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 agree...
# Copyright 2015-2016 Masayuki Yamamoto # # 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 agree...
Add test case for dependence constants
Add test case for dependence constants Expect to depend filename by 'CONFIG_FILENAME' constants.
Python
apache-2.0
ma8ma/yanico
# Copyright 2015-2016 Masayuki Yamamoto # # 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 agree...
# Copyright 2015-2016 Masayuki Yamamoto # # 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 agree...
<commit_before># Copyright 2015-2016 Masayuki Yamamoto # # 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 applicab...
# Copyright 2015-2016 Masayuki Yamamoto # # 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 agree...
# Copyright 2015-2016 Masayuki Yamamoto # # 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 agree...
<commit_before># Copyright 2015-2016 Masayuki Yamamoto # # 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 applicab...
765e6d3c81925c5ed6f6a944eb15e25c6751819f
openstack_dashboard/views.py
openstack_dashboard/views.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
Fix issues with importing the Login form
Fix issues with importing the Login form The Login form lives in openstack_auth.forms and should be directly imported from that file. Change-Id: I42808530024bebb01604adbf4828769812856bf3 Closes-Bug: #1332149 (cherry picked from commit 345ccc9d503e6e55fe46d7813958c0081cc1cffe)
Python
apache-2.0
yanheven/console,yanheven/console,yanheven/console
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
798f5af95f94e29e7aa61d157fbe31a72c877b50
django_classified/admin.py
django_classified/admin.py
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)...
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)...
Build eror complaining of blank lines?
Build eror complaining of blank lines? Build error complaining of blank lines?
Python
mit
inoks/dcf,inoks/dcf
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)...
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)...
<commit_before>from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'sl...
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)...
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)...
<commit_before>from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from .models import Section, Group, Item, Image, Area, Profile class ImageInline(AdminImageMixin, admin.StackedInline): model = Image extra = 5 class ItemAdmin(admin.ModelAdmin): prepopulated_fields = {'sl...
f70a1ae6d86b5e789b5f6120db2772ec492bc088
mardek_sol_reader.py
mardek_sol_reader.py
from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', 'AppData\Local...
from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', 'AppData\Local...
Fix to use binary read format
Fix to use binary read format
Python
apache-2.0
jbzdarkid/Random,jbzdarkid/Random,jbzdarkid/Random,jbzdarkid/Random,jbzdarkid/Random,jbzdarkid/Random,jbzdarkid/Random,jbzdarkid/Random,jbzdarkid/Random
from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', 'AppData\Local...
from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', 'AppData\Local...
<commit_before>from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', ...
from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', 'AppData\Local...
from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', 'AppData\Local...
<commit_before>from struct import unpack from os import walk, sep from os.path import expanduser from re import search shared_objects_dirs = [ 'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects', 'Library/Preferences/Macromedia/Flash Player/#SharedObjects', ...
e21260b57873ed70bd6b1690b62a754af58020fc
otp_twilio/migrations/0002_last_t.py
otp_twilio/migrations/0002_last_t.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio_encrypted', '0001_initial'), ] operations = [ migrations.AddField( model_name='twiliosmsdevice', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio', '0001_initial'), ] operations = [ migrations.AddField( model_name='twiliosmsdevice', na...
Undo dependency name change in last migration
Undo dependency name change in last migration
Python
bsd-2-clause
prototypsthlm/otp_twilio_encrypted,gustavrannestig/otp_twilio_encrypted
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio_encrypted', '0001_initial'), ] operations = [ migrations.AddField( model_name='twiliosmsdevice', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio', '0001_initial'), ] operations = [ migrations.AddField( model_name='twiliosmsdevice', na...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio_encrypted', '0001_initial'), ] operations = [ migrations.AddField( model_name='twilios...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio', '0001_initial'), ] operations = [ migrations.AddField( model_name='twiliosmsdevice', na...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio_encrypted', '0001_initial'), ] operations = [ migrations.AddField( model_name='twiliosmsdevice', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('otp_twilio_encrypted', '0001_initial'), ] operations = [ migrations.AddField( model_name='twilios...
7a0243728ae5079b2409c9ccbf500d05f69886f3
examples/simple/schemas.py
examples/simple/schemas.py
from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def query_collection(self, context, **kwargs): ...
from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def fetch_resource(self, resource_id, context, **kwa...
Add support for query relatives in simple example
Add support for query relatives in simple example
Python
mit
vovanbo/aiohttp_json_api
from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def query_collection(self, context, **kwargs): ...
from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def fetch_resource(self, resource_id, context, **kwa...
<commit_before>from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def query_collection(self, context, *...
from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def fetch_resource(self, resource_id, context, **kwa...
from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def query_collection(self, context, **kwargs): ...
<commit_before>from aiohttp_json_api.schema import BaseSchema, fields, relationships from .models import Article, Comment, People class SchemaWithStorage(BaseSchema): @property def storage(self): return self.app['storage'][self.resource_class.__name__] async def query_collection(self, context, *...
19d366141ffedbabc93de487d140333de30e4b7a
rcamp/lib/pam_backend.py
rcamp/lib/pam_backend.py
from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam...
from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam...
Add logging to debug hanging auth
Add logging to debug hanging auth
Python
mit
ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP
from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam...
from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam...
<commit_before>from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_u...
from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam...
from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_username(usernam...
<commit_before>from django.conf import settings from accounts.models import ( RcLdapUser, User ) import pam import logging logger = logging.getLogger('accounts') class PamBackend(): def authenticate(self, request, username=None, password=None): rc_user = RcLdapUser.objects.get_user_from_suffixed_u...
ea24974502e0e293905b493d0993ab2fc1812192
op_robot_tests/tests_files/brokers/openprocurement_client_helper.py
op_robot_tests/tests_files/brokers/openprocurement_client_helper.py
from openprocurement_client.client import Client import sys def prepare_api_wrapper(key='', host_url="https://api-sandbox.openprocurement.org", api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'tenderID', 'descending': 1} if offs...
from openprocurement_client.client import Client def prepare_api_wrapper(key='', host_url='https://api-sandbox.openprocurement.org', api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'te...
Remove unused import; split a long line of code
Remove unused import; split a long line of code
Python
apache-2.0
Rzaporozhets/robot_tests,mykhaly/robot_tests,bubanoid/robot_tests,VadimShurhal/robot_tests.broker.aps,SlaOne/robot_tests,selurvedu/robot_tests,Leits/robot_tests,cleardevice/robot_tests,openprocurement/robot_tests,kosaniak/robot_tests
from openprocurement_client.client import Client import sys def prepare_api_wrapper(key='', host_url="https://api-sandbox.openprocurement.org", api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'tenderID', 'descending': 1} if offs...
from openprocurement_client.client import Client def prepare_api_wrapper(key='', host_url='https://api-sandbox.openprocurement.org', api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'te...
<commit_before>from openprocurement_client.client import Client import sys def prepare_api_wrapper(key='', host_url="https://api-sandbox.openprocurement.org", api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'tenderID', 'descending':...
from openprocurement_client.client import Client def prepare_api_wrapper(key='', host_url='https://api-sandbox.openprocurement.org', api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'te...
from openprocurement_client.client import Client import sys def prepare_api_wrapper(key='', host_url="https://api-sandbox.openprocurement.org", api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'tenderID', 'descending': 1} if offs...
<commit_before>from openprocurement_client.client import Client import sys def prepare_api_wrapper(key='', host_url="https://api-sandbox.openprocurement.org", api_version='0.8'): return Client(key, host_url, api_version) def get_tenders(client, offset=None): params = {'opt_fields': 'tenderID', 'descending':...
d9a8d30ba12f4fb61fdffe353d225c2ffcd074fa
fabfile.py
fabfile.py
from fabric.api import cd, run, sudo, env, execute from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } def deploy(app): if app not in apps.keys(): raise Exception("Unknown deploy targ...
from fabric.api import cd, run, sudo, env, execute, task from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } @task def deploy(app): if app not in apps.keys(): raise Exception("Unknown...
Hide support functions from the public interface
Hide support functions from the public interface
Python
mit
ErinCall/andrewlorente
from fabric.api import cd, run, sudo, env, execute from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } def deploy(app): if app not in apps.keys(): raise Exception("Unknown deploy targ...
from fabric.api import cd, run, sudo, env, execute, task from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } @task def deploy(app): if app not in apps.keys(): raise Exception("Unknown...
<commit_before>from fabric.api import cd, run, sudo, env, execute from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } def deploy(app): if app not in apps.keys(): raise Exception("Unkn...
from fabric.api import cd, run, sudo, env, execute, task from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } @task def deploy(app): if app not in apps.keys(): raise Exception("Unknown...
from fabric.api import cd, run, sudo, env, execute from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } def deploy(app): if app not in apps.keys(): raise Exception("Unknown deploy targ...
<commit_before>from fabric.api import cd, run, sudo, env, execute from datetime import datetime env.hosts = ['andrewlorente.com'] apps = { 'bloge': ['bloge@andrewlorente.com'], 'andrewlorente': ['andrewlorente@andrewlorente.com'], } def deploy(app): if app not in apps.keys(): raise Exception("Unkn...
38c831d1ca49c209b315761f5b58793ff3639759
tests/test_months.py
tests/test_months.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import unittest from months import months class TestMonths(unittest.TestCase): def setUp(self): pass def test_something(self): pass def tearDown(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import os import sys import datetime import unittest sys.path.append(os.path.join('.', 'months')) sys.path.append(os.path.join('..', 'months')) from months import Month class TestMonths...
Add tests for Month functionality
Add tests for Month functionality
Python
mit
kstark/months
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import unittest from months import months class TestMonths(unittest.TestCase): def setUp(self): pass def test_something(self): pass def tearDown(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import os import sys import datetime import unittest sys.path.append(os.path.join('.', 'months')) sys.path.append(os.path.join('..', 'months')) from months import Month class TestMonths...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import unittest from months import months class TestMonths(unittest.TestCase): def setUp(self): pass def test_something(self): pass def tear...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import os import sys import datetime import unittest sys.path.append(os.path.join('.', 'months')) sys.path.append(os.path.join('..', 'months')) from months import Month class TestMonths...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import unittest from months import months class TestMonths(unittest.TestCase): def setUp(self): pass def test_something(self): pass def tearDown(self): ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_months ---------------------------------- Tests for `months` module. """ import unittest from months import months class TestMonths(unittest.TestCase): def setUp(self): pass def test_something(self): pass def tear...
784b165d67550cd159b05aabfd2872ebc746a9e2
pants/views.py
pants/views.py
from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def is_authenticated(request): """Validates that an user is authenticated and extracts its userid""" request.validated['userid'] = ...
from pyramid.security import Allow, Authenticated, authenticated_userid from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def acl(request): return [(Allow, Authenticated, 'create-callu...
Implement ACL for call url creation
Implement ACL for call url creation
Python
mpl-2.0
ametaireau/pants-server,almet/pants-server
from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def is_authenticated(request): """Validates that an user is authenticated and extracts its userid""" request.validated['userid'] = ...
from pyramid.security import Allow, Authenticated, authenticated_userid from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def acl(request): return [(Allow, Authenticated, 'create-callu...
<commit_before>from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def is_authenticated(request): """Validates that an user is authenticated and extracts its userid""" request.validat...
from pyramid.security import Allow, Authenticated, authenticated_userid from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def acl(request): return [(Allow, Authenticated, 'create-callu...
from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def is_authenticated(request): """Validates that an user is authenticated and extracts its userid""" request.validated['userid'] = ...
<commit_before>from cornice import Service from tokenlib.errors import Error as TokenError callurl = Service(name='callurl', path='/call-url') call = Service(name='call', path='/call/{token}') def is_authenticated(request): """Validates that an user is authenticated and extracts its userid""" request.validat...
0a907442eee18d0b30ca4ad2c6a5ef1fabb90684
pelicanconf.py
pelicanconf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/posts/{slug}/index....
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/posts/{slug}/index....
Support static files via new Pelican API
Support static files via new Pelican API
Python
mit
lextoumbourou/lextoumbourou.github.io,lextoumbourou/lextoumbourou.github.io,lextoumbourou/lextoumbourou.github.io,lextoumbourou/lextoumbourou.github.io
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/posts/{slug}/index....
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/posts/{slug}/index....
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/post...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/posts/{slug}/index....
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/posts/{slug}/index....
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Lex Toumbourou' SITENAME = u'LexToumbourou.com' SITEURL = 'http://lextoumbourou.com' TIMEZONE = 'Australia/Melbourne' DEFAULT_LANG = u'en' ARTICLE_URL = 'blog/posts/{slug}/' ARTICLE_SAVE_AS = 'blog/post...
e1155bcc12b8178475b5ff2e1485d6c9ab6f2ea5
debug_toolbar_user_panel/views.py
debug_toolbar_user_panel/views.py
from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import require_POST d...
from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import require_POST d...
Reduce the number of recent users we display.
Reduce the number of recent users we display. Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@playfire.com>
Python
bsd-3-clause
lamby/django-debug-toolbar-user-panel,playfire/django-debug-toolbar-user-panel,lamby/django-debug-toolbar-user-panel
from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import require_POST d...
from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import require_POST d...
<commit_before>from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import ...
from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import require_POST d...
from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import require_POST d...
<commit_before>from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import auth from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.models import User from django.views.decorators.http import ...
d986f68c2490d276bec7f9511c567e591c70d2d3
corehq/ex-submodules/pillow_retry/management/commands/send_pillow_retry_queue_through_pillows.py
corehq/ex-submodules/pillow_retry/management/commands/send_pillow_retry_queue_through_pillows.py
from __future__ import absolute_import from django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pillow') def handle(self, pi...
from __future__ import absolute_import from datetime import datetime from django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pi...
Add some print statements for debugging.
Add some print statements for debugging.
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 django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pillow') def handle(self, pi...
from __future__ import absolute_import from datetime import datetime from django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pi...
<commit_before>from __future__ import absolute_import from django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pillow') def ...
from __future__ import absolute_import from datetime import datetime from django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pi...
from __future__ import absolute_import from django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pillow') def handle(self, pi...
<commit_before>from __future__ import absolute_import from django.core.management.base import BaseCommand from pillow_retry.models import PillowError from corehq.apps.change_feed.producer import producer class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('pillow') def ...
3cd90339c2a66b92c024ad9365cbaceace29531d
devproject/devproject/urls.py
devproject/devproject/urls.py
from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^pinboard/', incl...
from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^pinboard/', include('ditt...
Fix admin URL import in devproject for Django 2.0
Fix admin URL import in devproject for Django 2.0 For #191
Python
mit
philgyford/django-ditto,philgyford/django-ditto,philgyford/django-ditto
from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^pinboard/', incl...
from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^pinboard/', include('ditt...
<commit_before>from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^p...
from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^pinboard/', include('ditt...
from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^pinboard/', incl...
<commit_before>from django.conf.urls import include, static, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^flickr/', include('ditto.flickr.urls', namespace='flickr')), url(r'^lastfm/', include('ditto.lastfm.urls', namespace='lastfm')), url(r'^p...
c1a5c5394ff9838e01b32ff448e309893c5bdf7f
cmsplugin_iframe/migrations/0001_initial.py
cmsplugin_iframe/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', fields=[ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', fields=[ ...
Add in on_delete clause to work with more modern versions of Django
Add in on_delete clause to work with more modern versions of Django
Python
mit
satyrius/cmsplugin-iframe,satyrius/cmsplugin-iframe
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', fields=[ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', fields=[ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', f...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', fields=[ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', fields=[ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0001_initial'), ] operations = [ migrations.CreateModel( name='IframePlugin', f...
6325b0eebbe5c14284df4fa5398ffc678c3e0eca
posts/tests.py
posts/tests.py
from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): post = PostFactory() post_list_url = self.reverse('post:list') self.get_check_200(post_list_url) self.assertResponseContains(post.title, html=False) ...
from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): # given post = PostFactory() post_list_url = self.reverse('post:list') # when self.get_check_200(post_list_url) # then self.asser...
Add given, when, then comment
Add given, when, then comment
Python
mit
9XD/9XD,9XD/9XD,9XD/9XD,9XD/9XD
from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): post = PostFactory() post_list_url = self.reverse('post:list') self.get_check_200(post_list_url) self.assertResponseContains(post.title, html=False) ...
from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): # given post = PostFactory() post_list_url = self.reverse('post:list') # when self.get_check_200(post_list_url) # then self.asser...
<commit_before>from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): post = PostFactory() post_list_url = self.reverse('post:list') self.get_check_200(post_list_url) self.assertResponseContains(post.title, h...
from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): # given post = PostFactory() post_list_url = self.reverse('post:list') # when self.get_check_200(post_list_url) # then self.asser...
from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): post = PostFactory() post_list_url = self.reverse('post:list') self.get_check_200(post_list_url) self.assertResponseContains(post.title, html=False) ...
<commit_before>from test_plus.test import TestCase from posts.factories import PostFactory class PostsTest(TestCase): def test_get_list(self): post = PostFactory() post_list_url = self.reverse('post:list') self.get_check_200(post_list_url) self.assertResponseContains(post.title, h...
8958f8abb8798ff61af43199f0683c3e1c0ffcdd
checklisthq/main/models.py
checklisthq/main/models.py
from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_now_add=True) ...
from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_now_add=True) ...
Make tags an optional field of Checklist
Make tags an optional field of Checklist
Python
agpl-3.0
checklisthq/checklisthq.com,checklisthq/checklisthq.com
from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_now_add=True) ...
from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_now_add=True) ...
<commit_before>from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_no...
from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_now_add=True) ...
from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_now_add=True) ...
<commit_before>from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class Checklist(models.Model): title = models.CharField(max_length=512) owner = models.ForeignKey(User) content = models.TextField() created = models.DateTimeField(auto_no...
964da6a3df622b5217596ac190ca46bc18942616
api/urls.py
api/urls.py
from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^inventory/(?P<serial>.+)/$', views.machine_inventory), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'^conditions/(?P...
from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/inventory/$', views.machine_inventory), url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'^condi...
Revert "Think this url is causing issues"
Revert "Think this url is causing issues" This reverts commit ca4df2f1f23b5ff85b7c1685c6bbcd015f9789cf.
Python
apache-2.0
erikng/sal,chasetb/sal,chasetb/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,erikng/sal,erikng/sal,salopensource/sal,chasetb/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,chasetb/sal,erikng/sal
from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^inventory/(?P<serial>.+)/$', views.machine_inventory), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'^conditions/(?P...
from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/inventory/$', views.machine_inventory), url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'^condi...
<commit_before>from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^inventory/(?P<serial>.+)/$', views.machine_inventory), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'...
from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/inventory/$', views.machine_inventory), url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'^condi...
from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^inventory/(?P<serial>.+)/$', views.machine_inventory), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'^conditions/(?P...
<commit_before>from django.conf.urls import url from api import views urlpatterns = [ url(r'^machines/(?P<serial>.+)/$', views.machine_detail), url(r'^inventory/(?P<serial>.+)/$', views.machine_inventory), url(r'^machines/$', views.machine_list), url(r'^facts/(?P<serial>.+)/$', views.facts), url(r'...
ff7239b915093c6915d05c15362c5e86341bd6cb
lib/dns_lookup.py
lib/dns_lookup.py
# -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS.') l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) dns = network.parse_...
# -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS on port {0}.'.format(port)) l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) ...
Add port to logging. Fix print statement.
Add port to logging. Fix print statement.
Python
bsd-3-clause
averagesecurityguy/exfil
# -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS.') l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) dns = network.parse_...
# -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS on port {0}.'.format(port)) l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) ...
<commit_before># -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS.') l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) dns =...
# -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS on port {0}.'.format(port)) l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) ...
# -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS.') l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) dns = network.parse_...
<commit_before># -*- coding: utf-8 -*- import network BLOCK_SIZE = 256 PORT = 53 def listen(port): if port is None: port = PORT print('Listening for data via DNS.') l = network.get_listener('UDP', port) print('Data Received:') while 1: data, addr = l.recvfrom(1500) dns =...
c286722965ce7f5ea9acc201aa9cf289cfe16105
openstackclient/tests/functional/common/test_availability_zone.py
openstackclient/tests/functional/common/test_availability_zone.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Refactor availability zone functional test
Refactor availability zone functional test Using json format output in availability zone list functional test Change-Id: I7098b1c3bee680e47e414dcb4fa272628cdec1eb
Python
apache-2.0
dtroyer/python-openstackclient,openstack/python-openstackclient,dtroyer/python-openstackclient,openstack/python-openstackclient
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
f4b3c2ca7d9fdf6bc96202d6c2ad3b16cb6fc3be
sedfitter/timer.py
sedfitter/timer.py
from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ------------------------------------...
from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ------------------------------------...
Fix division by zero error
Fix division by zero error
Python
bsd-2-clause
astrofrog/sedfitter
from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ------------------------------------...
from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ------------------------------------...
<commit_before>from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ---------------------...
from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ------------------------------------...
from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ------------------------------------...
<commit_before>from __future__ import print_function, division import time import numpy as np class Timer(object): def __init__(self): self.time1 = time.time() self.n = 0 self.step = 1 print(" # Sources CPU time (sec) Sources/sec ") print(" ---------------------...
8399253b159b96419bcc36de791804bf86152f4d
scripts/commandsocket.py
scripts/commandsocket.py
import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")
import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args[0]) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")
Print first element of array
Print first element of array Print first element of array
Python
mit
willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel,willdavidc/piel
import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")Print first element of array Print fi...
import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args[0]) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")
<commit_before>import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")<commit_msg>Print first...
import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args[0]) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")
import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")Print first element of array Print fi...
<commit_before>import RPi.GPIO as GPIO import time from socketIO_client import SocketIO, LoggingNamespace socketIO = SocketIO('localhost:3000') def onCommand(*args): print(args) while (True): socketIO.on("commands", onCommand) socketIO.wait(seconds=1) socketIO.off("sequencePi")<commit_msg>Print first...
2c2a5b4af2fa3fe4daff088810ced044ce73af0c
services/disqus.py
services/disqus.py
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
Reword the permissions for Disqus
Reword the permissions for Disqus
Python
bsd-3-clause
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org,foauth/oauth-proxy
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
<commit_before>from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info ab...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info about the provide...
<commit_before>from oauthlib.oauth2.draft25 import utils import foauth.providers def token_uri(service, token, r): params = [((u'access_token', token)), ((u'api_key', service.client_id))] r.url = utils.add_params_to_uri(r.url, params) return r class Disqus(foauth.providers.OAuth2): # General info ab...
0e1384ab777a2d7e30036ccc7d8ed0e17093f4e1
src/ggrc_basic_permissions/roles/ProgramAuditReader.py
src/ggrc_basic_permissions/roles/ProgramAuditReader.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the ProgramReader role fo...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the ProgramReader role fo...
Remove CD permissions for program audit reader
Remove CD permissions for program audit reader
Python
apache-2.0
NejcZupec/ggrc-core,j0gurt/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,kr41/ggrc-core,andrei-karalionak/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,AleksNeStu/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-c...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the ProgramReader role fo...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the ProgramReader role fo...
<commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the Progra...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the ProgramReader role fo...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the ProgramReader role fo...
<commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "AuditImplied" description = """ A user with the Progra...
3a4e371d5d148d0171756776deffc7e5adf40197
ava/text_to_speech/__init__.py
ava/text_to_speech/__init__.py
from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self.queue_tts.get()...
from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from .playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self.queue_tts.get(...
Add use of local playsoud.py
Add use of local playsoud.py
Python
mit
ava-project/AVA
from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self.queue_tts.get()...
from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from .playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self.queue_tts.get(...
<commit_before>from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self....
from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from .playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self.queue_tts.get(...
from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self.queue_tts.get()...
<commit_before>from ..queues import QueueTtS from ..components import _BaseComponent from gtts import gTTS from playsound import playsound import os class TextToSpeech(_BaseComponent): def __init__(self): super().__init__() self.queue_tts = QueueTtS() def run(self): sentence = self....
be8b36b141d32372e9c08e73cbbe4620d86effac
chainer/ya/utils/range_logger.py
chainer/ya/utils/range_logger.py
import logging logger = logging.getLogger() logger.setLevel(getattr(logging, 'INFO')) logger.addHandler(logging.StreamHandler()) class rangelog: def __init__(self, name): self.name = name def __enter__(self): logger.info("--> Start: {}".format(self.name)) return logger def __ex...
import logging class rangelog: logger = None @classmethod def set_logger(cls, logger=None): if logger is None: cls.logger = logging.getLogger() cls.logger.setLevel(getattr(logging, 'INFO')) cls.logger.addHandler(logging.StreamHandler()) elif isinstance(...
Change to use class variable as logger
Change to use class variable as logger
Python
mit
yasuyuky/chainer-ya-utils
import logging logger = logging.getLogger() logger.setLevel(getattr(logging, 'INFO')) logger.addHandler(logging.StreamHandler()) class rangelog: def __init__(self, name): self.name = name def __enter__(self): logger.info("--> Start: {}".format(self.name)) return logger def __ex...
import logging class rangelog: logger = None @classmethod def set_logger(cls, logger=None): if logger is None: cls.logger = logging.getLogger() cls.logger.setLevel(getattr(logging, 'INFO')) cls.logger.addHandler(logging.StreamHandler()) elif isinstance(...
<commit_before>import logging logger = logging.getLogger() logger.setLevel(getattr(logging, 'INFO')) logger.addHandler(logging.StreamHandler()) class rangelog: def __init__(self, name): self.name = name def __enter__(self): logger.info("--> Start: {}".format(self.name)) return logge...
import logging class rangelog: logger = None @classmethod def set_logger(cls, logger=None): if logger is None: cls.logger = logging.getLogger() cls.logger.setLevel(getattr(logging, 'INFO')) cls.logger.addHandler(logging.StreamHandler()) elif isinstance(...
import logging logger = logging.getLogger() logger.setLevel(getattr(logging, 'INFO')) logger.addHandler(logging.StreamHandler()) class rangelog: def __init__(self, name): self.name = name def __enter__(self): logger.info("--> Start: {}".format(self.name)) return logger def __ex...
<commit_before>import logging logger = logging.getLogger() logger.setLevel(getattr(logging, 'INFO')) logger.addHandler(logging.StreamHandler()) class rangelog: def __init__(self, name): self.name = name def __enter__(self): logger.info("--> Start: {}".format(self.name)) return logge...
f26202f688f7612971e35b0ae33a2f961a117876
select_multiple_field/widgets.py
select_multiple_field/widgets.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe class SelectMultipleField(widgets.SelectMultiple): """Multiple select widget ready for jQuery multiselect.js""" allow_multiple_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe try: from django.utils.html import format_html except ImportError: def format_html(format_string, *args, **kwargs): retur...
Use format_html if it is available, fallback for dj 1.4
Use format_html if it is available, fallback for dj 1.4
Python
bsd-3-clause
kelvinwong-ca/django-select-multiple-field,kelvinwong-ca/django-select-multiple-field,kelvinwong-ca/django-select-multiple-field
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe class SelectMultipleField(widgets.SelectMultiple): """Multiple select widget ready for jQuery multiselect.js""" allow_multiple_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe try: from django.utils.html import format_html except ImportError: def format_html(format_string, *args, **kwargs): retur...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe class SelectMultipleField(widgets.SelectMultiple): """Multiple select widget ready for jQuery multiselect.js""" ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe try: from django.utils.html import format_html except ImportError: def format_html(format_string, *args, **kwargs): retur...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe class SelectMultipleField(widgets.SelectMultiple): """Multiple select widget ready for jQuery multiselect.js""" allow_multiple_...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.forms import widgets from django.forms.util import flatatt from django.utils.safestring import mark_safe class SelectMultipleField(widgets.SelectMultiple): """Multiple select widget ready for jQuery multiselect.js""" ...
1a00149b13a771ee18033a1abf1a3c30526b3d81
signac/__init__.py
signac/__init__.py
""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (development) version o...
""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (development) version o...
Remove everything but the VERSION constants from global namespace.
Remove everything but the VERSION constants from global namespace.
Python
bsd-3-clause
csadorf/signac,csadorf/signac
""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (development) version o...
""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (development) version o...
<commit_before>""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (develop...
""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (development) version o...
""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (development) version o...
<commit_before>""" signac aids in the management, access and analysis of large-scale computational investigations. The framework provides a simple data model, which helps to organize data production and post-processing as well as distribution among collaboratos. """ # The VERSION string represents the actual (develop...
f7a590e97715bf055928e8510c3822cc9b8272e8
changes/api/project_commit_builds.py
changes/api/project_commit_builds.py
from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id): proje...
from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id): proje...
Switch revision query to outer join
Switch revision query to outer join
Python
apache-2.0
dropbox/changes,bowlofstew/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes
from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id): proje...
from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id): proje...
<commit_before>from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id)...
from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id): proje...
from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id): proje...
<commit_before>from __future__ import absolute_import, division, unicode_literals from sqlalchemy.orm import joinedload, contains_eager from changes.api.base import APIView from changes.models import Build, Project, Revision, Source class ProjectCommitBuildsAPIView(APIView): def get(self, project_id, commit_id)...
8baff5cb627ed55f748123d536273c4a4e648d77
obelisk-cardiograph.py
obelisk-cardiograph.py
#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): """ main method ...
#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): """ main method ...
Put servers in a list, use FQDNs if available, rename context var.
Put servers in a list, use FQDNs if available, rename context var.
Python
agpl-3.0
veox/obelisk-cardiograph
#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): """ main method ...
#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): """ main method ...
<commit_before>#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): "...
#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): """ main method ...
#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): """ main method ...
<commit_before>#!/usr/bin/env python """ obelisk-cardiograph Monitor obelisk servers' heartbeat. Author: Noel Maersk <veox ta wemakethings tod net> Based on "Pubsub envelope subscriber" example from zguide Author: Guillaume Aubert (gaubert) <guillaume(dot)aubert(at)gmail(dot)com> """ import zmq def main(): "...
def22d2cfc4dc589344412750f1a6760c4643a93
common/djangoapps/dark_lang/models.py
common/djangoapps/dark_lang/models.py
""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, help_text="A...
""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, help_text="A...
Store released dark_lang codes as all lower-case
Store released dark_lang codes as all lower-case
Python
agpl-3.0
SivilTaram/edx-platform,Shrhawk/edx-platform,mushtaqak/edx-platform,utecuy/edx-platform,xingyepei/edx-platform,nttks/edx-platform,fly19890211/edx-platform,ESOedX/edx-platform,fintech-circle/edx-platform,mitocw/edx-platform,halvertoluke/edx-platform,xinjiguaike/edx-platform,kursitet/edx-platform,a-parhom/edx-platform,pr...
""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, help_text="A...
""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, help_text="A...
<commit_before>""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, ...
""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, help_text="A...
""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, help_text="A...
<commit_before>""" Models for the dark-launching languages """ from django.db import models from config_models.models import ConfigurationModel class DarkLangConfig(ConfigurationModel): """ Configuration for the dark_lang django app """ released_languages = models.TextField( blank=True, ...
584b707fe83a49264c95b7cfa6fd84cfcce96a52
csunplugged/utils/group_lessons_by_age.py
csunplugged/utils/group_lessons_by_age.py
"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Returns: A ordered dictionary of grouped lessons. ...
"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Args: lessons: QuerySet of Lesson objects (QuerySet)....
Add missing args docstring details
Add missing args docstring details
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Returns: A ordered dictionary of grouped lessons. ...
"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Args: lessons: QuerySet of Lesson objects (QuerySet)....
<commit_before>"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Returns: A ordered dictionary of group...
"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Args: lessons: QuerySet of Lesson objects (QuerySet)....
"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Returns: A ordered dictionary of grouped lessons. ...
<commit_before>"""Return ordered groups of lessons.""" from collections import OrderedDict def group_lessons_by_age(lessons): """Return ordered groups of lessons. Lessons are grouped by the lesson minimum age and maximum ages, and then order by number. Returns: A ordered dictionary of group...
a73cc6d6ad8460d492b29db60df2c0e8eaff932e
openerp_conventions.py
openerp_conventions.py
# -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __version__ = '0.0.1' ...
# -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __version__ = '0.0.1' ...
Improve BaseChecker class by using __metaclass__ keyword + add a filename setter
Improve BaseChecker class by using __metaclass__ keyword + add a filename setter
Python
mit
nbessi/openerp-conventions
# -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __version__ = '0.0.1' ...
# -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __version__ = '0.0.1' ...
<commit_before># -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __versio...
# -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __version__ = '0.0.1' ...
# -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __version__ = '0.0.1' ...
<commit_before># -*- coding: utf-8 -*- """OpenERP community addons standard plugin for flake8""" from __future__ import absolute_import import common_checker from common_checker.base_checker import BaseChecker # When OpenERP version 8 API will be frozen # We wille be able to do version toggle here import v7 __versio...
3b7b15db24ac738c143e3d2d38c740500ac73fd0
jinja2_time/jinja2_time.py
jinja2_time/jinja2_time.py
# -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment environment.ext...
# -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment environment.ext...
Change environment attribute name to datetime_format
Change environment attribute name to datetime_format
Python
mit
hackebrot/jinja2-time
# -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment environment.ext...
# -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment environment.ext...
<commit_before># -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment ...
# -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment environment.ext...
# -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment environment.ext...
<commit_before># -*- coding: utf-8 -*- import arrow from jinja2 import nodes from jinja2.ext import Extension class TimeExtension(Extension): tags = set(['now']) def __init__(self, environment): super(TimeExtension, self).__init__(environment) # add the defaults to the environment ...
c5fc667a6d50677936d8ae457734562d207a034b
bluesky/tests/test_vertical_integration.py
bluesky/tests/test_vertical_integration.py
from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import * from bluesky.standard_config import RE def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = RE(stepscan(det, motor), group='foo',...
from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import stepscan, det, motor from bluesky.standard_config import gs def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = gs.RE(stepscan(det...
Update test after RE -> gs.RE change.
TST: Update test after RE -> gs.RE change.
Python
bsd-3-clause
sameera2004/bluesky,ericdill/bluesky,klauer/bluesky,klauer/bluesky,ericdill/bluesky,dchabot/bluesky,sameera2004/bluesky,dchabot/bluesky
from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import * from bluesky.standard_config import RE def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = RE(stepscan(det, motor), group='foo',...
from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import stepscan, det, motor from bluesky.standard_config import gs def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = gs.RE(stepscan(det...
<commit_before> from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import * from bluesky.standard_config import RE def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = RE(stepscan(det, motor...
from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import stepscan, det, motor from bluesky.standard_config import gs def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = gs.RE(stepscan(det...
from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import * from bluesky.standard_config import RE def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = RE(stepscan(det, motor), group='foo',...
<commit_before> from metadatastore.utils.testing import mds_setup, mds_teardown from dataportal import DataBroker as db from bluesky.examples import * from bluesky.standard_config import RE def setup(): mds_setup() def teardown(): mds_teardown() def test_scan_and_get_data(): uid = RE(stepscan(det, motor...
310016762927dd9796109712be1c59ce0c1a658c
runcurldrop.py
runcurldrop.py
#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text not null, origi...
#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text not null, origi...
Add handler to main app
Add handler to main app
Python
mit
Xarthisius/curldrop
#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text not null, origi...
#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text not null, origi...
<commit_before>#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text no...
#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text not null, origi...
#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text not null, origi...
<commit_before>#!/usr/bin/env python import os import tornado from curldrop import StreamHandler, config from contextlib import closing import sqlite3 schema = '''drop table if exists files; create table files ( id integer primary key autoincrement, file_id text not null, timestamp integer not null, ip text no...
a25d12d7d3eab68dff1d65382543ad93fb8a22bd
mint/rest/api/models/__init__.py
mint/rest/api/models/__init__.py
from mint.rest.modellib import Model from mint.rest.modellib import fields class RbuilderStatus(Model): version = fields.CharField() conaryVersion = fields.CharField() products = fields.UrlField('products', None) users = fields.UrlField('users', None) from mint.rest.api.models.membe...
from mint.rest.modellib import Model from mint.rest.modellib import fields class RMCUrlField(fields.CalculatedField): def getValue(self, controller, request, class_, parent, value): return request.getHostWithProtocol() + '/catalog' class RbuilderStatus(Model): id = fields.AbsoluteUrlField...
Add extra fields to status info page
Add extra fields to status info page
Python
apache-2.0
sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint
from mint.rest.modellib import Model from mint.rest.modellib import fields class RbuilderStatus(Model): version = fields.CharField() conaryVersion = fields.CharField() products = fields.UrlField('products', None) users = fields.UrlField('users', None) from mint.rest.api.models.membe...
from mint.rest.modellib import Model from mint.rest.modellib import fields class RMCUrlField(fields.CalculatedField): def getValue(self, controller, request, class_, parent, value): return request.getHostWithProtocol() + '/catalog' class RbuilderStatus(Model): id = fields.AbsoluteUrlField...
<commit_before>from mint.rest.modellib import Model from mint.rest.modellib import fields class RbuilderStatus(Model): version = fields.CharField() conaryVersion = fields.CharField() products = fields.UrlField('products', None) users = fields.UrlField('users', None) from mint.rest.a...
from mint.rest.modellib import Model from mint.rest.modellib import fields class RMCUrlField(fields.CalculatedField): def getValue(self, controller, request, class_, parent, value): return request.getHostWithProtocol() + '/catalog' class RbuilderStatus(Model): id = fields.AbsoluteUrlField...
from mint.rest.modellib import Model from mint.rest.modellib import fields class RbuilderStatus(Model): version = fields.CharField() conaryVersion = fields.CharField() products = fields.UrlField('products', None) users = fields.UrlField('users', None) from mint.rest.api.models.membe...
<commit_before>from mint.rest.modellib import Model from mint.rest.modellib import fields class RbuilderStatus(Model): version = fields.CharField() conaryVersion = fields.CharField() products = fields.UrlField('products', None) users = fields.UrlField('users', None) from mint.rest.a...
6f103bd78f188c2a090c6dd522884c361e85d832
cyder/cydhcp/validation.py
cyder/cydhcp/validation.py
# encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00:00:00:00:00:00...
# encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00:00:00:00:00:00...
Validate dynamic interface's range's container, not dynamic interface's range's domain's container.
Validate dynamic interface's range's container, not dynamic interface's range's domain's container.
Python
bsd-3-clause
drkitty/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,akeym/cyder,drkitty/cyder,drkitty/cyder,OSU-Net/cyder,drkitty/cyder,OSU-Net/cyder
# encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00:00:00:00:00:00...
# encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00:00:00:00:00:00...
<commit_before># encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00...
# encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00:00:00:00:00:00...
# encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00:00:00:00:00:00...
<commit_before># encoding: utf-8 from django.core.exceptions import ValidationError import re ERROR_TOO_LONG = 'MAC address is too long' mac_pattern = re.compile(r'^([0-9a-f]{2}:){5}[0-9a-f]{2}$') def validate_mac(mac): if mac == ERROR_TOO_LONG: raise ValidationError(ERROR_TOO_LONG) elif mac == '00...
9d796a4fe8f6c4b38eb1428d4d43f1edc041c1cd
dlchainer/__init__.py
dlchainer/__init__.py
#-*- coding: utf-8 -*- from .dA import dA
#-*- coding: utf-8 -*- from .dA import dA from .SdA import SdAClassifier, SdARegressor
Add importing SdA in init script.
Add importing SdA in init script.
Python
mit
duonys/deep-learning-chainer
#-*- coding: utf-8 -*- from .dA import dA Add importing SdA in init script.
#-*- coding: utf-8 -*- from .dA import dA from .SdA import SdAClassifier, SdARegressor
<commit_before>#-*- coding: utf-8 -*- from .dA import dA <commit_msg>Add importing SdA in init script.<commit_after>
#-*- coding: utf-8 -*- from .dA import dA from .SdA import SdAClassifier, SdARegressor
#-*- coding: utf-8 -*- from .dA import dA Add importing SdA in init script.#-*- coding: utf-8 -*- from .dA import dA from .SdA import SdAClassifier, SdARegressor
<commit_before>#-*- coding: utf-8 -*- from .dA import dA <commit_msg>Add importing SdA in init script.<commit_after>#-*- coding: utf-8 -*- from .dA import dA from .SdA import SdAClassifier, SdARegressor
d011f0279f868e56b0a36bb672f432ca2bfc2b35
mlbgame/league.py
mlbgame/league.py
#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get data data = ...
#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get data data = ...
Add function to parse team info
Add function to parse team info
Python
mit
zachpanz88/mlbgame,panzarino/mlbgame
#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get data data = ...
#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get data data = ...
<commit_before>#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get d...
#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get data data = ...
#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get data data = ...
<commit_before>#!/usr/bin/env python """Module that is used for getting information about the (MLB) league and the teams in it. """ import mlbgame.data import lxml.etree as etree def get_league_object(): """Returns the xml object corresponding to the league Only designed for internal use""" # get d...
164ac322110407ec3ab7b9dc8b6675a405efa6a9
pymantic/__init__.py
pymantic/__init__.py
# from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re.compile(ntriple...
# from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re.compile(ntriple...
Expand rdflib to content-type mapping.
Expand rdflib to content-type mapping.
Python
bsd-3-clause
igor-kim/blazegraph-python,SYSTAP/blazegraph-python,blazegraph/blazegraph-python,SYSTAP/blazegraph-python,blazegraph/blazegraph-python,igor-kim/blazegraph-python,syapse/pymantic
# from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re.compile(ntriple...
# from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re.compile(ntriple...
<commit_before># from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re....
# from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re.compile(ntriple...
# from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re.compile(ntriple...
<commit_before># from rdflib.plugin import register from rdflib.serializer import Serializer from rdflib.parser import Parser import re # Fix rdflib's ntriples parser from rdflib.plugins.parsers import ntriples ntriples.litinfo = r'(?:@([a-z]+(?:-[a-zA-Z0-9]+)*)|\^\^' + ntriples.uriref + r')?' ntriples.r_literal = re....
a0fe1cb563a6aff55744def8e43a3af8b0d672cc
python/web_socket.py
python/web_socket.py
#!/bin/python import urllib.request import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web request :param: url: The url link :return JSON object ...
#!/bin/python try: import urllib.request as urlrequest except ImportError: import urllib as urlrequest import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web...
Support python 2 and 3 compatability
Support python 2 and 3 compatability
Python
apache-2.0
Aurora-Team/BitcoinExchangeFH
#!/bin/python import urllib.request import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web request :param: url: The url link :return JSON object ...
#!/bin/python try: import urllib.request as urlrequest except ImportError: import urllib as urlrequest import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web...
<commit_before>#!/bin/python import urllib.request import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web request :param: url: The url link :return JS...
#!/bin/python try: import urllib.request as urlrequest except ImportError: import urllib as urlrequest import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web...
#!/bin/python import urllib.request import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web request :param: url: The url link :return JSON object ...
<commit_before>#!/bin/python import urllib.request import json class RESTfulApi: """ Generic REST API call """ def __init__(self): """ Constructor """ pass def request(self, url): """ Web request :param: url: The url link :return JS...
558a44643b37e82f5b77038c34e826f38dcb6358
qsimcirq/_version.py
qsimcirq/_version.py
"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.1"
"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.2.dev20220104"
Update to dev version 2022-01-04
Update to dev version 2022-01-04
Python
apache-2.0
quantumlib/qsim,quantumlib/qsim,quantumlib/qsim,quantumlib/qsim
"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.1" Update to dev version 2022-01-04
"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.2.dev20220104"
<commit_before>"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.1" <commit_msg>Update to dev version 2022-01-04<commit_after>
"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.2.dev20220104"
"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.1" Update to dev version 2022-01-04"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.2.dev20220104"
<commit_before>"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.1" <commit_msg>Update to dev version 2022-01-04<commit_after>"""The version number defined here is read automatically in setup.py.""" __version__ = "0.11.2.dev20220104"
be4aad346f25f7daf0ba8e61b083f9e15e8f6b6a
luigi/tasks/release/utils/generic.py
luigi/tasks/release/utils/generic.py
# -*- coding: utf-8 -*- """ Copyright [2009-2017] 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...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] 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...
Make file pattern quote the name
Make file pattern quote the name Might not be the right place for it, but this does need to be done.
Python
apache-2.0
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
# -*- coding: utf-8 -*- """ Copyright [2009-2017] 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...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] 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...
<commit_before># -*- coding: utf-8 -*- """ Copyright [2009-2017] 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 Unl...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] 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...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] 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...
<commit_before># -*- coding: utf-8 -*- """ Copyright [2009-2017] 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 Unl...
b959783f7c8db26df03760bb03227ab49f1975ba
pywikibot/families/wikitech_family.py
pywikibot/families/wikitech_family.py
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } def version(s...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } def version(s...
Remove overide of default scriptpath
Remove overide of default scriptpath git-svn-id: 9a050473c2aca1e14f53d73349e19b938c2cf203@11370 6a7f98fc-eeb0-4dc1-a6e2-c2c589a08aa6
Python
mit
legoktm/pywikipedia-rewrite
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } def version(s...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } def version(s...
<commit_before># -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } ...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } def version(s...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } def version(s...
<commit_before># -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The Wikitech family class Family(family.Family): def __init__(self): super(Family, self).__init__() self.name = 'wikitech' self.langs = { 'en': 'wikitech.wikimedia.org', } ...
a757ee7cff8f90ddf8cddb859e9924821a948f37
steve/_version.py
steve/_version.py
####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See http://www.pytho...
####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See http://www.pytho...
Fix version back to .dev
Fix version back to .dev
Python
bsd-2-clause
pyvideo/steve,CarlFK/steve,CarlFK/steve,willkg/steve,willkg/steve,pyvideo/steve,willkg/steve,pyvideo/steve,CarlFK/steve
####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See http://www.pytho...
####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See http://www.pytho...
<commit_before>####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See h...
####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See http://www.pytho...
####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See http://www.pytho...
<commit_before>####################################################################### # This file is part of steve. # # Copyright (C) 2012, 2013 Will Kahn-Greene # Licensed under the Simplified BSD License. See LICENSE for full # license. ####################################################################### # See h...
f5c4581ad27dab25caac0669b9b01af922ebc57c
keystoneclient/v2_0/extensions.py
keystoneclient/v2_0/extensions.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Fix a misspelling in a comment
Fix a misspelling in a comment Change-Id: If049cef6def1249fd0f70e16385aa7a4167edbde
Python
apache-2.0
alexpilotti/python-keystoneclient,jamielennox/python-keystoneclient,sdpp/python-keystoneclient,alexpilotti/python-keystoneclient,jamielennox/python-keystoneclient,magic0704/python-keystoneclient,darren-wang/ksc,sdpp/python-keystoneclient,darren-wang/ksc,ging/python-keystoneclient,klmitch/python-keystoneclient,ging/pyth...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
3d5d52f7d529183bd56da43df2503a53fe3b6fc8
oauth2/_compat.py
oauth2/_compat.py
try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def u(x, encoding='ascii'): if isinstance(x, TEXT): #pragma NO COVER return x try: return x.decode(encoding) exce...
try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) def b(x, encoding='ascii'): return bytes(x, encoding) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def b(x, encoding='ascii'): if isinstance(x, unicode): ...
Add a 'b()' utility for forcing encoding to bytes.
Add a 'b()' utility for forcing encoding to bytes. In Python2, the 'bytes()' builtin doesn't take an encoding argument.
Python
mit
CentricWebEstate/python-oauth2,squirro/python-oauth2,arthurian/python-oauth2,CestusMagnus/python-oauth2,joestump/python-oauth2,jackiekazil/python-oauth2,simplegeo/python-oauth2,edworboys/python-oauth2
try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def u(x, encoding='ascii'): if isinstance(x, TEXT): #pragma NO COVER return x try: return x.decode(encoding) exce...
try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) def b(x, encoding='ascii'): return bytes(x, encoding) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def b(x, encoding='ascii'): if isinstance(x, unicode): ...
<commit_before>try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def u(x, encoding='ascii'): if isinstance(x, TEXT): #pragma NO COVER return x try: return x.decode(enc...
try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) def b(x, encoding='ascii'): return bytes(x, encoding) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def b(x, encoding='ascii'): if isinstance(x, unicode): ...
try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def u(x, encoding='ascii'): if isinstance(x, TEXT): #pragma NO COVER return x try: return x.decode(encoding) exce...
<commit_before>try: TEXT = unicode except NameError: #pragma NO COVER Py3k TEXT = str STRING_TYPES = (str, bytes) else: #pragma NO COVER Python2 STRING_TYPES = (unicode, bytes) def u(x, encoding='ascii'): if isinstance(x, TEXT): #pragma NO COVER return x try: return x.decode(enc...
35a0bfaf499029fa54d33d6ea712e255cc41e1de
core/migrations/0003_set_homepage.py
core/migrations/0003_set_homepage.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") # Create default site ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") Site.objects.filter(hos...
Delete existing localhost entry for site.
Delete existing localhost entry for site.
Python
mit
albertoconnor/website,albertoconnor/website,OpenCanada/website,OpenCanada/website,OpenCanada/website,albertoconnor/website,albertoconnor/website,OpenCanada/website
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") # Create default site ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") Site.objects.filter(hos...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") # Create...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") Site.objects.filter(hos...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") # Create default site ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def set_homepage(apps, schema_editor): Site = apps.get_model('wagtailcore.Site') HomePage = apps.get_model("core", "HomePage") homepage = HomePage.objects.get(slug="home") # Create...
74b94564583c2cc5de50bb86be048afe3b0ca67e
links/maker/serializers.py
links/maker/serializers.py
from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name = serializers.C...
from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name = serializers.C...
Add email change process serializer
Add email change process serializer
Python
mit
projectweekend/Links-API,projectweekend/Links-API
from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name = serializers.C...
from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name = serializers.C...
<commit_before>from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name ...
from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name = serializers.C...
from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name = serializers.C...
<commit_before>from rest_framework import serializers from maker.models import Maker class RegistrationRequestSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = serializers.CharField(required=True) first_name = serializers.CharField(required=True) last_name ...
7d6580f2eb0e142a7ff7c77e6fc1d75f2a3d71b3
isort/pylama_isort.py
isort/pylama_isort.py
import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys.stdout = devnull yield sys...
import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from isort.exceptions import FileSkipped from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys....
Fix pylama integration to work with file skip comments
Fix pylama integration to work with file skip comments
Python
mit
PyCQA/isort,PyCQA/isort
import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys.stdout = devnull yield sys...
import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from isort.exceptions import FileSkipped from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys....
<commit_before>import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys.stdout = devnull yi...
import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from isort.exceptions import FileSkipped from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys....
import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys.stdout = devnull yield sys...
<commit_before>import os import sys from contextlib import contextmanager from typing import Any, Dict, List from pylama.lint import Linter as BaseLinter from . import api @contextmanager def supress_stdout(): stdout = sys.stdout with open(os.devnull, "w") as devnull: sys.stdout = devnull yi...
e7999bd8afa05854aac25cc5f16fd8555031aa5b
ci/run_all_spiders.py
ci/run_all_spiders.py
from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', False) settings.set('FE...
from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess from scrapy import signals if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', ...
Print some stats in the crawler
Print some stats in the crawler
Python
mit
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', False) settings.set('FE...
from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess from scrapy import signals if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', ...
<commit_before>from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', False) s...
from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess from scrapy import signals if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', ...
from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', False) settings.set('FE...
<commit_before>from scrapy.utils.project import get_project_settings from scrapy.crawler import CrawlerProcess if __name__ == '__main__': settings = get_project_settings() settings.set('LOG_FILE', 'all_spiders.log') settings.set('LOG_LEVEL', 'ERROR') settings.set('TELNETCONSOLE_ENABLED', False) s...
df9caa5a5735e8e74639f640272705fec886206e
test/factories.py
test/factories.py
# coding: utf-8 import string import factory from django.contrib.auth.models import User from message.models import Message from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" email = factory.LazyAttrib...
# coding: utf-8 import string import factory import random from django.contrib.auth.models import User from message.models import Message, MessageType from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" ...
Add messageType to message factory
Add messageType to message factory
Python
mit
sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/ritmserdtsa,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/flowofkindness
# coding: utf-8 import string import factory from django.contrib.auth.models import User from message.models import Message from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" email = factory.LazyAttrib...
# coding: utf-8 import string import factory import random from django.contrib.auth.models import User from message.models import Message, MessageType from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" ...
<commit_before># coding: utf-8 import string import factory from django.contrib.auth.models import User from message.models import Message from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" email = fac...
# coding: utf-8 import string import factory import random from django.contrib.auth.models import User from message.models import Message, MessageType from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" ...
# coding: utf-8 import string import factory from django.contrib.auth.models import User from message.models import Message from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" email = factory.LazyAttrib...
<commit_before># coding: utf-8 import string import factory from django.contrib.auth.models import User from message.models import Message from test.utils import generate_string, lorem_ipsum class UserFactory(factory.Factory): FACTORY_FOR = User first_name = "Boy" last_name = "Factory" email = fac...
567821c91b83e9251339a5e1caa81ea1839d8db1
day-04-1.py
day-04-1.py
import hashlib puzzle_input = 'iwrupvqb'
import hashlib puzzle_input = b'iwrupvqb' number = 100000 while True: key = puzzle_input + str(number).encode() if hashlib.md5(key).hexdigest()[:5] == '00000': break number += 1 print(number) # Runs way faster than I expected, lol # My answer: 346386
Complete day 4 part 1
Complete day 4 part 1
Python
mit
foxscotch/advent-of-code,foxscotch/advent-of-code
import hashlib puzzle_input = 'iwrupvqb' Complete day 4 part 1
import hashlib puzzle_input = b'iwrupvqb' number = 100000 while True: key = puzzle_input + str(number).encode() if hashlib.md5(key).hexdigest()[:5] == '00000': break number += 1 print(number) # Runs way faster than I expected, lol # My answer: 346386
<commit_before>import hashlib puzzle_input = 'iwrupvqb' <commit_msg>Complete day 4 part 1<commit_after>
import hashlib puzzle_input = b'iwrupvqb' number = 100000 while True: key = puzzle_input + str(number).encode() if hashlib.md5(key).hexdigest()[:5] == '00000': break number += 1 print(number) # Runs way faster than I expected, lol # My answer: 346386
import hashlib puzzle_input = 'iwrupvqb' Complete day 4 part 1import hashlib puzzle_input = b'iwrupvqb' number = 100000 while True: key = puzzle_input + str(number).encode() if hashlib.md5(key).hexdigest()[:5] == '00000': break number += 1 print(number) # Runs way faster than I expected, lol ...
<commit_before>import hashlib puzzle_input = 'iwrupvqb' <commit_msg>Complete day 4 part 1<commit_after>import hashlib puzzle_input = b'iwrupvqb' number = 100000 while True: key = puzzle_input + str(number).encode() if hashlib.md5(key).hexdigest()[:5] == '00000': break number += 1 print(number)...
677c4eb7672d2d5510ae7d8346563200e1c480d6
skeleton/__init__.py
skeleton/__init__.py
""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies; it should also be compatible with Python 3. However in this early phase of development, it only target python 2.5+, and tests require Mock. """ from skeleton.core import Skeleton, Va...
""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies. """ from skeleton.core import Skeleton, Var from skeleton.utils import insert_into_file
Add insert_into_file to skeleton module
Add insert_into_file to skeleton module
Python
bsd-2-clause
dinoboff/skeleton
""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies; it should also be compatible with Python 3. However in this early phase of development, it only target python 2.5+, and tests require Mock. """ from skeleton.core import Skeleton, Va...
""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies. """ from skeleton.core import Skeleton, Var from skeleton.utils import insert_into_file
<commit_before>""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies; it should also be compatible with Python 3. However in this early phase of development, it only target python 2.5+, and tests require Mock. """ from skeleton.core impo...
""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies. """ from skeleton.core import Skeleton, Var from skeleton.utils import insert_into_file
""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies; it should also be compatible with Python 3. However in this early phase of development, it only target python 2.5+, and tests require Mock. """ from skeleton.core import Skeleton, Va...
<commit_before>""" Basic Template system for project skeleton. skeleton is similar to the template part of PasteScript but without any dependencies; it should also be compatible with Python 3. However in this early phase of development, it only target python 2.5+, and tests require Mock. """ from skeleton.core impo...
eb79cce84fbb9d801d6f5087b9216e66d56bfa51
scripts/generate_global_kwargs_doc.py
scripts/generate_global_kwargs_doc.py
#!/usr/bin/env python from os import path from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) lines = [] for category, kwarg_configs in OPERATION_KWARGS....
#!/usr/bin/env python from os import path from pyinfra.api import Config from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): pyinfra_config = Config() this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) li...
Include defaults in generated global args list.
Include defaults in generated global args list.
Python
mit
Fizzadar/pyinfra,Fizzadar/pyinfra
#!/usr/bin/env python from os import path from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) lines = [] for category, kwarg_configs in OPERATION_KWARGS....
#!/usr/bin/env python from os import path from pyinfra.api import Config from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): pyinfra_config = Config() this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) li...
<commit_before>#!/usr/bin/env python from os import path from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) lines = [] for category, kwarg_configs in OP...
#!/usr/bin/env python from os import path from pyinfra.api import Config from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): pyinfra_config = Config() this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) li...
#!/usr/bin/env python from os import path from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) lines = [] for category, kwarg_configs in OPERATION_KWARGS....
<commit_before>#!/usr/bin/env python from os import path from pyinfra.api.operation_kwargs import OPERATION_KWARGS def build_global_kwargs_doc(): this_dir = path.dirname(path.realpath(__file__)) docs_dir = path.abspath(path.join(this_dir, '..', 'docs')) lines = [] for category, kwarg_configs in OP...
ff96f3fd6835f11f3725ab398b2a6b7ba4275e93
thinglang/compiler/references.py
thinglang/compiler/references.py
class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element): super(ElementReference, self).__init__(element.type) ...
class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element, local=None): super(ElementReference, self).__init__(elemen...
Add locally referenced subtype to element referenced opcodes
Add locally referenced subtype to element referenced opcodes
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element): super(ElementReference, self).__init__(element.type) ...
class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element, local=None): super(ElementReference, self).__init__(elemen...
<commit_before>class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element): super(ElementReference, self).__init__(ele...
class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element, local=None): super(ElementReference, self).__init__(elemen...
class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element): super(ElementReference, self).__init__(element.type) ...
<commit_before>class Reference(object): def __init__(self, type): super().__init__() self._type = type @property def type(self): return self._type class ElementReference(Reference): def __init__(self, thing, element): super(ElementReference, self).__init__(ele...
b9b8d77898c81afa5d918cc93c9011ace6f23965
content_editor/renderer.py
content_editor/renderer.py
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe class PluginRenderer(object): def __init__(self): self._renderers = OrderedDict((( Model, la...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe __all__ = ('PluginRenderer',) class RenderedContents(object): def __init__(self, contents): self.contents = conten...
Allow iterating over rendered contents
Allow iterating over rendered contents
Python
bsd-3-clause
matthiask/feincms2-content,matthiask/feincms2-content,matthiask/django-content-editor,matthiask/feincms2-content,matthiask/django-content-editor,matthiask/django-content-editor,matthiask/django-content-editor
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe class PluginRenderer(object): def __init__(self): self._renderers = OrderedDict((( Model, la...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe __all__ = ('PluginRenderer',) class RenderedContents(object): def __init__(self, contents): self.contents = conten...
<commit_before>from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe class PluginRenderer(object): def __init__(self): self._renderers = OrderedDict((( Model,...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe __all__ = ('PluginRenderer',) class RenderedContents(object): def __init__(self, contents): self.contents = conten...
from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe class PluginRenderer(object): def __init__(self): self._renderers = OrderedDict((( Model, la...
<commit_before>from __future__ import absolute_import, unicode_literals from collections import OrderedDict from django.db.models import Model from django.utils.html import conditional_escape, mark_safe class PluginRenderer(object): def __init__(self): self._renderers = OrderedDict((( Model,...
9c83b5b064a50b6813bb3819927c9d268f89aaa1
ninja/files.py
ninja/files.py
from typing import Any, Callable, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["UploadedFile"]) ->...
from typing import Any, Callable, Dict, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["UploadedFile...
Add missing type hint for field_schema parameter
Add missing type hint for field_schema parameter
Python
mit
vitalik/django-ninja,vitalik/django-ninja,vitalik/django-ninja
from typing import Any, Callable, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["UploadedFile"]) ->...
from typing import Any, Callable, Dict, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["UploadedFile...
<commit_before>from typing import Any, Callable, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["Upl...
from typing import Any, Callable, Dict, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["UploadedFile...
from typing import Any, Callable, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["UploadedFile"]) ->...
<commit_before>from typing import Any, Callable, Iterable, Optional, Type from django.core.files.uploadedfile import UploadedFile as DjangoUploadedFile from pydantic.fields import ModelField __all__ = ["UploadedFile"] class UploadedFile(DjangoUploadedFile): @classmethod def __get_validators__(cls: Type["Upl...
6cb9b6af77768466d7b6fd8e5d0964611da55282
tests/__init__.py
tests/__init__.py
from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ], ROOT_U...
from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ], ROOT_U...
Fix a bug that caused tests to raise a DatabaseError
Fix a bug that caused tests to raise a DatabaseError
Python
mit
jgorset/fandjango,jgorset/fandjango
from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ], ROOT_U...
from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ], ROOT_U...
<commit_before>from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ...
from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ], ROOT_U...
from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ], ROOT_U...
<commit_before>from django.conf import settings from django.core.management import call_command settings.configure( DATABASES = { 'default': { 'ENGINE': 'sqlite3', 'NAME': ':memory:' } }, INSTALLED_APPS = [ 'fandjango', 'south', 'tests.app' ...
aaf9d8169a685f4ab808765e132b2937d252e70c
core/context_processors.py
core/context_processors.py
from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_updates: ...
from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_updates: ...
Remove Home from list of popular pages
Remove Home from list of popular pages
Python
bsd-3-clause
ahernp/DMCM,ahernp/DMCM,ahernp/DMCM
from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_updates: ...
from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_updates: ...
<commit_before>from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_...
from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_updates: ...
from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_updates: ...
<commit_before>from collections import OrderedDict from django.db.models import Count from mpages.models import Page, PageRead def menus(request): main_menu = Page.objects.get(slug="main-menu") recent_updates = Page.objects.all().order_by("-updated")[:10] updates = OrderedDict() for page in recent_...
a19d0c2d77102c1f14823e0fbc255de3b0b2d4f4
tests/conftest.py
tests/conftest.py
# -*- coding: utf-8 -*- """ Acolyte Tests """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(request): app = create_app(TestConfig) app.app_context().push() db.create_all() ...
# -*- coding: utf-8 -*- """Acolyte test fixtures """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(): """Pytest fixture to yield a fully initialised Acolyte Decorators: p...
Add docstrings to test fixtures
Add docstrings to test fixtures
Python
mit
rabramley/frostgrave_acolyte,rabramley/frostgrave_acolyte
# -*- coding: utf-8 -*- """ Acolyte Tests """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(request): app = create_app(TestConfig) app.app_context().push() db.create_all() ...
# -*- coding: utf-8 -*- """Acolyte test fixtures """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(): """Pytest fixture to yield a fully initialised Acolyte Decorators: p...
<commit_before># -*- coding: utf-8 -*- """ Acolyte Tests """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(request): app = create_app(TestConfig) app.app_context().push() db.cr...
# -*- coding: utf-8 -*- """Acolyte test fixtures """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(): """Pytest fixture to yield a fully initialised Acolyte Decorators: p...
# -*- coding: utf-8 -*- """ Acolyte Tests """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(request): app = create_app(TestConfig) app.app_context().push() db.create_all() ...
<commit_before># -*- coding: utf-8 -*- """ Acolyte Tests """ import pytest from acolyte import create_app from acolyte.database import db from config import TestConfig, TestConfigCRSF @pytest.yield_fixture(scope='function') def app(request): app = create_app(TestConfig) app.app_context().push() db.cr...
34cf1f2467a7fb09850f834d7c1dd165457e36c2
tests/conftest.py
tests/conftest.py
import sys collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py")
"""Configuration for test environment""" import sys from .fixtures import * collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py")
Add hug_api fixture, and all future fixtures to default test config
Add hug_api fixture, and all future fixtures to default test config
Python
mit
timothycrosley/hug,timothycrosley/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug
import sys collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py") Add hug_api fixture, and all future fixtures to default test config
"""Configuration for test environment""" import sys from .fixtures import * collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py")
<commit_before> import sys collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py") <commit_msg>Add hug_api fixture, and all future fixtures to default test config<commit_after>
"""Configuration for test environment""" import sys from .fixtures import * collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py")
import sys collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py") Add hug_api fixture, and all future fixtures to default test config"""Configuration for test environment""" import sys from .fixtures...
<commit_before> import sys collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("test_async.py") if sys.version_info < (3, 4): collect_ignore.append("test_coroutines.py") <commit_msg>Add hug_api fixture, and all future fixtures to default test config<commit_after>"""Configuration for test ...
98c1f2b21c55d0f4926602fa6d3534faa623b9ab
orges/orges.py
orges/orges.py
def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if __name__ == '__main__': pass
from test.algorithms.saes import f as saes from paramspec import ParamSpec from args import ArgsCreator, call def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if param_spec is None: param_spec = ParamSpec(f) args_creator = ArgsCreator(param_spec) for args in...
Add prototype implementation for optimize()
Add prototype implementation for optimize() It is currently doing a "Grid search" without actually searching for anything ;)
Python
bsd-3-clause
cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt
def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if __name__ == '__main__': passAdd prototype implementation for optimize() It is currently doing a "Grid search" without actually searching for anything ;)
from test.algorithms.saes import f as saes from paramspec import ParamSpec from args import ArgsCreator, call def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if param_spec is None: param_spec = ParamSpec(f) args_creator = ArgsCreator(param_spec) for args in...
<commit_before>def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if __name__ == '__main__': pass<commit_msg>Add prototype implementation for optimize() It is currently doing a "Grid search" without actually searching for anything ;)<commit_after>
from test.algorithms.saes import f as saes from paramspec import ParamSpec from args import ArgsCreator, call def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if param_spec is None: param_spec = ParamSpec(f) args_creator = ArgsCreator(param_spec) for args in...
def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if __name__ == '__main__': passAdd prototype implementation for optimize() It is currently doing a "Grid search" without actually searching for anything ;)from test.algorithms.saes import f as saes from paramspec impor...
<commit_before>def optimize(f, param_spec=None, return_spec=None): """Assume f has to be minimized for now.""" if __name__ == '__main__': pass<commit_msg>Add prototype implementation for optimize() It is currently doing a "Grid search" without actually searching for anything ;)<commit_after>from test.algorithms.s...
bc1409937a16698bdef21c0ec90d8b823db0bb97
rackattack/physical/logconfig.py
rackattack/physical/logconfig.py
import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.DEBUG) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.StreamHandler() ha...
import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.ERROR) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.StreamHandler() ha...
Set the log level of the network logger to ERROR, since it's less needed now
Set the log level of the network logger to ERROR, since it's less needed now
Python
apache-2.0
eliran-stratoscale/rackattack-physical,Stratoscale/rackattack-physical,eliran-stratoscale/rackattack-physical,Stratoscale/rackattack-physical
import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.DEBUG) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.StreamHandler() ha...
import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.ERROR) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.StreamHandler() ha...
<commit_before>import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.DEBUG) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.Str...
import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.ERROR) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.StreamHandler() ha...
import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.DEBUG) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.StreamHandler() ha...
<commit_before>import logging from rackattack.ssh import connection formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('network').setLevel(logging.DEBUG) logging.getLogger('network').propagate = False logging.getLogger().setLevel(logging.DEBUG) handler = logging.Str...
92c01be43b80247ce2233851dd74b041bb9d44b0
csunplugged/resources/views/BarcodeChecksumPosterResourceGenerator.py
csunplugged/resources/views/BarcodeChecksumPosterResourceGenerator.py
"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image from utils.BaseResourceGenerator import BaseResourceGenerator class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerator): """Class for Grid resource generator.""" additional_valid_options = { "barcode_length":...
"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image, ImageDraw from utils.BaseResourceGenerator import BaseResourceGenerator from utils.TextBoxDrawer import TextBoxDrawer from django.utils.translation import ugettext as _ class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerato...
Modify Barcode Checksum Poster resource to dynamically overlay text
Modify Barcode Checksum Poster resource to dynamically overlay text
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image from utils.BaseResourceGenerator import BaseResourceGenerator class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerator): """Class for Grid resource generator.""" additional_valid_options = { "barcode_length":...
"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image, ImageDraw from utils.BaseResourceGenerator import BaseResourceGenerator from utils.TextBoxDrawer import TextBoxDrawer from django.utils.translation import ugettext as _ class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerato...
<commit_before>"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image from utils.BaseResourceGenerator import BaseResourceGenerator class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerator): """Class for Grid resource generator.""" additional_valid_options = { "b...
"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image, ImageDraw from utils.BaseResourceGenerator import BaseResourceGenerator from utils.TextBoxDrawer import TextBoxDrawer from django.utils.translation import ugettext as _ class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerato...
"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image from utils.BaseResourceGenerator import BaseResourceGenerator class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerator): """Class for Grid resource generator.""" additional_valid_options = { "barcode_length":...
<commit_before>"""Class for Barcode Checksum Poster resource generator.""" from PIL import Image from utils.BaseResourceGenerator import BaseResourceGenerator class BarcodeChecksumPosterResourceGenerator(BaseResourceGenerator): """Class for Grid resource generator.""" additional_valid_options = { "b...
b98ce71770d22d4b80e83f56b74dc710405cf535
mitmproxy/utils/sliding_window.py
mitmproxy/utils/sliding_window.py
import itertools from typing import TypeVar, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterator[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T]]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1): >>> ...
import itertools from typing import TypeVar, Iterable, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterable[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T], ...]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1):...
Fix sliding window type specs
Fix sliding window type specs
Python
mit
mhils/mitmproxy,ujjwal96/mitmproxy,vhaupert/mitmproxy,StevenVanAcker/mitmproxy,ujjwal96/mitmproxy,zlorb/mitmproxy,Kriechi/mitmproxy,vhaupert/mitmproxy,mitmproxy/mitmproxy,zlorb/mitmproxy,Kriechi/mitmproxy,ddworken/mitmproxy,mitmproxy/mitmproxy,vhaupert/mitmproxy,mitmproxy/mitmproxy,StevenVanAcker/mitmproxy,ujjwal96/mit...
import itertools from typing import TypeVar, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterator[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T]]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1): >>> ...
import itertools from typing import TypeVar, Iterable, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterable[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T], ...]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1):...
<commit_before>import itertools from typing import TypeVar, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterator[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T]]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1):...
import itertools from typing import TypeVar, Iterable, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterable[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T], ...]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1):...
import itertools from typing import TypeVar, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterator[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T]]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1): >>> ...
<commit_before>import itertools from typing import TypeVar, Iterator, Tuple, Optional T = TypeVar('T') def window(iterator: Iterator[T], behind: int = 0, ahead: int = 0) -> Iterator[Tuple[Optional[T]]]: """ Sliding window for an iterator. Example: >>> for prev, i, nxt in window(range(10), 1, 1):...
f636420211821faeb3e26a501fbe5a9a7e3eef5e
normal_admin/user_admin.py
normal_admin/user_admin.py
__author__ = 'weijia' from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate ERROR_MESSAGE = _("Please enter the correct username and pa...
from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate __author__ = 'weijia' ERROR_MESSAGE = _("Please enter the correct username and p...
Fix login error in Django 1.8.
Fix login error in Django 1.8.
Python
bsd-3-clause
weijia/normal_admin,weijia/normal_admin
__author__ = 'weijia' from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate ERROR_MESSAGE = _("Please enter the correct username and pa...
from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate __author__ = 'weijia' ERROR_MESSAGE = _("Please enter the correct username and p...
<commit_before>__author__ = 'weijia' from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate ERROR_MESSAGE = _("Please enter the correct ...
from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate __author__ = 'weijia' ERROR_MESSAGE = _("Please enter the correct username and p...
__author__ = 'weijia' from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate ERROR_MESSAGE = _("Please enter the correct username and pa...
<commit_before>__author__ = 'weijia' from django.contrib.admin.sites import AdminSite from django.contrib.admin.forms import AdminAuthenticationForm from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate ERROR_MESSAGE = _("Please enter the correct ...
ea2979c75f8f771a70617e607b8398809dba8dac
twython/compat.py
twython/compat.py
# -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys import numpy as np _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplej...
# -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplejson as json except ...
Remove this merge as numpy shouldn't be a dependency
Remove this merge as numpy shouldn't be a dependency
Python
mit
ryanmcgrath/twython
# -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys import numpy as np _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplej...
# -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplejson as json except ...
<commit_before># -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys import numpy as np _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: ...
# -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplejson as json except ...
# -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys import numpy as np _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: import simplej...
<commit_before># -*- coding: utf-8 -*- """ twython.compat ~~~~~~~~~~~~~~ This module contains imports and declarations for seamless Python 2 and Python 3 compatibility. """ import sys import numpy as np _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) try: ...
b8f03556991cabab858bb31e5c8cb2f043ad14ce
packages/pcl-reference-assemblies.py
packages/pcl-reference-assemblies.py
import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles', version='2013-10-23', sources=['http://storage.bos.xamarin.com/mono-pcl/58/5825e...
import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles-2013-10-25', version='2013-10-25', sources=['http://storage.bos.xamarin.com/bot-pr...
Use a versioned filename for the PCL profiles.
Use a versioned filename for the PCL profiles.
Python
mit
mono/bockbuild,mono/bockbuild
import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles', version='2013-10-23', sources=['http://storage.bos.xamarin.com/mono-pcl/58/5825e...
import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles-2013-10-25', version='2013-10-25', sources=['http://storage.bos.xamarin.com/bot-pr...
<commit_before>import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles', version='2013-10-23', sources=['http://storage.bos.xamarin.com/mo...
import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles-2013-10-25', version='2013-10-25', sources=['http://storage.bos.xamarin.com/bot-pr...
import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles', version='2013-10-23', sources=['http://storage.bos.xamarin.com/mono-pcl/58/5825e...
<commit_before>import glob import os import shutil class PCLReferenceAssembliesPackage(Package): def __init__(self): Package.__init__(self, name='mono-pcl-profiles', version='2013-10-23', sources=['http://storage.bos.xamarin.com/mo...
4f9b0fc97b873a1e43a4312ae3a4b12d8b7bec35
ui.py
ui.py
def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | O | | | | ...
from terminaltables import SingleTable def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | ...
Use terminaltables.SingleTable for displaying letter bank
Use terminaltables.SingleTable for displaying letter bank
Python
mit
tml/python-hangman-2017-summer
def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | O | | | | ...
from terminaltables import SingleTable def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | ...
<commit_before>def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | O | | ...
from terminaltables import SingleTable def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | ...
def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | O | | | | ...
<commit_before>def render(object, **kw): if object == 'gallows': render_gallows(**kw) if object == 'bank': render_bank(**kw) if object == 'game_state': render_game_state(**kw) def render_gallows(parts=0, **kw): print(""" ______ | | O | | ...
8b45f5d4ced4954f9c86b52295772ae17776a552
ws.py
ws.py
import logging import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): ...
import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): respons...
Add argparse arguments to websockets server
Add argparse arguments to websockets server
Python
agpl-3.0
jessamynsmith/boards-backend,GetBlimp/boards-backend,jessamynsmith/boards-backend
import logging import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): ...
import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): respons...
<commit_before>import logging import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_messag...
import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): respons...
import logging import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): ...
<commit_before>import logging import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_messag...
66dc05130cba9856bec4eb56b55ec76e287e2605
rest_framework_oauth/__init__.py
rest_framework_oauth/__init__.py
""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__
""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__
Use a 3 digit semver version
Use a 3 digit semver version
Python
mit
jlafon/django-rest-framework-oauth
""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__ Use a 3 digit semver version
""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__
<commit_before>""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__ <commit_msg>Use a 3 digit semver version<commit_after>
""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__
""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__ Use a 3 digit semver version""" OAuth Support for Django REST Framework "...
<commit_before>""" OAuth Support for Django REST Framework """ __title__ = 'Django REST framework OAuth' __version__ = '0.1' __author__ = 'Jharrod LaFon' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Jharrod LaFon' # Version synonym VERSION = __version__ <commit_msg>Use a 3 digit semver version<commit_after>""" ...
5d622e350784ede5af2490495ce3119a2589b1e9
hb_res/resources/build_assets.py
hb_res/resources/build_assets.py
from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: r = functor(r) # write res i...
from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: if r is None: break ...
Add None check while applying modifiers
Add None check while applying modifiers
Python
mit
hatbot-team/hatbot_resources
from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: r = functor(r) # write res i...
from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: if r is None: break ...
<commit_before>from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: r = functor(r) ...
from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: if r is None: break ...
from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: r = functor(r) # write res i...
<commit_before>from .Resource import names_registered, resource_by_name def build(): for name in names_registered(): resource = resource_by_name(name)() for explanation in resource: r = explanation for functor in resource.modifiers: r = functor(r) ...
766b8564f524c9fcad2d82d08c8ec370532b7411
crm_department/models/crm_department.py
crm_department/models/crm_department.py
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class CrmDepartment(...
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class CrmDepartment(...
Set some fields as tranlate
Set some fields as tranlate
Python
agpl-3.0
acsone/partner-contact,diagramsoftware/partner-contact,Therp/partner-contact,Endika/partner-contact,open-synergy/partner-contact
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class CrmDepartment(...
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class CrmDepartment(...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class...
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class CrmDepartment(...
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class CrmDepartment(...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields class...
e7e8c9aee3b57187e8d239cb28a03125ab488886
fix_data.py
fix_data.py
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
Add data fixers to reindex for search by re-saving everything
Add data fixers to reindex for search by re-saving everything
Python
mit
markpasc/makerbase,markpasc/makerbase
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
<commit_before>from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() ...
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
<commit_before>from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() ...
49c99399c5b0e741e356cf320e338d019e06567d
taca/utils/config.py
taca/utils/config.py
"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} if type(config_file) is file: config.update(yaml.load(config_file, Loader=yaml.FullLoader) or {}) return config else: ...
"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} try: with open(config_file, 'r') as f: content = yaml.load(f, Loader=yaml.FullLoader) config.update(content) ...
Remove unused file type check
Remove unused file type check
Python
mit
SciLifeLab/TACA,SciLifeLab/TACA,SciLifeLab/TACA
"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} if type(config_file) is file: config.update(yaml.load(config_file, Loader=yaml.FullLoader) or {}) return config else: ...
"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} try: with open(config_file, 'r') as f: content = yaml.load(f, Loader=yaml.FullLoader) config.update(content) ...
<commit_before>"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} if type(config_file) is file: config.update(yaml.load(config_file, Loader=yaml.FullLoader) or {}) return config ...
"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} try: with open(config_file, 'r') as f: content = yaml.load(f, Loader=yaml.FullLoader) config.update(content) ...
"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} if type(config_file) is file: config.update(yaml.load(config_file, Loader=yaml.FullLoader) or {}) return config else: ...
<commit_before>"""Load and parse configuration file.""" import yaml from io import open CONFIG = {} def load_config(config_file): """Loads a configuration file.""" config = {} if type(config_file) is file: config.update(yaml.load(config_file, Loader=yaml.FullLoader) or {}) return config ...
8df58655f5a7a46a781fc0e126b148943a8d5b50
tests/sentry/metrics/test_datadog.py
tests/sentry/metrics/test_datadog.py
from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.') @patch('...
from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.') @patch('...
Remove no longer valid test
Remove no longer valid test
Python
bsd-3-clause
BuildingLink/sentry,mvaled/sentry,jean/sentry,kevinlondon/sentry,imankulov/sentry,mitsuhiko/sentry,nicholasserra/sentry,ifduyue/sentry,gencer/sentry,fotinakis/sentry,mvaled/sentry,alexm92/sentry,alexm92/sentry,kevinlondon/sentry,beeftornado/sentry,looker/sentry,korealerts1/sentry,jean/sentry,beeftornado/sentry,fotinaki...
from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.') @patch('...
from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.') @patch('...
<commit_before>from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.'...
from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.') @patch('...
from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.') @patch('...
<commit_before>from __future__ import absolute_import import socket from mock import patch from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(prefix='sentrytest.'...
7dc34b159f837d4fdc71666233f66d340cfd3419
src/info_retrieval/info_retrieval.py
src/info_retrieval/info_retrieval.py
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * import sys class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collect...
Add debugging statement to retrieve_passages function
Add debugging statement to retrieve_passages function
Python
mit
amkahn/question-answering,amkahn/question-answering
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * import sys class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collect...
<commit_before># LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document col...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * import sys class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collect...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
<commit_before># LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document col...
dc04c35177815ff2aee46088cac7d6790e6831dd
swimlane/core/search/search_result.py
swimlane/core/search/search_result.py
"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp): """In...
"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp): """In...
Fix a KeyError that is raised when there are no reuslts
Fix a KeyError that is raised when there are no reuslts
Python
mit
Swimlane/sw-python-client
"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp): """In...
"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp): """In...
<commit_before>"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp)...
"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp): """In...
"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp): """In...
<commit_before>"""This module provides a SearchResults class.""" from types import GeneratorType from ..resources import Record, StatsResult from ..swimlane_dict import SwimlaneDict __metaclass__ = type class SearchResult: """A class that wraps a Swimlane search result.""" def __init__(self, report, resp)...