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
90c2141ccdcb566149a0f11e8cc1e3f67b2dc113
mnp/commands.py
mnp/commands.py
import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args) def upload(repository, additional_args = None): additional_args = [] ...
import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["--extra-index-url", index_url] + additional_args) def upload(repository, additional_args = None): additi...
Change to use --extra-index-url instead
Change to use --extra-index-url instead
Python
mit
heryandi/mnp
import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args) def upload(repository, additional_args = None): additional_args = [] ...
import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["--extra-index-url", index_url] + additional_args) def upload(repository, additional_args = None): additi...
<commit_before>import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args) def upload(repository, additional_args = None): additi...
import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["--extra-index-url", index_url] + additional_args) def upload(repository, additional_args = None): additi...
import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args) def upload(repository, additional_args = None): additional_args = [] ...
<commit_before>import subprocess def download(packages, index_url, additional_args = None): additional_args = [] if additional_args is None else additional_args subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args) def upload(repository, additional_args = None): additi...
446d36cbbf79083b9d41ea5b152c5a845560eb4b
whats_fresh/whats_fresh_api/tests/views/test_stories.py
whats_fresh/whats_fresh_api/tests/views/test_stories.py
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.json'] def s...
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.json'] def s...
Add error field to expected JSON
Add error field to expected JSON
Python
apache-2.0
iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.json'] def s...
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.json'] def s...
<commit_before>from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.js...
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.json'] def s...
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.json'] def s...
<commit_before>from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from whats_fresh_api.models import * from django.contrib.gis.db import models import json class StoriesTestCase(TestCase): fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.js...
ab57bcc9f4219af63e99d82a844986213ade4c01
script/commit_message.py
script/commit_message.py
#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login page css + dfdc7...
#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login page css + dfdc7...
Fix script up to search branches
Fix script up to search branches
Python
mit
pact-foundation/pact-python,pact-foundation/pact-python
#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login page css + dfdc7...
#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login page css + dfdc7...
<commit_before>#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login p...
#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login page css + dfdc7...
#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login page css + dfdc7...
<commit_before>#!/usr/bin/env python import re import sys import subprocess examples = """+ 61c8ca9 fix: navbar not responsive on mobile + 479c48b test: prepared test cases for user authentication + a992020 chore: moved to semantic versioning + b818120 fix: button click even handler firing twice + c6e9a97 fix: login p...
03aae3ef6488168730d35e36f416e1b8eb058431
script/daytime_client.py
script/daytime_client.py
# A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
# A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
Use python script to send json
Use python script to send json
Python
bsd-3-clause
crapp/netfortune,crapp/netfortune
# A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
# A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
<commit_before># A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
# A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
# A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
<commit_before># A simpel test script for netfortune server # Copyright © 2017 Christian Rapp # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
a63481c0198791b41cf377e4bc8247afaed90364
email_extras/__init__.py
email_extras/__init__.py
from django.core.exceptions import ImproperlyConfigured from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: raise ImproperlyConfigured, "Could not import gnupg"
from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: try: from django.core.exceptions import ImproperlyConfigured raise ImproperlyConfigured, "Could not import gnupg" except ImportError: ...
Fix to allow version number to be imported without dependencies being installed.
Fix to allow version number to be imported without dependencies being installed.
Python
bsd-2-clause
blag/django-email-extras,stephenmcd/django-email-extras,blag/django-email-extras,dreipol/django-email-extras,dreipol/django-email-extras,stephenmcd/django-email-extras
from django.core.exceptions import ImproperlyConfigured from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: raise ImproperlyConfigured, "Could not import gnupg" Fix to allow version number to be imported without dependencies being i...
from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: try: from django.core.exceptions import ImproperlyConfigured raise ImproperlyConfigured, "Could not import gnupg" except ImportError: ...
<commit_before> from django.core.exceptions import ImproperlyConfigured from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: raise ImproperlyConfigured, "Could not import gnupg" <commit_msg>Fix to allow version number to be imported w...
from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: try: from django.core.exceptions import ImproperlyConfigured raise ImproperlyConfigured, "Could not import gnupg" except ImportError: ...
from django.core.exceptions import ImproperlyConfigured from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: raise ImproperlyConfigured, "Could not import gnupg" Fix to allow version number to be imported without dependencies being i...
<commit_before> from django.core.exceptions import ImproperlyConfigured from email_extras.settings import USE_GNUPG __version__ = "0.1.0" if USE_GNUPG: try: import gnupg except ImportError: raise ImproperlyConfigured, "Could not import gnupg" <commit_msg>Fix to allow version number to be imported w...
ca9f3c005b2412c1b9ff0247afc6708b0172d183
web/impact/impact/v1/views/base_history_view.py
web/impact/impact/v1/views/base_history_view.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(APIView): me...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(APIView): me...
Improve history sorting and remove dead comments
[AC-4875] Improve history sorting and remove dead comments
Python
mit
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(APIView): me...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(APIView): me...
<commit_before># MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(A...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(APIView): me...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(APIView): me...
<commit_before># MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ( ImpactMetadata, READ_ONLY_LIST_TYPE, ) class BaseHistoryView(A...
479e532769b201ee0213812b3071100eaf4dfef4
skele/cli.py
skele/cli.py
""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://github.com/rdegges/...
""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://github.com/rdegges/...
Validate command not only exists but was used
Validate command not only exists but was used Without this, it just uses the first command module that exists, even if that option is `False` (it wasn't passed by the user)
Python
mit
snipsco/snipsskills,snipsco/snipsskills,snipsco/snipsskills,snipsco/snipsskills
""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://github.com/rdegges/...
""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://github.com/rdegges/...
<commit_before>""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://gith...
""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://github.com/rdegges/...
""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://github.com/rdegges/...
<commit_before>""" skele Usage: skele hello skele -h | --help skele --version Options: -h --help Show this screen. --version Show version. Examples: skele hello Help: For help using this tool, please open an issue on the Github repository: https://gith...
112ce320f351399a28e4d85ed88e1b71df4e7aef
magpie/config/__init__.py
magpie/config/__init__.py
from os import path class ConfigPath(object): def __getattr__(self, key): return_path = path.join(path.dirname(__file__), key + '.cfg') if not path.exists(return_path): return None return return_path config_path = ConfigPath()
from os import path class ConfigPath(object): def __init__(self): self.config_paths = [path.join(path.expanduser('~'), '.magpie'), path.dirname(__file__)] def __getattr__(self, key): for path in self.config_paths: return_path = path.join(path, key + '.cfg') if path.exist...
Enable configuration from home directory
Enable configuration from home directory This adds the possibility of defining multiple locations for the config-files. The given example first searches in ~/.magpie and if it doesn't find any config-files there, it searches in the default path. This enables configuration for each individual user and fixes the problem...
Python
mit
damoeb/magpie,akarca/magpie,charlesthomas/magpie,jcda/magpie,akarca/magpie,damoeb/magpie,damoeb/magpie,beni55/magpie,jcda/magpie,beni55/magpie,jcda/magpie,beni55/magpie,charlesthomas/magpie,akarca/magpie,charlesthomas/magpie
from os import path class ConfigPath(object): def __getattr__(self, key): return_path = path.join(path.dirname(__file__), key + '.cfg') if not path.exists(return_path): return None return return_path config_path = ConfigPath() Enable configuration from home directory This adds the possibi...
from os import path class ConfigPath(object): def __init__(self): self.config_paths = [path.join(path.expanduser('~'), '.magpie'), path.dirname(__file__)] def __getattr__(self, key): for path in self.config_paths: return_path = path.join(path, key + '.cfg') if path.exist...
<commit_before>from os import path class ConfigPath(object): def __getattr__(self, key): return_path = path.join(path.dirname(__file__), key + '.cfg') if not path.exists(return_path): return None return return_path config_path = ConfigPath() <commit_msg>Enable configuration from home direc...
from os import path class ConfigPath(object): def __init__(self): self.config_paths = [path.join(path.expanduser('~'), '.magpie'), path.dirname(__file__)] def __getattr__(self, key): for path in self.config_paths: return_path = path.join(path, key + '.cfg') if path.exist...
from os import path class ConfigPath(object): def __getattr__(self, key): return_path = path.join(path.dirname(__file__), key + '.cfg') if not path.exists(return_path): return None return return_path config_path = ConfigPath() Enable configuration from home directory This adds the possibi...
<commit_before>from os import path class ConfigPath(object): def __getattr__(self, key): return_path = path.join(path.dirname(__file__), key + '.cfg') if not path.exists(return_path): return None return return_path config_path = ConfigPath() <commit_msg>Enable configuration from home direc...
6f992bda1747d8dd23dd03f1ae3679c00f2fc977
marketpulse/geo/lookup.py
marketpulse/geo/lookup.py
from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format(lng, lat) ...
from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format(lng, lat) ...
Handle errors in case of a country mismatch.
Handle errors in case of a country mismatch.
Python
mpl-2.0
mozilla/marketpulse,akatsoulas/marketpulse,akatsoulas/marketpulse,akatsoulas/marketpulse,mozilla/marketpulse,mozilla/marketpulse,akatsoulas/marketpulse,mozilla/marketpulse
from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format(lng, lat) ...
from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format(lng, lat) ...
<commit_before>from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format...
from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format(lng, lat) ...
from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format(lng, lat) ...
<commit_before>from urlparse import urljoin from django.conf import settings from django_countries import countries import requests COUNTRY_CODES = {key: value for (value, key) in list(countries)} def reverse_geocode(lat, lng): """Query Mapbox API to get data for lat, lng""" query = '{0},{1}.json'.format...
ef7910d259f3a7d025e95ad69345da457a777b90
myvoice/urls.py
myvoice/urls.py
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^broa...
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = [ url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^broadcast/', include('bro...
Use Django 1.7 syntax for URLs
Use Django 1.7 syntax for URLs
Python
bsd-2-clause
myvoice-nigeria/myvoice,myvoice-nigeria/myvoice,myvoice-nigeria/myvoice,myvoice-nigeria/myvoice
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^broa...
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = [ url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^broadcast/', include('bro...
<commit_before>from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), ...
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = [ url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^broadcast/', include('bro...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^broa...
<commit_before>from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^', include('myvoice.core.urls')), url(r'^admin/', include(admin.site.urls)), ...
e252962f9a6cc1ed6cd2ccdd72c4151708be7233
tests/cases/resources/tests/preview.py
tests/cases/resources/tests/preview.py
import json from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) self.assertEqual(response['Content-Type'], 'app...
import json from django.contrib.auth.models import User from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) sel...
Add test to recreate error in this bug
Add test to recreate error in this bug
Python
bsd-2-clause
rv816/serrano_night,rv816/serrano_night,chop-dbhi/serrano,chop-dbhi/serrano
import json from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) self.assertEqual(response['Content-Type'], 'app...
import json from django.contrib.auth.models import User from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) sel...
<commit_before>import json from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) self.assertEqual(response['Conte...
import json from django.contrib.auth.models import User from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) sel...
import json from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) self.assertEqual(response['Content-Type'], 'app...
<commit_before>import json from django.test import TestCase class PreviewResourceTestCase(TestCase): def test_get(self): response = self.client.get('/api/data/preview/', HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) self.assertEqual(response['Conte...
64732e7dd32f23b9431bd69fecd757af1772053e
local_test_settings.py
local_test_settings.py
from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', 'django.con...
from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', 'django.con...
Remove UNICORE_DISTRIBUTE_API from test settings
Remove UNICORE_DISTRIBUTE_API from test settings This stopped being used in 11457e0fa578f09e7e8a4fd0f1595b4e47ab109c
Python
bsd-2-clause
praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo
from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', 'django.con...
from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', 'django.con...
<commit_before>from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', ...
from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', 'django.con...
from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', 'django.con...
<commit_before>from testapp.settings.base import * ENABLE_SSO = True MIDDLEWARE_CLASSES += ( 'molo.core.middleware.MoloCASMiddleware', 'molo.core.middleware.Custom403Middleware', ) AUTHENTICATION_BACKENDS = ( 'molo.profiles.backends.MoloProfilesModelBackend', 'molo.core.backends.MoloModelBackend', ...
c460fd7d257b25723fc19557ad4404519904e0a9
simplecoin/tests/__init__.py
simplecoin/tests/__init__.py
import simplecoin import unittest import datetime import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs): extra ...
import simplecoin import unittest import datetime import random import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs): ...
Fix tests to allow use of random, but not change each time
Fix tests to allow use of random, but not change each time
Python
mit
nickgzzjr/simplecoin_multi,nickgzzjr/simplecoin_multi,nickgzzjr/simplecoin_multi,nickgzzjr/simplecoin_multi
import simplecoin import unittest import datetime import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs): extra ...
import simplecoin import unittest import datetime import random import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs): ...
<commit_before>import simplecoin import unittest import datetime import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs):...
import simplecoin import unittest import datetime import random import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs): ...
import simplecoin import unittest import datetime import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs): extra ...
<commit_before>import simplecoin import unittest import datetime import simplecoin.models as m from decimal import Decimal from simplecoin import db class UnitTest(unittest.TestCase): """ Represents a set of tests that only need the database iniailized, but no fixture data """ def setUp(self, **kwargs):...
66eadda6a2a26cfef2f38449736183b8b5175022
pytest_django/__init__.py
pytest_django/__init__.py
from .plugin import * from .funcargs import * from .marks import *
from pytest_django.plugin import * from pytest_django.funcargs import * from pytest_django.marks import * # When Python 2.5 support is dropped, these imports can be used instead: # from .plugin import * # from .funcargs import * # from .marks import *
Make module imports 2.5 compatible
Make module imports 2.5 compatible
Python
bsd-3-clause
bforchhammer/pytest-django,thedrow/pytest-django,reincubate/pytest-django,aptivate/pytest-django,felixonmars/pytest-django,pelme/pytest-django,ojake/pytest-django,hoh/pytest-django,RonnyPfannschmidt/pytest_django,ktosiek/pytest-django,davidszotten/pytest-django,pombredanne/pytest_django,tomviner/pytest-django
from .plugin import * from .funcargs import * from .marks import * Make module imports 2.5 compatible
from pytest_django.plugin import * from pytest_django.funcargs import * from pytest_django.marks import * # When Python 2.5 support is dropped, these imports can be used instead: # from .plugin import * # from .funcargs import * # from .marks import *
<commit_before>from .plugin import * from .funcargs import * from .marks import * <commit_msg>Make module imports 2.5 compatible<commit_after>
from pytest_django.plugin import * from pytest_django.funcargs import * from pytest_django.marks import * # When Python 2.5 support is dropped, these imports can be used instead: # from .plugin import * # from .funcargs import * # from .marks import *
from .plugin import * from .funcargs import * from .marks import * Make module imports 2.5 compatiblefrom pytest_django.plugin import * from pytest_django.funcargs import * from pytest_django.marks import * # When Python 2.5 support is dropped, these imports can be used instead: # from .plugin import * # from .funcarg...
<commit_before>from .plugin import * from .funcargs import * from .marks import * <commit_msg>Make module imports 2.5 compatible<commit_after>from pytest_django.plugin import * from pytest_django.funcargs import * from pytest_django.marks import * # When Python 2.5 support is dropped, these imports can be used instead...
d4f63bb099db886f50b6e54838ec9200dbc3ca1f
echo_client.py
echo_client.py
#!/usr/bin/env python import socket import sys def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((address, port)) client_socket.sendall(message...
#!/usr/bin/env python import socket import sys import echo_server from threading import Thread def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((a...
Add threading to allow for client and server to be run from a single script
Add threading to allow for client and server to be run from a single script
Python
mit
charlieRode/network_tools
#!/usr/bin/env python import socket import sys def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((address, port)) client_socket.sendall(message...
#!/usr/bin/env python import socket import sys import echo_server from threading import Thread def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((a...
<commit_before>#!/usr/bin/env python import socket import sys def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((address, port)) client_socket....
#!/usr/bin/env python import socket import sys import echo_server from threading import Thread def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((a...
#!/usr/bin/env python import socket import sys def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((address, port)) client_socket.sendall(message...
<commit_before>#!/usr/bin/env python import socket import sys def main(): message = sys.argv[1] port = 50000 address = '127.0.0.1' client_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_IP) client_socket.connect((address, port)) client_socket....
fddd632e73a7540bc6be4f02022dcc663b35b3d4
echo_server.py
echo_server.py
import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) address = ('127.0.0.1', 50000) server_socket.bind(address) server_socket.listen(1) connection, client_address = server...
import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(1) connection, client_address = server_socket.accept() # ...
Fix bug in server, connection closes after returning message, socket closes on KeyboardInterupt
Fix bug in server, connection closes after returning message, socket closes on KeyboardInterupt
Python
mit
jwarren116/network-tools,jwarren116/network-tools
import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) address = ('127.0.0.1', 50000) server_socket.bind(address) server_socket.listen(1) connection, client_address = server...
import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(1) connection, client_address = server_socket.accept() # ...
<commit_before>import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) address = ('127.0.0.1', 50000) server_socket.bind(address) server_socket.listen(1) connection, client_a...
import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) server_socket.bind(('127.0.0.1', 50000)) server_socket.listen(1) connection, client_address = server_socket.accept() # ...
import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) address = ('127.0.0.1', 50000) server_socket.bind(address) server_socket.listen(1) connection, client_address = server...
<commit_before>import socket try: while True: server_socket = socket.socket( socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) address = ('127.0.0.1', 50000) server_socket.bind(address) server_socket.listen(1) connection, client_a...
0611f0ca617c3463a69e5bd627e821ae55c822ec
logintokens/tests/util.py
logintokens/tests/util.py
from time import time class MockTime: time_passed = 0.0 def time(self): return time() + self.time_passed def sleep(self, seconds): self.time_passed += seconds mock_time = MockTime()
"""utility functions for testing logintokens app """ from time import time class MockTime: """Provide mocked time and sleep methods to simulate the passage of time. """ time_passed = 0.0 def time(self): """Return current time with a consistent offset. """ return time() + se...
Add docstrings to mocked time methods
Add docstrings to mocked time methods
Python
mit
randomic/aniauth-tdd,randomic/aniauth-tdd
from time import time class MockTime: time_passed = 0.0 def time(self): return time() + self.time_passed def sleep(self, seconds): self.time_passed += seconds mock_time = MockTime() Add docstrings to mocked time methods
"""utility functions for testing logintokens app """ from time import time class MockTime: """Provide mocked time and sleep methods to simulate the passage of time. """ time_passed = 0.0 def time(self): """Return current time with a consistent offset. """ return time() + se...
<commit_before>from time import time class MockTime: time_passed = 0.0 def time(self): return time() + self.time_passed def sleep(self, seconds): self.time_passed += seconds mock_time = MockTime() <commit_msg>Add docstrings to mocked time methods<commit_after>
"""utility functions for testing logintokens app """ from time import time class MockTime: """Provide mocked time and sleep methods to simulate the passage of time. """ time_passed = 0.0 def time(self): """Return current time with a consistent offset. """ return time() + se...
from time import time class MockTime: time_passed = 0.0 def time(self): return time() + self.time_passed def sleep(self, seconds): self.time_passed += seconds mock_time = MockTime() Add docstrings to mocked time methods"""utility functions for testing logintokens app """ from time impo...
<commit_before>from time import time class MockTime: time_passed = 0.0 def time(self): return time() + self.time_passed def sleep(self, seconds): self.time_passed += seconds mock_time = MockTime() <commit_msg>Add docstrings to mocked time methods<commit_after>"""utility functions for te...
07617ec8b1cb57c795d9875691d7f3c67e633b6a
repour/auth/oauth2_jwt.py
repour/auth/oauth2_jwt.py
import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token: ' + str(token)) OPTIONS = { 'verify_signature': True,...
import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token!') OPTIONS = { 'verify_signature': True, 'veri...
Remove user token from logs
[NCL-3741] Remove user token from logs
Python
apache-2.0
project-ncl/repour,project-ncl/repour
import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token: ' + str(token)) OPTIONS = { 'verify_signature': True,...
import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token!') OPTIONS = { 'verify_signature': True, 'veri...
<commit_before>import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token: ' + str(token)) OPTIONS = { 'verify_si...
import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token!') OPTIONS = { 'verify_signature': True, 'veri...
import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token: ' + str(token)) OPTIONS = { 'verify_signature': True,...
<commit_before>import asyncio import logging from jose import jwt, JWTError from repour.config import config logger = logging.getLogger(__name__) @asyncio.coroutine def verify_token(token): c = yield from config.get_configuration() logger.info('Got token: ' + str(token)) OPTIONS = { 'verify_si...
9f557a7632a1cd3b16dd6db79c7bb6a61ff79791
v0/tig.py
v0/tig.py
#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(msg): pass ...
#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(msg): pass ...
Print parsed args, useful for demo.
Print parsed args, useful for demo.
Python
mit
bravegnu/tiny-git,jamesmortensen/tiny-git,jamesmortensen/tiny-git,bravegnu/tiny-git
#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(msg): pass ...
#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(msg): pass ...
<commit_before>#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(m...
#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(msg): pass ...
#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(msg): pass ...
<commit_before>#!/usr/bin/env python """ Usage: tig init tig commit <msg> tig checkout <start-point> [-b <branch-name>] tig diff tig log tig branch tig merge <branch> Options: -b <branch-name> Branch name to checkout. """ import docopt def init(): pass def branch(): pass def commit(m...
fd09e0ef4ea9a0dede74e5a87ad108a75d5e5ce7
comrade/core/decorators.py
comrade/core/decorators.py
from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): if cls not in instances: inst...
from django.shortcuts import get_object_or_404 from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): ...
Add decorator for loading instance of a model in a view.
Add decorator for loading instance of a model in a view.
Python
mit
bueda/django-comrade
from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): if cls not in instances: inst...
from django.shortcuts import get_object_or_404 from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): ...
<commit_before>from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): if cls not in instances: ...
from django.shortcuts import get_object_or_404 from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): ...
from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): if cls not in instances: inst...
<commit_before>from django.utils.decorators import available_attrs from django.utils.http import urlquote from django.http import HttpResponse from django.template import loader, RequestContext from functools import wraps def singleton(cls): instances = {} def getinstance(): if cls not in instances: ...
5a2c794bebc4b6594eacdaef4409825c135b62d7
test/test_integ_rules.py
test/test_integ_rules.py
""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_existsCaptureP_capture...
""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_isACaptureP_direction_...
Add integration test for isACaptureP()
Add integration test for isACaptureP()
Python
mit
blairck/jaeger
""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_existsCaptureP_capture...
""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_isACaptureP_direction_...
<commit_before>""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_existsC...
""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_isACaptureP_direction_...
""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_existsCaptureP_capture...
<commit_before>""" Integration tests for the rules module """ import unittest # pylint: disable=import-error from res import types from src import coordinate from src import gamenode from src import rules class TestIntegRules(unittest.TestCase): """ Integration tests for the rules module """ def test_existsC...
cc0a971bad5f4b2eb81881b8c570eddb2bd144f3
django_vend/stores/forms.py
django_vend/stores/forms.py
from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id', None) ...
from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id', None) ...
Make form update existing instance if uid matches
Make form update existing instance if uid matches
Python
bsd-3-clause
remarkablerocket/django-vend,remarkablerocket/django-vend
from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id', None) ...
from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id', None) ...
<commit_before>from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id',...
from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id', None) ...
from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id', None) ...
<commit_before>from django import forms from django_vend.core.forms import VendDateTimeField from .models import VendOutlet class VendOutletForm(forms.ModelForm): deleted_at = VendDateTimeField(required=False) def __init__(self, data=None, *args, **kwargs): if data: uid = data.pop('id',...
5d5a4e6fb6a646ddf189100d87160d36f09862bf
games/admin.py
games/admin.py
from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): pass class AssetAdmin(admin.Mode...
from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): list_display = ['__unicode__', 'ga...
Add more fields to the release display
Add more fields to the release display
Python
mit
stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb
from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): pass class AssetAdmin(admin.Mode...
from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): list_display = ['__unicode__', 'ga...
<commit_before>from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): pass class AssetA...
from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): list_display = ['__unicode__', 'ga...
from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): pass class AssetAdmin(admin.Mode...
<commit_before>from django.contrib import admin from .models import Game, Framework, Release, Asset class GameAdmin(admin.ModelAdmin): list_display = ['name', 'uuid', 'owner', 'framework', 'public'] class FrameworkAdmin(admin.ModelAdmin): pass class ReleaseAdmin(admin.ModelAdmin): pass class AssetA...
fde47133da8c5157f2cae04abb77eccbace6c831
netbox/netbox/forms.py
netbox/netbox/forms.py
from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('rack', 'Racks')...
from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('rack', 'Racks')...
Fix global search placeholder text
Fix global search placeholder text
Python
apache-2.0
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,lampwins/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox,lampwins/netbox
from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('rack', 'Racks')...
from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('rack', 'Racks')...
<commit_before>from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('...
from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('rack', 'Racks')...
from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('rack', 'Racks')...
<commit_before>from __future__ import unicode_literals from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('...
89ae5637fe57afbd777f0a491a6ab0d674a5e351
agsadmin/sharing_admin/content/users/UserItem.py
agsadmin/sharing_admin/content/users/UserItem.py
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import send_session_re...
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import send_session_re...
Add move operation to user item
Add move operation to user item
Python
bsd-3-clause
DavidWhittingham/agsadmin
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import send_session_re...
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import send_session_re...
<commit_before>from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import ...
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import send_session_re...
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import send_session_re...
<commit_before>from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ...._endpoint_base import EndpointBase from ...._utils import ...
afbe8ddff1791084aa1bcad775f1b01481b72c2b
larvae/person.py
larvae/person.py
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
Move default value assignments before kwargs
Move default value assignments before kwargs
Python
bsd-3-clause
AGarrow/larvae
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
<commit_before>from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_...
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_names', 'extras...
<commit_before>from larvae.base import LarvaeBase class Person(LarvaeBase): """ Details for a Person in Popolo format. """ _schema_name = "person" __slots__ = ('name', '_id', 'gender', 'birth_date', 'death_date', 'image', 'summary', 'biography', 'links', 'other_...
2d4382ae1cec44875e7bec2f16b8406879a0bac9
opentreemap/api/models.py
opentreemap/api/models.py
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key = models.CharFie...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key = models.CharFie...
Print debug-friendly repr of APIAccessCredential
Print debug-friendly repr of APIAccessCredential
Python
agpl-3.0
maurizi/otm-core,clever-crow-consulting/otm-core,maurizi/otm-core,recklessromeo/otm-core,recklessromeo/otm-core,RickMohr/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,RickMohr/otm-core,...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key = models.CharFie...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key = models.CharFie...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key =...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key = models.CharFie...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key = models.CharFie...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division import uuid import base64 import os from django.contrib.gis.db import models from treemap.models import User class APIAccessCredential(models.Model): access_key =...
25a37ea86e26a731608e4c2a810610c842d37d19
grano/service/indexer.py
grano/service/indexer.py
import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity in enumerate(Ent...
import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity in enumerate(Ent...
Remove use of yield_per which clashes with 'joined' load.
Remove use of yield_per which clashes with 'joined' load.
Python
mit
4bic/grano,granoproject/grano,4bic-attic/grano,CodeForAfrica/grano
import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity in enumerate(Ent...
import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity in enumerate(Ent...
<commit_before>import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity i...
import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity in enumerate(Ent...
import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity in enumerate(Ent...
<commit_before>import logging from pprint import pprint import elasticsearch from grano.core import es, es_index from grano.model import Entity from grano.logic import entities log = logging.getLogger(__name__) def index_entities(): """ Re-build an index for all enitites from scratch. """ for i, entity i...
62d93afd3f59f4096ef22a056881faf725d09531
oweb/tests/__init__.py
oweb/tests/__init__.py
# Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json']
# Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json'] def setup(self): """Prepare general testing settings""" # urls must be specified this way, because the class-attribute can not # ...
Add test specific url configuration
Add test specific url configuration
Python
mit
Mischback/django-oweb,Mischback/django-oweb
# Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json'] Add test specific url configuration
# Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json'] def setup(self): """Prepare general testing settings""" # urls must be specified this way, because the class-attribute can not # ...
<commit_before># Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json'] <commit_msg>Add test specific url configuration<commit_after>
# Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json'] def setup(self): """Prepare general testing settings""" # urls must be specified this way, because the class-attribute can not # ...
# Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json'] Add test specific url configuration# Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" ...
<commit_before># Django imports from django.test import TestCase class OWebViewTests(TestCase): """Provides view related tests""" fixtures = ['oweb_testdata_01.json'] <commit_msg>Add test specific url configuration<commit_after># Django imports from django.test import TestCase class OWebViewTests(TestCase):...
7f23dfe16904fdf73b353338a8881928c5211989
hoomd/filter/__init__.py
hoomd/filter/__init__.py
"""Particle filters.""" from hoomd.filter.filter_ import ParticleFilter # noqa from hoomd.filter.all_ import All # noqa from hoomd.filter.set_ import Intersection, SetDifference, Union # noqa from hoomd.filter.tags import Tags # noqa from hoomd.filter.type_ import Type # noqa
"""Particle filters. Particle filters describe criteria to select subsets of the particle in the system for use by various operations throughout HOOMD. To maintain high performance, filters are **not** re-evaluated on every use. Instead, each unique particular filter (defined by the class name and hash) is mapped to a...
Add particle filter overview information.
Add particle filter overview information.
Python
bsd-3-clause
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
"""Particle filters.""" from hoomd.filter.filter_ import ParticleFilter # noqa from hoomd.filter.all_ import All # noqa from hoomd.filter.set_ import Intersection, SetDifference, Union # noqa from hoomd.filter.tags import Tags # noqa from hoomd.filter.type_ import Type # noqa Add particle filter overview informat...
"""Particle filters. Particle filters describe criteria to select subsets of the particle in the system for use by various operations throughout HOOMD. To maintain high performance, filters are **not** re-evaluated on every use. Instead, each unique particular filter (defined by the class name and hash) is mapped to a...
<commit_before>"""Particle filters.""" from hoomd.filter.filter_ import ParticleFilter # noqa from hoomd.filter.all_ import All # noqa from hoomd.filter.set_ import Intersection, SetDifference, Union # noqa from hoomd.filter.tags import Tags # noqa from hoomd.filter.type_ import Type # noqa <commit_msg>Add partic...
"""Particle filters. Particle filters describe criteria to select subsets of the particle in the system for use by various operations throughout HOOMD. To maintain high performance, filters are **not** re-evaluated on every use. Instead, each unique particular filter (defined by the class name and hash) is mapped to a...
"""Particle filters.""" from hoomd.filter.filter_ import ParticleFilter # noqa from hoomd.filter.all_ import All # noqa from hoomd.filter.set_ import Intersection, SetDifference, Union # noqa from hoomd.filter.tags import Tags # noqa from hoomd.filter.type_ import Type # noqa Add particle filter overview informat...
<commit_before>"""Particle filters.""" from hoomd.filter.filter_ import ParticleFilter # noqa from hoomd.filter.all_ import All # noqa from hoomd.filter.set_ import Intersection, SetDifference, Union # noqa from hoomd.filter.tags import Tags # noqa from hoomd.filter.type_ import Type # noqa <commit_msg>Add partic...
bb5b84cd71ff95bd2539afce75491139fbc6f066
pi_control_client/gpio.py
pi_control_client/gpio.py
from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url, device_key): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service', device_key=device_key) def on(self, pin_number): return self._call({'pin'...
from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service') def on(self, device_key, pin_number): return self._call(device_key, {'pin': pin_number, 'action':...
Add device_key on every call in GPIO client
Add device_key on every call in GPIO client
Python
mit
HydAu/Projectweekends_Pi-Control-Client,projectweekend/Pi-Control-Client
from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url, device_key): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service', device_key=device_key) def on(self, pin_number): return self._call({'pin'...
from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service') def on(self, device_key, pin_number): return self._call(device_key, {'pin': pin_number, 'action':...
<commit_before>from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url, device_key): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service', device_key=device_key) def on(self, pin_number): return se...
from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service') def on(self, device_key, pin_number): return self._call(device_key, {'pin': pin_number, 'action':...
from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url, device_key): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service', device_key=device_key) def on(self, pin_number): return self._call({'pin'...
<commit_before>from rpc import RPCClient class GPIOClient(RPCClient): def __init__(self, rabbit_url, device_key): super(GPIOClient, self).__init__( rabbit_url=rabbit_url, queue_name='gpio_service', device_key=device_key) def on(self, pin_number): return se...
266027514c740c30c0efae5fcd1e2932f1be9933
perfrunner/tests/ycsb2.py
perfrunner/tests/ycsb2.py
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self): clon...
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self): clon...
Check the number of items a little bit later
Check the number of items a little bit later Due to MB-22749 Change-Id: Icffe46201223efa5645644ca40b99dffe4f0fb31 Reviewed-on: http://review.couchbase.org/76413 Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com> Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
Python
apache-2.0
couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self): clon...
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self): clon...
<commit_before>from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self...
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self): clon...
from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self): clon...
<commit_before>from perfrunner.helpers.cbmonitor import with_stats from perfrunner.helpers.local import clone_ycsb from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task from perfrunner.tests import PerfTest from perfrunner.tests.n1ql import N1QLTest class YCSBTest(PerfTest): def download_ycsb(self...
0445c8a8e82d3ed5c05537b43616a3b94dcf786f
wye/workshops/templatetags/workshop_action_button.py
wye/workshops/templatetags/workshop_action_button.py
from django import template from datetime import datetime from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, WorkshopSt...
from datetime import datetime from django import template from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, Workshop...
Add filter to show button only if selected role tutor
Add filter to show button only if selected role tutor
Python
mit
shankisg/wye,pythonindia/wye,harisibrahimkv/wye,DESHRAJ/wye,harisibrahimkv/wye,harisibrahimkv/wye,shankisg/wye,DESHRAJ/wye,pythonindia/wye,shankisg/wye,DESHRAJ/wye,shankig/wye,pythonindia/wye,DESHRAJ/wye,pythonindia/wye,harisibrahimkv/wye,shankig/wye,shankisg/wye,shankig/wye,shankig/wye
from django import template from datetime import datetime from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, WorkshopSt...
from datetime import datetime from django import template from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, Workshop...
<commit_before>from django import template from datetime import datetime from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, ...
from datetime import datetime from django import template from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, Workshop...
from django import template from datetime import datetime from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, WorkshopSt...
<commit_before>from django import template from datetime import datetime from wye.base.constants import WorkshopStatus register = template.Library() def show_draft_button(workshop, user): if (workshop.status in [WorkshopStatus.REQUESTED, WorkshopStatus.ACCEPTED, ...
65cd9eff50a95d53b75d9bd6a02e56e7a6b6262e
build/fbcode_builder/specs/fbthrift.py
build/fbcode_builder/specs/fbthrift.py
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.rsocket as rsocket import spec...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.fmt as fmt import specs.rsocke...
Migrate from Folly Format to fmt
Migrate from Folly Format to fmt Summary: Migrate from Folly Format to fmt which provides smaller compile times and per-call binary code size. Reviewed By: alandau Differential Revision: D14954926 fbshipit-source-id: 9d2c39e74a5d11e0f90c8ad0d71b79424c56747f
Python
apache-2.0
facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.rsocket as rsocket import spec...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.fmt as fmt import specs.rsocke...
<commit_before>#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.rsocket as rsoc...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.fmt as fmt import specs.rsocke...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.rsocket as rsocket import spec...
<commit_before>#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import specs.folly as folly import specs.fizz as fizz import specs.rsocket as rsoc...
3c1e52ccd329c255649b0ca4e3727f60996f8e34
src/apps/console/views.py
src/apps/console/views.py
from django.shortcuts import render_to_response from account.auth import * ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @dh_login_required def index(request): return render_to_response("console.html", { 'login': get_login(request)})
from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @login_required def index(request): return render_to_response("console.html", { 'login': request.user.username})
Make the console app work with the new user model.
Make the console app work with the new user model.
Python
mit
anantb/datahub,anantb/datahub,anantb/datahub,datahuborg/datahub,anantb/datahub,anantb/datahub,anantb/datahub,RogerTangos/datahub-stub,datahuborg/datahub,datahuborg/datahub,RogerTangos/datahub-stub,datahuborg/datahub,datahuborg/datahub,RogerTangos/datahub-stub,RogerTangos/datahub-stub,datahuborg/datahub,datahuborg/datah...
from django.shortcuts import render_to_response from account.auth import * ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @dh_login_required def index(request): return render_to_response("console.html", { 'login': get_login(request)})Make the console app work with the new user model.
from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @login_required def index(request): return render_to_response("console.html", { 'login': request.user.username})
<commit_before>from django.shortcuts import render_to_response from account.auth import * ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @dh_login_required def index(request): return render_to_response("console.html", { 'login': get_login(request)})<commit_msg>Make the console app work w...
from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @login_required def index(request): return render_to_response("console.html", { 'login': request.user.username})
from django.shortcuts import render_to_response from account.auth import * ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @dh_login_required def index(request): return render_to_response("console.html", { 'login': get_login(request)})Make the console app work with the new user model.from...
<commit_before>from django.shortcuts import render_to_response from account.auth import * ''' @author: Anant Bhardwaj @date: Mar 21, 2013 Datahub Console ''' @dh_login_required def index(request): return render_to_response("console.html", { 'login': get_login(request)})<commit_msg>Make the console app work w...
4cb45f38cc291b2bf909344a0fc68ff94421a26a
alignak_app/locales/__init__.py
alignak_app/locales/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Sof...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Sof...
Fix pep8 missing newline at end of file
Fix pep8 missing newline at end of file
Python
agpl-3.0
Alignak-monitoring-contrib/alignak-app,Alignak-monitoring-contrib/alignak-app
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Sof...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Sof...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Sof...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Sof...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by...
8b9454fdf9e54059edcc951f188c05cb0f34c0a4
lookup_isbn.py
lookup_isbn.py
#!/usr/bin/env python import yaml from amazon.api import AmazonAPI class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_key_id'], self.config['aws_secret_key'], self.config['amazon_associate_tag'] ...
#!/usr/bin/env python import yaml import sys import os from amazon.api import AmazonAPI # Change to script directory os.chdir(os.path.dirname(sys.argv[0])) class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_ke...
Read commandline args as isbns
Read commandline args as isbns
Python
mit
sortelli/book_pivot,sortelli/book_pivot
#!/usr/bin/env python import yaml from amazon.api import AmazonAPI class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_key_id'], self.config['aws_secret_key'], self.config['amazon_associate_tag'] ...
#!/usr/bin/env python import yaml import sys import os from amazon.api import AmazonAPI # Change to script directory os.chdir(os.path.dirname(sys.argv[0])) class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_ke...
<commit_before>#!/usr/bin/env python import yaml from amazon.api import AmazonAPI class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_key_id'], self.config['aws_secret_key'], self.config['amazon_asso...
#!/usr/bin/env python import yaml import sys import os from amazon.api import AmazonAPI # Change to script directory os.chdir(os.path.dirname(sys.argv[0])) class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_ke...
#!/usr/bin/env python import yaml from amazon.api import AmazonAPI class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_key_id'], self.config['aws_secret_key'], self.config['amazon_associate_tag'] ...
<commit_before>#!/usr/bin/env python import yaml from amazon.api import AmazonAPI class Books: def __init__(self, config_file): self.config = yaml.load(open(config_file, 'r')) self.amazon = AmazonAPI( self.config['aws_access_key_id'], self.config['aws_secret_key'], self.config['amazon_asso...
326c249e41e431112ae213c20bf948a7ae351a31
visualisation_display.py
visualisation_display.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n): for i in range(len(images)): plt.subplot(row_n, col_n, i + 1) pixels = meta.vec...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n, vmin=0.0, vmax=1.0, labels=None): for i in range(len(images)): plt.subplot(row_n, col_n,...
Add vmin, vmax and possible labels to display of images
Add vmin, vmax and possible labels to display of images
Python
mit
ivanyu/kaggle-digit-recognizer,ivanyu/kaggle-digit-recognizer,ivanyu/kaggle-digit-recognizer
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n): for i in range(len(images)): plt.subplot(row_n, col_n, i + 1) pixels = meta.vec...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n, vmin=0.0, vmax=1.0, labels=None): for i in range(len(images)): plt.subplot(row_n, col_n,...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n): for i in range(len(images)): plt.subplot(row_n, col_n, i + 1) pi...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n, vmin=0.0, vmax=1.0, labels=None): for i in range(len(images)): plt.subplot(row_n, col_n,...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n): for i in range(len(images)): plt.subplot(row_n, col_n, i + 1) pixels = meta.vec...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from matplotlib import pyplot as plt import meta from meta import data_filename def display(images, row_n, col_n): for i in range(len(images)): plt.subplot(row_n, col_n, i + 1) pi...
bb0b72333b715956740373c3ba80a8193b99a8cc
app/services/updater_service.py
app/services/updater_service.py
from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer) self....
from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer) self....
Add message before running ansible.
Add message before running ansible.
Python
mit
supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer
from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer) self....
from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer) self....
<commit_before>from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer...
from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer) self....
from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer) self....
<commit_before>from app.system.updater import check_updates, do_upgrade, run_ansible from app.views import SimpleBackgroundView from .base import BaseService, BlockingServiceStart class UpdaterService(BaseService, BlockingServiceStart): def __init__(self, observer=None): super().__init__(observer=observer...
d30355ace2c84cad198fd4bfcc3d6a211275fb76
src/ggrc_basic_permissions/roles/AuditorReader.py
src/ggrc_basic_permissions/roles/AuditorReader.py
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the objects requir...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the objects requir...
Add support for reading snapshots for auditor reader
Add support for reading snapshots for auditor reader
Python
apache-2.0
AleksNeStu/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the objects requir...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the objects requir...
<commit_before># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the o...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the objects requir...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the objects requir...
<commit_before># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> scope = "System Implied" description = """ A user with Auditor role for a program audit will also have this role in the default object context so that the auditor will have access to the o...
114eae527cce97423ec5cc5896a4728dc0764d2c
chunsabot/modules/images.py
chunsabot/modules/images.py
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
Fix some confusion of creating folders
Fix some confusion of creating folders
Python
mit
susemeee/Chunsabot-framework
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
<commit_before>import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size=12, chars=stri...
<commit_before>import os import json import shutil import subprocess import string import random from chunsabot.database import Database from chunsabot.botlogic import brain RNN_PATH = Database.load_config('rnn_library_path') MODEL_PATH = os.path.join(RNN_PATH, "models/checkpoint_v1.t7_cpu.t7") def id_generator(size...
dacd02835137a8729d326b0be549b8107ba59c25
ci/generate_pipeline_yml.py
ci/generate_pipeline_yml.py
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1_12', '2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = T...
#!/usr/bin/env python import os from jinja2 import Template clusters = ['2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(...
Remove PCF 1.12 from CI.
Remove PCF 1.12 from CI.
Python
apache-2.0
cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1_12', '2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = T...
#!/usr/bin/env python import os from jinja2 import Template clusters = ['2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(...
<commit_before>#!/usr/bin/env python import os from jinja2 import Template clusters = ['1_12', '2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r'...
#!/usr/bin/env python import os from jinja2 import Template clusters = ['2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(...
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1_12', '2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = T...
<commit_before>#!/usr/bin/env python import os from jinja2 import Template clusters = ['1_12', '2_0', '2_1', '2_2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r'...
1f4349e20a98e622124c1e5bc121053e4775152f
login/signals.py
login/signals.py
from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth.models import User, Group from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, ...
from django.db.models.signals import post_save, m2m_changed from django.dispatch import receiver from django.contrib.auth.models import User, Group from login.permissions import cache_clear from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=Us...
Add signal to invalidate cache when groups change.
Add signal to invalidate cache when groups change.
Python
bsd-3-clause
EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient
from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth.models import User, Group from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, ...
from django.db.models.signals import post_save, m2m_changed from django.dispatch import receiver from django.contrib.auth.models import User, Group from login.permissions import cache_clear from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=Us...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth.models import User, Group from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=User) def create_user_profile(sender, inst...
from django.db.models.signals import post_save, m2m_changed from django.dispatch import receiver from django.contrib.auth.models import User, Group from login.permissions import cache_clear from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=Us...
from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth.models import User, Group from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, ...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth.models import User, Group from .models import UserProfile, GroupProfile # Add signal to automatically extend user profile @receiver(post_save, sender=User) def create_user_profile(sender, inst...
48455d0d1b8632d6b512e257d6dd914defd7ae84
px/px_process_test.py
px/px_process_test.py
import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" test_me = px_process.Px...
import getpass import os import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" ...
Add (failing) test for getting all processes
Add (failing) test for getting all processes
Python
mit
walles/px,walles/px
import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" test_me = px_process.Px...
import getpass import os import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" ...
<commit_before>import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" test_me ...
import getpass import os import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" ...
import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" test_me = px_process.Px...
<commit_before>import px_process def test_create_process(): process_builder = px_process.PxProcessBuilder() process_builder.pid = 7 process_builder.username = "usernamex" process_builder.cpu_time = 1.3 process_builder.memory_percent = 42.7 process_builder.cmdline = "hej kontinent" test_me ...
7352a257a08ad4d41261dd0c1076cde966d2a5c2
sharer/multi.py
sharer/multi.py
from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] = val def ...
from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] = val def ...
Add _services keyword argument to MultiSharer's send.
Add _services keyword argument to MultiSharer's send.
Python
mit
FelixLoether/python-sharer
from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] = val def ...
from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] = val def ...
<commit_before>from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] ...
from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] = val def ...
from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] = val def ...
<commit_before>from .base import AbstractSharer class MultiSharer(AbstractSharer): def __init__(self, **kw): super(MultiSharer, self).__init__() self.sharers = {} self.add_sharers(**kw) def add_sharers(self, **kw): for key, val in kw.iteritems(): self.sharers[key] ...
7209e44f913d2f28f94bb4d67ba875ff635261d2
myhdl/_compat.py
myhdl/_compat.py
import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_types = (type,) from io import StringIO import builtins def...
from __future__ import print_function from __future__ import division import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_typ...
Revert "Remove the __future__ flags"
Revert "Remove the __future__ flags" This reverts commit 24b3332ca0c0005483d5f310604cca984efd1ce9.
Python
lgpl-2.1
jmgc/myhdl-numeric,jmgc/myhdl-numeric,jmgc/myhdl-numeric
import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_types = (type,) from io import StringIO import builtins def...
from __future__ import print_function from __future__ import division import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_typ...
<commit_before>import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_types = (type,) from io import StringIO import bu...
from __future__ import print_function from __future__ import division import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_typ...
import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_types = (type,) from io import StringIO import builtins def...
<commit_before>import sys import types from ast import PyCF_ONLY_AST PY2 = sys.version_info[0] == 2 PYPY = hasattr(sys, 'pypy_translation_info') _identity = lambda x: x if not PY2: string_types = (str,) integer_types = (int,) long = int class_types = (type,) from io import StringIO import bu...
c769b66c546ad3fd9d04c0607506a49e9d3bff4a
fortdepend/preprocessor.py
fortdepend/preprocessor.py
import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super().__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f.readlines() re...
import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super(pcpp.Preprocessor, self).__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f...
Fix super() call for py2.7
Fix super() call for py2.7
Python
mit
ZedThree/fort_depend.py,ZedThree/fort_depend.py
import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super().__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f.readlines() re...
import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super(pcpp.Preprocessor, self).__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f...
<commit_before>import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super().__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f.readlin...
import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super(pcpp.Preprocessor, self).__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f...
import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super().__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f.readlines() re...
<commit_before>import io import pcpp class FortranPreprocessor(pcpp.Preprocessor): def __init__(self): super().__init__() def parse_to_string_lines(self, text): with io.StringIO() as f: self.parse(text) self.write(f) f.seek(0) result = f.readlin...
83c52f6a294b69e48d455f9037be088420d4cfa8
selectable/__init__.py
selectable/__init__.py
""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version_info__ = { 'major': 0, 'minor': 5, 'micro': 2, 'releaselevel': 'final', } def get_version(): """ Return the formatted version information ...
""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version__ = '0.6.0dev'
Simplify version string and update to reflect current status.
Simplify version string and update to reflect current status.
Python
bsd-2-clause
mlavin/django-selectable,affan2/django-selectable,affan2/django-selectable,affan2/django-selectable,mlavin/django-selectable,makinacorpus/django-selectable,mlavin/django-selectable,makinacorpus/django-selectable
""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version_info__ = { 'major': 0, 'minor': 5, 'micro': 2, 'releaselevel': 'final', } def get_version(): """ Return the formatted version information ...
""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version__ = '0.6.0dev'
<commit_before>""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version_info__ = { 'major': 0, 'minor': 5, 'micro': 2, 'releaselevel': 'final', } def get_version(): """ Return the formatted version i...
""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version__ = '0.6.0dev'
""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version_info__ = { 'major': 0, 'minor': 5, 'micro': 2, 'releaselevel': 'final', } def get_version(): """ Return the formatted version information ...
<commit_before>""" django-selectable is a collection of tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI. """ __version_info__ = { 'major': 0, 'minor': 5, 'micro': 2, 'releaselevel': 'final', } def get_version(): """ Return the formatted version i...
394e3ffd4221a749bcc8df7d11da2f3bc3ace5f9
getalltext.py
getalltext.py
#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json chatlog file to ...
#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json chatlog file to ...
Add option to remove newlines; remove bug on messages sent by someone without a username
Add option to remove newlines; remove bug on messages sent by someone without a username
Python
mit
expectocode/telegram-analysis,expectocode/telegramAnalysis
#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json chatlog file to ...
#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json chatlog file to ...
<commit_before>#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json c...
#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json chatlog file to ...
#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json chatlog file to ...
<commit_before>#!/usr/bin/env python3 """ A program to extract raw text from Telegram chat log """ import argparse from json import loads def main(): parser = argparse.ArgumentParser( description="Extract all raw text from a specific Telegram chat") parser.add_argument('filepath', help='the json c...
a1da5e7171a03f98612395f90766c7d4adf1dd61
zinnia_twitter/management/commands/get_twitter_access.py
zinnia_twitter/management/commands/get_twitter_access.py
""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the step 3 of the ...
""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the step 3 of the ...
Fix an error accessing the twitter returned auth object
Fix an error accessing the twitter returned auth object
Python
bsd-3-clause
django-blog-zinnia/zinnia-twitter
""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the step 3 of the ...
""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the step 3 of the ...
<commit_before>""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the ...
""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the step 3 of the ...
""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the step 3 of the ...
<commit_before>""" Command for getting the Twitter oauth access. http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth/ """ from django.core.management.base import NoArgsCommand import tweepy class Command(NoArgsCommand): """ This is an implementation of script showed in the ...
eea1ba0273b8e5362f6b27854e29e6053555fb2a
gittip/cli.py
gittip/cli.py
"""This is installed as `payday`. """ from gittip import wireup def payday(): db = wireup.db() wireup.billing() wireup.nanswers() # Lazily import the billing module. # ================================= # This dodges a problem where db in billing is None if we import it from # gittip befo...
"""This is installed as `payday`. """ import os from gittip import wireup def payday(): # Wire things up. # =============== # Manually override max db connections so that we only have one connection. # Our db access is serialized right now anyway, and with only one # connection it's easier to tru...
Configure payday for no db timeout
Configure payday for no db timeout
Python
mit
mccolgst/www.gittip.com,studio666/gratipay.com,studio666/gratipay.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,eXcomm/...
"""This is installed as `payday`. """ from gittip import wireup def payday(): db = wireup.db() wireup.billing() wireup.nanswers() # Lazily import the billing module. # ================================= # This dodges a problem where db in billing is None if we import it from # gittip befo...
"""This is installed as `payday`. """ import os from gittip import wireup def payday(): # Wire things up. # =============== # Manually override max db connections so that we only have one connection. # Our db access is serialized right now anyway, and with only one # connection it's easier to tru...
<commit_before>"""This is installed as `payday`. """ from gittip import wireup def payday(): db = wireup.db() wireup.billing() wireup.nanswers() # Lazily import the billing module. # ================================= # This dodges a problem where db in billing is None if we import it from ...
"""This is installed as `payday`. """ import os from gittip import wireup def payday(): # Wire things up. # =============== # Manually override max db connections so that we only have one connection. # Our db access is serialized right now anyway, and with only one # connection it's easier to tru...
"""This is installed as `payday`. """ from gittip import wireup def payday(): db = wireup.db() wireup.billing() wireup.nanswers() # Lazily import the billing module. # ================================= # This dodges a problem where db in billing is None if we import it from # gittip befo...
<commit_before>"""This is installed as `payday`. """ from gittip import wireup def payday(): db = wireup.db() wireup.billing() wireup.nanswers() # Lazily import the billing module. # ================================= # This dodges a problem where db in billing is None if we import it from ...
191e62a2547c4d3d013cb4c68fed60f1619fe82c
pyheufybot/modules/say.py
pyheufybot/modules/say.py
from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say" self.moduleType = ModuleType.COMMAND self.modulePriotity = ModulePriority.NORMAL sel...
from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say|sayremote" self.moduleType = ModuleType.COMMAND self.modulePriority = ModulePriority.NORMAL ...
Add a remote option to Say
Add a remote option to Say
Python
mit
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say" self.moduleType = ModuleType.COMMAND self.modulePriotity = ModulePriority.NORMAL sel...
from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say|sayremote" self.moduleType = ModuleType.COMMAND self.modulePriority = ModulePriority.NORMAL ...
<commit_before>from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say" self.moduleType = ModuleType.COMMAND self.modulePriotity = ModulePriority.NOR...
from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say|sayremote" self.moduleType = ModuleType.COMMAND self.modulePriority = ModulePriority.NORMAL ...
from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say" self.moduleType = ModuleType.COMMAND self.modulePriotity = ModulePriority.NORMAL sel...
<commit_before>from pyheufybot.module_interface import Module, ModulePriority, ModuleType class ModuleSpawner(Module): def __init__(self, bot): self.bot = bot self.name = "Say" self.trigger = "say" self.moduleType = ModuleType.COMMAND self.modulePriotity = ModulePriority.NOR...
f80cbe4b962fc9dd6341e9a59848238f5d7dee5e
src/sas/qtgui/MainWindow/UnitTesting/WelcomePanelTest.py
src/sas/qtgui/MainWindow/UnitTesting/WelcomePanelTest.py
import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' w = WelcomePane...
import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' w = WelcomePane...
Fix test for change in panel text
Fix test for change in panel text
Python
bsd-3-clause
SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview
import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' w = WelcomePane...
import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' w = WelcomePane...
<commit_before>import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' ...
import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' w = WelcomePane...
import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' w = WelcomePane...
<commit_before>import sys import pytest from PyQt5 import QtGui, QtWidgets # Local from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel class WelcomePanelTest: '''Test the WelcomePanel''' @pytest.fixture(autouse=True) def widget(self, qapp): '''Create/Destroy the WelcomePanel''' ...
78032531e9fe1ab99f6c0e021250754fe5375ab9
src/zeit/content/article/edit/browser/tests/test_sync.py
src/zeit/content/article/edit/browser/tests/test_sync.py
import zeit.content.article.edit.browser.testing class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER def setUp(self): ...
import zeit.content.article.edit.browser.testing import time class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER def s...
Fix test that may break with DOM element no longer attached, since the DOM element in question is reloaded.
Fix test that may break with DOM element no longer attached, since the DOM element in question is reloaded.
Python
bsd-3-clause
ZeitOnline/zeit.content.article,ZeitOnline/zeit.content.article,ZeitOnline/zeit.content.article
import zeit.content.article.edit.browser.testing class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER def setUp(self): ...
import zeit.content.article.edit.browser.testing import time class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER def s...
<commit_before>import zeit.content.article.edit.browser.testing class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER de...
import zeit.content.article.edit.browser.testing import time class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER def s...
import zeit.content.article.edit.browser.testing class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER def setUp(self): ...
<commit_before>import zeit.content.article.edit.browser.testing class Supertitle(zeit.content.article.edit.browser.testing.EditorTestCase): supertitle = 'article-content-head.supertitle' teaser_supertitle = 'teaser-supertitle.teaserSupertitle' layer = zeit.content.article.testing.WEBDRIVER_LAYER de...
ee1aea5ab2002f14fbf0191e3e1a94988fcb7e08
guetzli_img_compression.py
guetzli_img_compression.py
# -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): filename = os.path.split(img_file)[1] url_out = os.path.join(source, '-'+filename) subprocess.call(['guetzli', '--quality', '84', '--verbose', img_file, url_out]) #####...
# -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): file = os.path.split(img_file)[1] filename = os.path.splitext(file)[0] suffix = os.path.splitext(file)[1] url_out = os.path.join(source, filename + '_mini' + suffi...
Update the output file name
Update the output file name
Python
mit
JonyFang/guetzli-img-compression
# -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): filename = os.path.split(img_file)[1] url_out = os.path.join(source, '-'+filename) subprocess.call(['guetzli', '--quality', '84', '--verbose', img_file, url_out]) #####...
# -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): file = os.path.split(img_file)[1] filename = os.path.splitext(file)[0] suffix = os.path.splitext(file)[1] url_out = os.path.join(source, filename + '_mini' + suffi...
<commit_before># -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): filename = os.path.split(img_file)[1] url_out = os.path.join(source, '-'+filename) subprocess.call(['guetzli', '--quality', '84', '--verbose', img_file, ...
# -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): file = os.path.split(img_file)[1] filename = os.path.splitext(file)[0] suffix = os.path.splitext(file)[1] url_out = os.path.join(source, filename + '_mini' + suffi...
# -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): filename = os.path.split(img_file)[1] url_out = os.path.join(source, '-'+filename) subprocess.call(['guetzli', '--quality', '84', '--verbose', img_file, url_out]) #####...
<commit_before># -*- coding:utf-8 -*- import os import subprocess import sys source = sys.argv[1] TYPES = ('.jpeg', '.png', '.jpg') def convert_a_img(img_file): filename = os.path.split(img_file)[1] url_out = os.path.join(source, '-'+filename) subprocess.call(['guetzli', '--quality', '84', '--verbose', img_file, ...
8c88da640f2fab19254e96a144461f2c65aff720
wagtailstartproject/project_template/tests/middleware.py
wagtailstartproject/project_template/tests/middleware.py
try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ def process_r...
try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ def process_r...
Reset Content-Length after changing the length of the response
Reset Content-Length after changing the length of the response
Python
mit
leukeleu/wagtail-startproject,leukeleu/wagtail-startproject
try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ def process_r...
try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ def process_r...
<commit_before>try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ ...
try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ def process_r...
try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ def process_r...
<commit_before>try: from django.utils.deprecation import MiddlewareMixin except ImportError: MiddlewareMixin = object class PageStatusMiddleware(MiddlewareMixin): """Add the response status code as a meta tag in the head of all pages Note: Only enable this middleware for (Selenium) tests """ ...
ae4e4dc7f00afbd1d93b43bf5d383139891d5596
hoover/search/ratelimit.py
hoover/search/ratelimit.py
from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( "Rate li...
from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( "Rate li...
Fix `is_anonymous` for Django 2
Fix `is_anonymous` for Django 2
Python
mit
hoover/search,hoover/search,hoover/search
from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( "Rate li...
from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( "Rate li...
<commit_before>from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( ...
from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( "Rate li...
from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( "Rate li...
<commit_before>from django.conf import settings if settings.HOOVER_RATELIMIT_USER: from django.http import HttpResponse from . import signals from hoover.contrib.ratelimit.limit import RateLimit class HttpLimitExceeded(HttpResponse): def __init__(self): super().__init__( ...
a10c7ed55151533a647332c6b910b3724d5b3af1
il2fb/ds/airbridge/json.py
il2fb/ds/airbridge/json.py
# -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): if hasattr(obj, 'to_primitive'): cls = obj.__class__ result = obj.to...
# -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event from il2fb.ds.airbridge.structures import TimestampedData __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): cls = type(obj) if issubc...
Update custom JSONEncoder to treat TimestampedData as dict
Update custom JSONEncoder to treat TimestampedData as dict
Python
mit
IL2HorusTeam/il2fb-ds-airbridge
# -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): if hasattr(obj, 'to_primitive'): cls = obj.__class__ result = obj.to...
# -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event from il2fb.ds.airbridge.structures import TimestampedData __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): cls = type(obj) if issubc...
<commit_before># -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): if hasattr(obj, 'to_primitive'): cls = obj.__class__ ...
# -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event from il2fb.ds.airbridge.structures import TimestampedData __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): cls = type(obj) if issubc...
# -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): if hasattr(obj, 'to_primitive'): cls = obj.__class__ result = obj.to...
<commit_before># -*- coding: utf-8 -*- import json as _json from functools import partial from il2fb.commons.events import Event __all__ = ('dumps', 'loads', ) class JSONEncoder(_json.JSONEncoder): def default(self, obj): if hasattr(obj, 'to_primitive'): cls = obj.__class__ ...
2b1dadb57cce89f12e825dc24a2136fe27a8d0db
cattr/function_dispatch.py
cattr/function_dispatch.py
import attr @attr.s(slots=True) class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispatch should be i...
from ._compat import lru_cache class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispatch should be in...
Use lru_cache instead of a dict cache in FunctionDispatch
Use lru_cache instead of a dict cache in FunctionDispatch This has no affect on the microbenchmark, but seems appropriate for consistency with the previous commit.
Python
mit
python-attrs/cattrs,Tinche/cattrs
import attr @attr.s(slots=True) class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispatch should be i...
from ._compat import lru_cache class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispatch should be in...
<commit_before>import attr @attr.s(slots=True) class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispa...
from ._compat import lru_cache class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispatch should be in...
import attr @attr.s(slots=True) class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispatch should be i...
<commit_before>import attr @attr.s(slots=True) class FunctionDispatch(object): """ FunctionDispatch is similar to functools.singledispatch, but instead dispatches based on functions that take the type of the first argument in the method, and return True or False. objects that help determine dispa...
99360f7b128c2691763c283406f3758db69d8bca
serrano/formatters.py
serrano/formatters.py
from django.template import defaultfilters as filters from avocado.formatters import Formatter, registry class HTMLFormatter(Formatter): def to_html(self, values, fields=None, **context): toks = [] for value in values.values(): if value is None: continue if ...
from django.template import defaultfilters as filters from avocado.formatters import Formatter class HTMLFormatter(Formatter): delimiter = u' ' html_map = { None: '<em>n/a</em>' } def to_html(self, values, **context): toks = [] for value in values.values(): # Chec...
Add `delimiter` and `html_map` to HTML formatter and do not register it by default
Add `delimiter` and `html_map` to HTML formatter and do not register it by default
Python
bsd-2-clause
rv816/serrano_night,chop-dbhi/serrano,rv816/serrano_night,chop-dbhi/serrano
from django.template import defaultfilters as filters from avocado.formatters import Formatter, registry class HTMLFormatter(Formatter): def to_html(self, values, fields=None, **context): toks = [] for value in values.values(): if value is None: continue if ...
from django.template import defaultfilters as filters from avocado.formatters import Formatter class HTMLFormatter(Formatter): delimiter = u' ' html_map = { None: '<em>n/a</em>' } def to_html(self, values, **context): toks = [] for value in values.values(): # Chec...
<commit_before>from django.template import defaultfilters as filters from avocado.formatters import Formatter, registry class HTMLFormatter(Formatter): def to_html(self, values, fields=None, **context): toks = [] for value in values.values(): if value is None: continue ...
from django.template import defaultfilters as filters from avocado.formatters import Formatter class HTMLFormatter(Formatter): delimiter = u' ' html_map = { None: '<em>n/a</em>' } def to_html(self, values, **context): toks = [] for value in values.values(): # Chec...
from django.template import defaultfilters as filters from avocado.formatters import Formatter, registry class HTMLFormatter(Formatter): def to_html(self, values, fields=None, **context): toks = [] for value in values.values(): if value is None: continue if ...
<commit_before>from django.template import defaultfilters as filters from avocado.formatters import Formatter, registry class HTMLFormatter(Formatter): def to_html(self, values, fields=None, **context): toks = [] for value in values.values(): if value is None: continue ...
561060423d0979e51b92a7209482e76680734d51
dallinger/dev_server/app.py
dallinger/dev_server/app.py
import codecs import os import gevent.monkey from dallinger.experiment_server.experiment_server import app gevent.monkey.patch_all() app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii")
import codecs import os import gevent.monkey gevent.monkey.patch_all() # Patch before importing app and all its dependencies from dallinger.experiment_server.experiment_server import app # noqa: E402 app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex"...
Apply gevent patch earlier based on output of `flask run`
Apply gevent patch earlier based on output of `flask run`
Python
mit
Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger
import codecs import os import gevent.monkey from dallinger.experiment_server.experiment_server import app gevent.monkey.patch_all() app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii") Apply gevent patch earlier based on output of `flas...
import codecs import os import gevent.monkey gevent.monkey.patch_all() # Patch before importing app and all its dependencies from dallinger.experiment_server.experiment_server import app # noqa: E402 app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex"...
<commit_before>import codecs import os import gevent.monkey from dallinger.experiment_server.experiment_server import app gevent.monkey.patch_all() app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii") <commit_msg>Apply gevent patch earli...
import codecs import os import gevent.monkey gevent.monkey.patch_all() # Patch before importing app and all its dependencies from dallinger.experiment_server.experiment_server import app # noqa: E402 app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex"...
import codecs import os import gevent.monkey from dallinger.experiment_server.experiment_server import app gevent.monkey.patch_all() app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii") Apply gevent patch earlier based on output of `flas...
<commit_before>import codecs import os import gevent.monkey from dallinger.experiment_server.experiment_server import app gevent.monkey.patch_all() app.config["EXPLAIN_TEMPLATE_LOADING"] = True os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii") <commit_msg>Apply gevent patch earli...
4dca51fe6cd976c0312156ab32f787cecbb765a2
task_router/tests/test_views.py
task_router/tests/test_views.py
from django.test import TestCase, Client class HomePageTest(TestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is a class-based view, so we can mostly rely on Django's own # tests...
from xmlunittest import XmlTestCase from django.test import TestCase, Client from unittest import skip class HomePageTest(TestCase, XmlTestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is...
Add test for test incoming call
Add test for test incoming call
Python
mit
TwilioDevEd/task-router-django,TwilioDevEd/task-router-django,TwilioDevEd/task-router-django
from django.test import TestCase, Client class HomePageTest(TestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is a class-based view, so we can mostly rely on Django's own # tests...
from xmlunittest import XmlTestCase from django.test import TestCase, Client from unittest import skip class HomePageTest(TestCase, XmlTestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is...
<commit_before>from django.test import TestCase, Client class HomePageTest(TestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is a class-based view, so we can mostly rely on Django's own ...
from xmlunittest import XmlTestCase from django.test import TestCase, Client from unittest import skip class HomePageTest(TestCase, XmlTestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is...
from django.test import TestCase, Client class HomePageTest(TestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is a class-based view, so we can mostly rely on Django's own # tests...
<commit_before>from django.test import TestCase, Client class HomePageTest(TestCase): def setUp(self): self.client = Client() def test_home_page(self): # Act response = self.client.get('/') # Assert # This is a class-based view, so we can mostly rely on Django's own ...
67b681697ebd3c1ea1ebda335c098e628da60b58
cinder/tests/test_test_utils.py
cinder/tests/test_test_utils.py
# # Copyright 2010 OpenStack Foundation # # 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...
# # Copyright 2010 OpenStack Foundation # # 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...
Verify the full interface of the context object
Verify the full interface of the context object Improved testcase for get_test_admin_context method Change-Id: I8c99401150ed41cbf66b32cd00c7f8353ec4e267
Python
apache-2.0
Nexenta/cinder,nikesh-mahalka/cinder,eharney/cinder,NetApp/cinder,abusse/cinder,CloudServer/cinder,saeki-masaki/cinder,phenoxim/cinder,Accelerite/cinder,dims/cinder,takeshineshiro/cinder,NetApp/cinder,manojhirway/ExistingImagesOnNFS,Akrog/cinder,Hybrid-Cloud/cinder,scottdangelo/RemoveVolumeMangerLocks,mahak/cinder,mano...
# # Copyright 2010 OpenStack Foundation # # 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...
# # Copyright 2010 OpenStack Foundation # # 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...
<commit_before># # Copyright 2010 OpenStack Foundation # # 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 require...
# # Copyright 2010 OpenStack Foundation # # 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...
# # Copyright 2010 OpenStack Foundation # # 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...
<commit_before># # Copyright 2010 OpenStack Foundation # # 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 require...
6fb0db3cd83bc91f683fd31f0b25f59473970790
package_name/__meta__.py
package_name/__meta__.py
name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project homepage license = ...
name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.dev0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project homepage license ...
Make default version number be a dev version
MAINT: Make default version number be a dev version
Python
mit
scottclowe/python-continuous-integration,scottclowe/python-ci,scottclowe/python-continuous-integration,scottclowe/python-ci
name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project homepage license = ...
name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.dev0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project homepage license ...
<commit_before>name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project home...
name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.dev0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project homepage license ...
name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project homepage license = ...
<commit_before>name = 'package-name' # See https://www.python.org/dev/peps/pep-0008/ path = name.lower().replace("-", "_").replace(" ", "_") version = '0.1.0' # https://python.org/dev/peps/pep-0440 https://semver.org author = 'Author Name' author_email = '' description = '' # One-liner url = '' # your project home...
05acf13b46a3515d5a1362515984b42115b01ca3
clone_everything/github.py
clone_everything/github.py
import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REGEX.match(url) ...
import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REGEX.match(url) ...
Add user agent to GitHub cloning
Add user agent to GitHub cloning
Python
mit
tomleese/clone-everything,thomasleese/clone-everything
import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REGEX.match(url) ...
import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REGEX.match(url) ...
<commit_before>import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REG...
import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REGEX.match(url) ...
import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REGEX.match(url) ...
<commit_before>import re import requests URL_REGEX = re.compile(r'https?://(?:www.)?github.com/(?P<account>[^\s]+)') def matches_url(url): """Check with a URL matches a GitHub account URL.""" return bool(URL_REGEX.match(url)) def get_repos(url): """Get a list of repo clone URLs.""" match = URL_REG...
6aee57bbad3d443e0ff7117a04c4587561795632
tests/query_test/test_decimal_queries.py
tests/query_test/test_decimal_queries.py
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
Update decimal tests to only run on text/none.
Update decimal tests to only run on text/none. Change-Id: I9a35f9e1687171fc3f06c17516bca2ea4b9af9e1 Reviewed-on: http://gerrit.ent.cloudera.com:8080/2217 Tested-by: jenkins Reviewed-by: Ishaan Joshi <d1d1e60202ec9f2503deb1b724986485a125d802@cloudera.com> Reviewed-on: http://gerrit.ent.cloudera.com:8080/2431 Reviewed-b...
Python
apache-2.0
gerashegalov/Impala,cgvarela/Impala,placrosse/ImpalaToGo,caseyching/Impala,ImpalaToGo/ImpalaToGo,placrosse/ImpalaToGo,bratatidas9/Impala-1,ImpalaToGo/ImpalaToGo,kapilrastogi/Impala,bratatidas9/Impala-1,placrosse/ImpalaToGo,caseyching/Impala,ibmsoe/ImpalaPPC,kapilrastogi/Impala,XiaominZhang/Impala,lnliuxing/Impala,Xiaom...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SI...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SIZES = [0, 1] ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Targeted tests for decimal type. # import logging import pytest from copy import copy from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestDecimalQueries(ImpalaTestSuite): BATCH_SI...
65731fff94cd18a0d196c463b5e2aee444027d77
salt/utils/pycrypto.py
salt/utils/pycrypto.py
# -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re def secure_password(length=20): ''' Generate a secure...
# -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re import salt.exceptions def secure_password(length=20): ''...
Add algorithm argument to get_hash
Add algorithm argument to get_hash
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re def secure_password(length=20): ''' Generate a secure...
# -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re import salt.exceptions def secure_password(length=20): ''...
<commit_before> # -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re def secure_password(length=20): ''' Ge...
# -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re import salt.exceptions def secure_password(length=20): ''...
# -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re def secure_password(length=20): ''' Generate a secure...
<commit_before> # -*- coding: utf-8 -*- ''' Use pycrypto to generate random passwords on the fly. ''' # Import python libraries try: import Crypto.Random # pylint: disable=E0611 HAS_RANDOM = True except ImportError: HAS_RANDOM = False import crypt import re def secure_password(length=20): ''' Ge...
6c12f97bfed8b8a4749f75e1a508caf0ea310423
docker/update-production.py
docker/update-production.py
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_output(['tutum',...
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_output(['tutum',...
Make sure to update correct load balancer
Make sure to update correct load balancer
Python
mit
muzhack/musitechhub,muzhack/musitechhub,muzhack/muzhack,muzhack/muzhack,muzhack/musitechhub,muzhack/muzhack,muzhack/musitechhub,muzhack/muzhack
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_output(['tutum',...
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_output(['tutum',...
<commit_before>#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_o...
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_output(['tutum',...
#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_output(['tutum',...
<commit_before>#!/usr/bin/env python3 import argparse import subprocess import json import sys parser = argparse.ArgumentParser() args = parser.parse_args() def info(msg): sys.stdout.write('* {}\n'.format(msg)) sys.stdout.flush() info('Determining current production details...') output = subprocess.check_o...
87c32abc97bc6a2a1cfc41eb9557d721619a33b5
django_auth_kerberos/backends.py
django_auth_kerberos/backends.py
import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for password checking. ...
import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for password checking. ...
Create unknown users, when authenticated successfully
Create unknown users, when authenticated successfully
Python
mit
mkesper/django-auth-kerberos,02strich/django-auth-kerberos
import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for password checking. ...
import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for password checking. ...
<commit_before>import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for passwo...
import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for password checking. ...
import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for password checking. ...
<commit_before>import kerberos import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend logger = logging.getLogger(__name__) class KrbBackend(ModelBackend): """ Django Authentication backend using Kerberos for passwo...
98581828a9e82ff7ebae6abdb4f2c497f22441d1
trex/urls.py
trex/urls.py
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
Use api/1/ as url prefix for all REST interfaces
Use api/1/ as url prefix for all REST interfaces This allows separating the "normal" web code from the rest api.
Python
mit
bjoernricks/trex,bjoernricks/trex
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
<commit_before># -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^adm...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
<commit_before># -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^adm...
2dba75be67e07a98fb2b7093e0d0d2771fd7146f
satchmo/apps/payment/modules/giftcertificate/processor.py
satchmo/apps/payment/modules/giftcertificate/processor.py
""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, settings): ...
""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, settings): ...
Fix the gift certificate module so that an invalid code won't throw an exception.
Fix the gift certificate module so that an invalid code won't throw an exception.
Python
bsd-3-clause
grengojbo/satchmo,grengojbo/satchmo
""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, settings): ...
""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, settings): ...
<commit_before>""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, set...
""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, settings): ...
""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, settings): ...
<commit_before>""" GiftCertificate processor """ from django.utils.translation import ugettext as _ from l10n.utils import moneyfmt from models import GiftCertificate from payment.modules.base import BasePaymentProcessor, ProcessorResult, NOTSET class PaymentProcessor(BasePaymentProcessor): def __init__(self, set...
5f40ac5ef2b42052bdc7c3cfcf662ca4614032ca
scripts/get_python_lib.py
scripts/get_python_lib.py
import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, this script could be replaced by: # # from distutils...
import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, most of this script could be replaced by: # # from d...
Add note about virtualenv support
Add note about virtualenv support
Python
agpl-3.0
rTreutlein/atomspace,rTreutlein/atomspace,rTreutlein/atomspace,rTreutlein/atomspace,AmeBel/atomspace,AmeBel/atomspace,AmeBel/atomspace,rTreutlein/atomspace,AmeBel/atomspace,AmeBel/atomspace
import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, this script could be replaced by: # # from distutils...
import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, most of this script could be replaced by: # # from d...
<commit_before>import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, this script could be replaced by: # #...
import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, most of this script could be replaced by: # # from d...
import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, this script could be replaced by: # # from distutils...
<commit_before>import sys import sysconfig import site if __name__ == '__main__': # This is a hack due to the distutils in debian/ubuntu's python3 being misconfigured # see discussion https://github.com/opencog/atomspace/issues/1782 # # If the bug is fixed, this script could be replaced by: # #...
46cec51fa3b81da21662da5d36ccaf1f409caaea
gem/personalise/templatetags/personalise_extras.py
gem/personalise/templatetags/personalise_extras.py
from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_segments() us...
from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_segments() us...
Fix error when displaying other types of surveys
Fix error when displaying other types of surveys
Python
bsd-2-clause
praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem
from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_segments() us...
from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_segments() us...
<commit_before>from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_se...
from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_segments() us...
from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_segments() us...
<commit_before>from django import template from wagtail_personalisation.adapters import get_segment_adapter register = template.Library() @register.simple_tag def filter_surveys_by_segments(surveys, request): """Filter out surveys not in user's segments.""" user_segments = get_segment_adapter(request).get_se...
780dc99953060113f793c1a0da7058efe8f194fc
kokki/cookbooks/aws/recipes/default.py
kokki/cookbooks/aws/recipes/default.py
import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zone, dev...
import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zone, dev...
Revert that last change.. and do a proper fix
Revert that last change.. and do a proper fix
Python
bsd-3-clause
samuel/kokki
import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zone, dev...
import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zone, dev...
<commit_before> import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zo...
import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zone, dev...
import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zone, dev...
<commit_before> import os from kokki import * env.include_recipe("boto") # Mount volumes and format is necessary for vol in env.config.aws.volumes: env.cookbooks.aws.EBSVolume(vol.get('name') or vol['volume_id'], volume_id = vol.get('volume_id'), availability_zone = env.config.aws.availability_zo...
ee629fca605b27ee6f34c8fa7584f670ae60b121
whylog/constraints/constraint_manager.py
whylog/constraints/constraint_manager.py
from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'different': Differen...
from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'different': Differen...
Add constraint from name method
Add constraint from name method
Python
bsd-3-clause
epawlowska/whylog,kgromadzki/whylog,kgromadzki/whylog,konefalg/whylog,9livesdata/whylog,konefalg/whylog,andrzejgorski/whylog,epawlowska/whylog,9livesdata/whylog,andrzejgorski/whylog
from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'different': Differen...
from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'different': Differen...
<commit_before>from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'diffe...
from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'different': Differen...
from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'different': Differen...
<commit_before>from whylog.constraints import DifferentConstraint, IdenticalConstraint, TimeConstraint from whylog.constraints.exceptions import UnsupportedConstraintTypeError class ConstraintRegistry(object): CONSTRAINTS = { 'identical': IdenticalConstraint, 'time': TimeConstraint, 'diffe...
6fa6090189e405e57db19b3a77f2adb46aef1242
create_english_superset.py
create_english_superset.py
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename in os.listdir(fu...
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename in os.listdir(fu...
Refactor create english superset code to create english superset dictionaries in batches of 10K. Also re-include untranslated words.
Refactor create english superset code to create english superset dictionaries in batches of 10K. Also re-include untranslated words.
Python
mit
brendandc/multilingual-google-image-scraper
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename in os.listdir(fu...
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename in os.listdir(fu...
<commit_before>import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename i...
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename in os.listdir(fu...
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename in os.listdir(fu...
<commit_before>import optparse import os optparser = optparse.OptionParser() optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") (opts, _) = optparser.parse_args() full_path = os.path.abspath(opts.directory) all_english_words = set() for filename i...
421dbe962dae44cad7aa734a397cb16fe9b1632f
reactive/datanode.py
reactive/datanode.py
from charms.reactive import when, when_not, set_state, remove_state from charms.hadoop import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs = HDFS(hadoop) ...
from charms.reactive import when, when_not, set_state, remove_state from charms.layer.hadoop_base import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs = HDF...
Update charms.hadoop reference to follow convention
Update charms.hadoop reference to follow convention
Python
apache-2.0
johnsca/layer-apache-hadoop-datanode,juju-solutions/layer-apache-hadoop-datanode
from charms.reactive import when, when_not, set_state, remove_state from charms.hadoop import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs = HDFS(hadoop) ...
from charms.reactive import when, when_not, set_state, remove_state from charms.layer.hadoop_base import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs = HDF...
<commit_before>from charms.reactive import when, when_not, set_state, remove_state from charms.hadoop import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs =...
from charms.reactive import when, when_not, set_state, remove_state from charms.layer.hadoop_base import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs = HDF...
from charms.reactive import when, when_not, set_state, remove_state from charms.hadoop import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs = HDFS(hadoop) ...
<commit_before>from charms.reactive import when, when_not, set_state, remove_state from charms.hadoop import get_hadoop_base from jujubigdata.handlers import HDFS from jujubigdata import utils @when('namenode.ready') @when_not('datanode.started') def start_datanode(namenode): hadoop = get_hadoop_base() hdfs =...
5b0246f1c287fc7eba8cfcd37144fdbe5487354a
tests/test_mplleaflet.py
tests/test_mplleaflet.py
import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 0], [1, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html()
import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 1], [0, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html()
Fix the basic test to make a line
Fix the basic test to make a line
Python
bsd-3-clause
BibMartin/mplleaflet,ocefpaf/mplleaflet,zeapo/mplleaflet,jwass/mplleaflet,zeapo/mplleaflet,ocefpaf/mplleaflet,BibMartin/mplleaflet,jwass/mplleaflet
import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 0], [1, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html() Fix the basic test to make a line
import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 1], [0, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html()
<commit_before>import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 0], [1, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html() <commit_msg>Fix the basic test to make a line<commit_after>
import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 1], [0, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html()
import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 0], [1, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html() Fix the basic test to make a lineimport matplotlib.pyplot as plt import mpllea...
<commit_before>import matplotlib.pyplot as plt import mplleaflet def test_basic(): plt.plot([0, 0], [1, 1]) mplleaflet.fig_to_html() def test_scatter(): plt.scatter([0, 10, 0, 10], [0, 0, 10, 10], c=[1, 2, 3, 4]) mplleaflet.fig_to_html() <commit_msg>Fix the basic test to make a line<commit_after>impo...
b7b691d82accc012ee4308849a82ba8514e4a156
migrations/versions/20140430220209_4093ccb6d914.py
migrations/versions/20140430220209_4093ccb6d914.py
"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_table('gallery', ...
"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_table('gallery', ...
Allow MySQL to set a default role
Allow MySQL to set a default role
Python
mit
taeram/ineffable,taeram/ineffable,taeram/ineffable
"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_table('gallery', ...
"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_table('gallery', ...
<commit_before>"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_tabl...
"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_table('gallery', ...
"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_table('gallery', ...
<commit_before>"""empty message Revision ID: 4093ccb6d914 Revises: None Create Date: 2014-04-30 22:02:09.991428 """ # revision identifiers, used by Alembic. revision = '4093ccb6d914' down_revision = None from alembic import op import sqlalchemy as sa from datetime import datetime def upgrade(): op.create_tabl...
06659d9d92b7f2b51db5905555293d23905cf7a4
sinon/lib/SinonSandbox.py
sinon/lib/SinonSandbox.py
properties = ["SinonSpy", "SinonStub", "SinonMock"] production_properties = ["spy", "stub", "mock"] def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*args, **kwargs): ret = f(*args, **kwargs) # handle production mode (called by sino...
properties = ["SinonSpy", "SinonStub", "SinonMock", "SinonAssertion"] production_properties = ["spy", "stub", "mock", "assert"] def _clear_assertion_message(obj): setattr(obj, "message", "") def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*ar...
Reset message into empty string of sinonAssertion
Reset message into empty string of sinonAssertion
Python
bsd-2-clause
note35/sinon,note35/sinon
properties = ["SinonSpy", "SinonStub", "SinonMock"] production_properties = ["spy", "stub", "mock"] def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*args, **kwargs): ret = f(*args, **kwargs) # handle production mode (called by sino...
properties = ["SinonSpy", "SinonStub", "SinonMock", "SinonAssertion"] production_properties = ["spy", "stub", "mock", "assert"] def _clear_assertion_message(obj): setattr(obj, "message", "") def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*ar...
<commit_before>properties = ["SinonSpy", "SinonStub", "SinonMock"] production_properties = ["spy", "stub", "mock"] def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*args, **kwargs): ret = f(*args, **kwargs) # handle production mode ...
properties = ["SinonSpy", "SinonStub", "SinonMock", "SinonAssertion"] production_properties = ["spy", "stub", "mock", "assert"] def _clear_assertion_message(obj): setattr(obj, "message", "") def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*ar...
properties = ["SinonSpy", "SinonStub", "SinonMock"] production_properties = ["spy", "stub", "mock"] def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*args, **kwargs): ret = f(*args, **kwargs) # handle production mode (called by sino...
<commit_before>properties = ["SinonSpy", "SinonStub", "SinonMock"] production_properties = ["spy", "stub", "mock"] def _clear_item_in_queue(queue): for item in reversed(queue): item.restore() def sinontest(f): def fn(*args, **kwargs): ret = f(*args, **kwargs) # handle production mode ...
1cb4ba75b0c4eb34606ea0eb4e30f0bd89f03518
bin/travis.py
bin/travis.py
#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package # Remove the...
#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package # Remove the...
Fix error logging in galaxy-cachefile-external-validator
Fix error logging in galaxy-cachefile-external-validator bin/galaxy-cachefile-external-validator is a symlink to bin/travis.py
Python
mit
erasche/community-package-cache,erasche/community-package-cache,galaxyproject/cargo-port,galaxyproject/cargo-port,gregvonkuster/cargo-port,gregvonkuster/cargo-port,erasche/community-package-cache,gregvonkuster/cargo-port
#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package # Remove the...
#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package # Remove the...
<commit_before>#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package ...
#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package # Remove the...
#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package # Remove the...
<commit_before>#!/usr/bin/env python import sys import logging from cargoport.utils import yield_packages, download_url, package_to_path, verify_file logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() def main(): retcode = 0 for package in yield_packages(sys.stdin): print package ...
35255e3c6bda4f862ed3d891b356e383eef02bda
dsppkeras/datasets/dspp.py
dsppkeras/datasets/dspp.py
from ..utils.data_utils import get_file import numpy as np import cPickle as pickle import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns Tuple ...
from ..utils.data_utils import get_file import json import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns Tuple of Numpy arrays: `(x_train, y_tr...
Switch to JSON containing database.tar.gz
Switch to JSON containing database.tar.gz
Python
agpl-3.0
PeptoneInc/dspp-keras
from ..utils.data_utils import get_file import numpy as np import cPickle as pickle import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns Tuple ...
from ..utils.data_utils import get_file import json import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns Tuple of Numpy arrays: `(x_train, y_tr...
<commit_before>from ..utils.data_utils import get_file import numpy as np import cPickle as pickle import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns...
from ..utils.data_utils import get_file import json import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns Tuple of Numpy arrays: `(x_train, y_tr...
from ..utils.data_utils import get_file import numpy as np import cPickle as pickle import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns Tuple ...
<commit_before>from ..utils.data_utils import get_file import numpy as np import cPickle as pickle import tarfile def load_data(path='peptone_dspp.tar.gz'): """Loads the MNIST dataset. # Arguments path: path where to cache the dataset locally (relative to ~/.keras/datasets). # Returns...
47f7d42c118a00c94d99981b5b1deb34d67ff04a
mangacork/scripts/check_len_chapter.py
mangacork/scripts/check_len_chapter.py
import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory) m...
import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory) m...
Write name of last page in txt file
Write name of last page in txt file
Python
mit
ma3lstrom/manga-cork,ma3lstrom/manga-cork,ma3lstrom/manga-cork
import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory) m...
import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory) m...
<commit_before>import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory...
import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory) m...
import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory) m...
<commit_before>import os def make_chapter_files(): os.chdir('../static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f for f in files if not f[0] == '.'] for directory in dirs: file_path = get_filepath(directory...
5a43c61c0688e2837492e7f034a0dd2c157c6e4d
hypatia/__init__.py
hypatia/__init__.py
"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintainer__ = __author...
"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintainer__ = __author...
Add a class for representing the current version
[Feature] Add a class for representing the current version This patch implements the `Version` class inside of the `__init__.py` file alongside the rest of Hypatia's meta-data. The class has public integer properties representing the major, minor, and patch portions of the version number. This makes it possible for ...
Python
mit
lillian-lemmer/hypatia,hypatia-software-org/hypatia-engine,brechin/hypatia,lillian-lemmer/hypatia,hypatia-software-org/hypatia-engine,Applemann/hypatia,Applemann/hypatia,brechin/hypatia
"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintainer__ = __author...
"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintainer__ = __author...
<commit_before>"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintain...
"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintainer__ = __author...
"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintainer__ = __author...
<commit_before>"""This module contains all of the important meta-information for Hypatia such as the author's name, the copyright and license, status, and so on. """ __author__ = "Lillian Lemmer" __copyright__ = "Copyright 2015 Lillian Lemmer" __credits__ = ["Lillian Lemmer"] __license__ = "MIT" __maintain...
28198f5f200fa655b1b509d0c744391eaa714577
python/executeprocess.py
python/executeprocess.py
import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if isCSharp and sys.platform.startswith("darwin"): newArgs = ["mono"] newArgs.extend(args) args = newArgs if verbose: print "Executing: '%s'" % " ".join(args) process = subprocess.Popen...
import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if sys.platform.startswith("win"): for index,item in enumerate(args): if '\\' in item: args[index] = item.replace('\\', '/') if isCSharp and sys.platform.startswith("darwin"): ...
Convert back slashes to forward slashes before executing Python processes
[trunk] Convert back slashes to forward slashes before executing Python processes
Python
bsd-3-clause
markfinal/BuildAMation,markfinal/BuildAMation,markfinal/BuildAMation,markfinal/BuildAMation,markfinal/BuildAMation
import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if isCSharp and sys.platform.startswith("darwin"): newArgs = ["mono"] newArgs.extend(args) args = newArgs if verbose: print "Executing: '%s'" % " ".join(args) process = subprocess.Popen...
import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if sys.platform.startswith("win"): for index,item in enumerate(args): if '\\' in item: args[index] = item.replace('\\', '/') if isCSharp and sys.platform.startswith("darwin"): ...
<commit_before>import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if isCSharp and sys.platform.startswith("darwin"): newArgs = ["mono"] newArgs.extend(args) args = newArgs if verbose: print "Executing: '%s'" % " ".join(args) process = s...
import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if sys.platform.startswith("win"): for index,item in enumerate(args): if '\\' in item: args[index] = item.replace('\\', '/') if isCSharp and sys.platform.startswith("darwin"): ...
import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if isCSharp and sys.platform.startswith("darwin"): newArgs = ["mono"] newArgs.extend(args) args = newArgs if verbose: print "Executing: '%s'" % " ".join(args) process = subprocess.Popen...
<commit_before>import subprocess import sys def ExecuteProcess(args, verbose=False, isCSharp=False): if isCSharp and sys.platform.startswith("darwin"): newArgs = ["mono"] newArgs.extend(args) args = newArgs if verbose: print "Executing: '%s'" % " ".join(args) process = s...
f4e5904fc277eba2a8dfb37a6a1b598b197b20c8
spacy/lang/es/__init__.py
spacy/lang/es/__init__.py
# coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS from ..norm_exc...
# coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS from ..norm_exc...
Fix Spanish noun_chunks failure caused by typo
Fix Spanish noun_chunks failure caused by typo
Python
mit
honnibal/spaCy,recognai/spaCy,recognai/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spa...
# coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS from ..norm_exc...
# coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS from ..norm_exc...
<commit_before># coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS ...
# coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS from ..norm_exc...
# coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS from ..norm_exc...
<commit_before># coding: utf8 from __future__ import unicode_literals from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .tag_map import TAG_MAP from .stop_words import STOP_WORDS from .lemmatizer import LOOKUP from .syntax_iterators import SYNTAX_ITERATORS from ..tokenizer_exceptions import BASE_EXCEPTIONS ...
d663f5e5456b3907e6bd3fd2700ecaa301ce4403
ehriportal/portal/utils.py
ehriportal/portal/utils.py
"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel def language_name_from_code(code, locale="en"): """Get lang display name.""" # TODO: Find the correct way to do this return babel.Locale(locale).languages.get(code, "") def get_co...
"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel # Hacky dictionary of official country/languages names # we want to substitute for friendlier versions... # A more permenant solution is needed to this. SUBNAMES = { "United Kingdom of Gre...
Add a hacky method of subbing 'official' names which are awkward, for more handy ones. i.e. 'United Kingdom of Great Britain & Northern Ireland -> Great Britain.
Add a hacky method of subbing 'official' names which are awkward, for more handy ones. i.e. 'United Kingdom of Great Britain & Northern Ireland -> Great Britain.
Python
mit
mikesname/ehri-collections,mikesname/ehri-collections,mikesname/ehri-collections
"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel def language_name_from_code(code, locale="en"): """Get lang display name.""" # TODO: Find the correct way to do this return babel.Locale(locale).languages.get(code, "") def get_co...
"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel # Hacky dictionary of official country/languages names # we want to substitute for friendlier versions... # A more permenant solution is needed to this. SUBNAMES = { "United Kingdom of Gre...
<commit_before>"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel def language_name_from_code(code, locale="en"): """Get lang display name.""" # TODO: Find the correct way to do this return babel.Locale(locale).languages.get(code, "...
"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel # Hacky dictionary of official country/languages names # we want to substitute for friendlier versions... # A more permenant solution is needed to this. SUBNAMES = { "United Kingdom of Gre...
"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel def language_name_from_code(code, locale="en"): """Get lang display name.""" # TODO: Find the correct way to do this return babel.Locale(locale).languages.get(code, "") def get_co...
<commit_before>"""Utility functions for dealing with repository and geo data.""" from incf.countryutils import transformations import babel def language_name_from_code(code, locale="en"): """Get lang display name.""" # TODO: Find the correct way to do this return babel.Locale(locale).languages.get(code, "...
225ae01e3147bbee5c03462dad7dcfef22297f51
elevator/utils/patterns.py
elevator/utils/patterns.py
from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, **named): en...
from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, **named): en...
Update : try/except in destructurate greatly enhances performances on mass read/write
Update : try/except in destructurate greatly enhances performances on mass read/write
Python
mit
oleiade/Elevator
from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, **named): en...
from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, **named): en...
<commit_before>from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, *...
from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, **named): en...
from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, **named): en...
<commit_before>from collections import Sequence # Enums beautiful python implementation # Used like this : # Numbers = enum('ZERO', 'ONE', 'TWO') # >>> Numbers.ZERO # 0 # >>> Numbers.ONE # 1 # Found here: http://stackoverflow.com/questions/36932/whats-the-best-way-to-implement-an-enum-in-python def enum(*sequential, *...
a3f981006fae846714bdb5aa0de98ac829a57bc0
registration/__init__.py
registration/__init__.py
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover
VERSION = (0, 9, 0, 'beta', 1) def get_version(): try: from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover except ImportError: return ".".join(str(n) for n in VERSION)
Fix dependency order issue in get_version
Fix dependency order issue in get_version
Python
bsd-3-clause
ildarsamit/django-registration,ildarsamit/django-registration
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover Fix dependency order issue in get_version
VERSION = (0, 9, 0, 'beta', 1) def get_version(): try: from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover except ImportError: return ".".join(str(n) for n in VERSION)
<commit_before>VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover <commit_msg>Fix dependency order issue in get_version<commit_after>
VERSION = (0, 9, 0, 'beta', 1) def get_version(): try: from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover except ImportError: return ".".join(str(n) for n in VERSION)
VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover Fix dependency order issue in get_versionVERSION = (0, 9, 0, 'beta', 1) def get_version(): try: from django.utils.version imp...
<commit_before>VERSION = (0, 9, 0, 'beta', 1) def get_version(): from django.utils.version import get_version as django_get_version return django_get_version(VERSION) # pragma: no cover <commit_msg>Fix dependency order issue in get_version<commit_after>VERSION = (0, 9, 0, 'beta', 1) def get_version(): t...
7d9a85c57deb6a6d89dcf9764ffe8baf3cb2981b
wcontrol/db/db_create.py
wcontrol/db/db_create.py
#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_contr...
#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_co...
Modify config to fit with PEP8 standard
Modify config to fit with PEP8 standard
Python
mit
pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control,pahumadad/weight-control
#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_contr...
#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_co...
<commit_before>#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') ap...
#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_co...
#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_contr...
<commit_before>#!env/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') ap...
5c80b42df31b03b5eb433e704a58f77624e2d24a
tests/urls.py
tests/urls.py
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tinyblog.tests.views.test_404'
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tests.views.test_404'
Fix path to 404 handler
Fix path to 404 handler
Python
bsd-3-clause
dominicrodger/tinyblog,dominicrodger/tinyblog
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tinyblog.tests.views.test_404' Fix path to 404 handler
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tests.views.test_404'
<commit_before>from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tinyblog.tests.views.test_404' <commit_msg>Fix path to 404 handler<commit_after>
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tests.views.test_404'
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tinyblog.tests.views.test_404' Fix path to 404 handlerfrom django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')...
<commit_before>from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^', include('tinyblog.urls')), ) handler404 = 'tinyblog.tests.views.test_404' <commit_msg>Fix path to 404 handler<commit_after>from django.conf.urls import patterns, include, url urlpatterns = patterns( '...
272d0bbc590fefa393317f27d2fa0c5912d654a9
django_cbtp_email/example_project/tests/test_basic.py
django_cbtp_email/example_project/tests/test_basic.py
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inlined_css(self):...
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inlined_css(self):...
Use assertIn in tests for better error message.
Use assertIn in tests for better error message.
Python
mit
illagrenan/django-cbtp-email,illagrenan/django-cbtp-email
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inlined_css(self):...
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inlined_css(self):...
<commit_before># -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inl...
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inlined_css(self):...
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inlined_css(self):...
<commit_before># -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) import os import tempfile from django.test import TestCase from ..tests.mailers import TestMailer class BasicUsageTestCase(TestCase): def test_message_will_be_sent_with_inl...
4601937752f707110d303e403153cc4412bcde58
oshino/util.py
oshino/util.py
from time import time def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ return int(time() * 1000)
from datetime import datetime def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ utcnow = datetime.utcnow() return int(utcnow.timestamp() * 1000)
Use UTC timestamp as timestamp
Use UTC timestamp as timestamp
Python
mit
CodersOfTheNight/oshino
from time import time def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ return int(time() * 1000) Use UTC timestamp as timestamp
from datetime import datetime def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ utcnow = datetime.utcnow() return int(utcnow.timestamp() * 1000)
<commit_before>from time import time def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ return int(time() * 1000) <commit_msg>Use UTC timestamp as timestamp<co...
from datetime import datetime def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ utcnow = datetime.utcnow() return int(utcnow.timestamp() * 1000)
from time import time def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ return int(time() * 1000) Use UTC timestamp as timestampfrom datetime import datetime ...
<commit_before>from time import time def dynamic_import(path): module, builder = path.rsplit(".", 1) return getattr(__import__(module, fromlist=[builder]), builder) def current_ts(): """ Just gives current timestamp. """ return int(time() * 1000) <commit_msg>Use UTC timestamp as timestamp<co...
6480a810b66a437ac716eb164c20f5bcc97d0934
src/handlers/admin.py
src/handlers/admin.py
from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): def __init__(self, name=None, category=None, endpoint=None, url=None, **kwargs): ...
from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): column_list = ('id', 'perspective', 'start_time') def __init__(self, name=None, ...
Fix list columns for all models
Fix list columns for all models
Python
apache-2.0
pascalc/narrative-roulette,pascalc/narrative-roulette
from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): def __init__(self, name=None, category=None, endpoint=None, url=None, **kwargs): ...
from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): column_list = ('id', 'perspective', 'start_time') def __init__(self, name=None, ...
<commit_before>from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): def __init__(self, name=None, category=None, endpoint=None, url=Non...
from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): column_list = ('id', 'perspective', 'start_time') def __init__(self, name=None, ...
from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): def __init__(self, name=None, category=None, endpoint=None, url=None, **kwargs): ...
<commit_before>from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView import db.schema as schema import db.query as query from handlers.rest import app admin = Admin(app, url="/admin") class RoundModelView(ModelView): def __init__(self, name=None, category=None, endpoint=None, url=Non...
c97c07b1f4ccc5798a935bf1bbcfe84986cb9f65
tikplay/tests/test_server.py
tikplay/tests/test_server.py
import unittest import mock from tikplay import server class ServerTestcase(unittest.TestCase): def setUp(self): self.handler_class = mock.MagicMock() self.server_class = mock.MagicMock() self.server_class.serve_forever = mock.MagicMock() self.__server = server.Server(host='127.0.0...
import unittest import mock from tikplay import server class DummyServer(): def __init__(self, *args, **kwargs): self._shutdown = False self._alive = False def serve_forever(self): self._alive = True while not self._shutdown: if self._shutdown: brea...
Add a dummy server - Tests are broken
Add a dummy server - Tests are broken
Python
mit
tietokilta-saato/tikplay,tietokilta-saato/tikplay,tietokilta-saato/tikplay,tietokilta-saato/tikplay
import unittest import mock from tikplay import server class ServerTestcase(unittest.TestCase): def setUp(self): self.handler_class = mock.MagicMock() self.server_class = mock.MagicMock() self.server_class.serve_forever = mock.MagicMock() self.__server = server.Server(host='127.0.0...
import unittest import mock from tikplay import server class DummyServer(): def __init__(self, *args, **kwargs): self._shutdown = False self._alive = False def serve_forever(self): self._alive = True while not self._shutdown: if self._shutdown: brea...
<commit_before>import unittest import mock from tikplay import server class ServerTestcase(unittest.TestCase): def setUp(self): self.handler_class = mock.MagicMock() self.server_class = mock.MagicMock() self.server_class.serve_forever = mock.MagicMock() self.__server = server.Serve...
import unittest import mock from tikplay import server class DummyServer(): def __init__(self, *args, **kwargs): self._shutdown = False self._alive = False def serve_forever(self): self._alive = True while not self._shutdown: if self._shutdown: brea...
import unittest import mock from tikplay import server class ServerTestcase(unittest.TestCase): def setUp(self): self.handler_class = mock.MagicMock() self.server_class = mock.MagicMock() self.server_class.serve_forever = mock.MagicMock() self.__server = server.Server(host='127.0.0...
<commit_before>import unittest import mock from tikplay import server class ServerTestcase(unittest.TestCase): def setUp(self): self.handler_class = mock.MagicMock() self.server_class = mock.MagicMock() self.server_class.serve_forever = mock.MagicMock() self.__server = server.Serve...
cd2ff46284a8144755b880c035d0a89938474955
salt/grains/extra.py
salt/grains/extra.py
# -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on this system ''' # Pro...
# -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files import salt.utils.platform log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on th...
Return COMSPEC as the shell for Windows
Return COMSPEC as the shell for Windows
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on this system ''' # Pro...
# -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files import salt.utils.platform log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on th...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on this system ...
# -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files import salt.utils.platform log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on th...
# -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on this system ''' # Pro...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import # Import python libs import os # Import third party libs import yaml import logging # Import salt libs import salt.utils.files log = logging.getLogger(__name__) def shell(): ''' Return the default shell to use on this system ...
255b3f645d42464d4f8c80e97200d4dacc513616
keras/preprocessing/__init__.py
keras/preprocessing/__init__.py
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Add a toplevel warning against legacy keras.preprocessing utilities
Add a toplevel warning against legacy keras.preprocessing utilities PiperOrigin-RevId: 434866390
Python
apache-2.0
keras-team/keras,keras-team/keras
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
1e182ec0fd7cf550c809f2e6792629caeb8d5553
sauce/lib/helpers.py
sauce/lib/helpers.py
# -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import truncate from webhel...
# -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import truncate from webhel...
Use striptags from genshi for striphtml, since we have to have genshi anyway
Use striptags from genshi for striphtml, since we have to have genshi anyway
Python
agpl-3.0
moschlar/SAUCE,moschlar/SAUCE,moschlar/SAUCE,moschlar/SAUCE
# -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import truncate from webhel...
# -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import truncate from webhel...
<commit_before># -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import trunc...
# -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import truncate from webhel...
# -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import truncate from webhel...
<commit_before># -*- coding: utf-8 -*- """WebHelpers used in SAUCE. @author: moschlar """ from datetime import datetime from tg import url as tgurl #from webhelpers import date, feedgenerator, html, number, misc, text import webhelpers as w from webhelpers.html.tags import link_to from webhelpers.text import trunc...
b9c66ca635d48c6d6d04d8b68e7befe910cad347
scattergun/scattergun_coreapp/tests.py
scattergun/scattergun_coreapp/tests.py
from django.test import TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) self.assertEqual(test_team_1.name, "Test Team 1") ...
from django.core.urlresolvers import reverse from django.test import Client, TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) ...
Add unit test for team views
Add unit test for team views
Python
mit
Team4761/Scattergun,Team4761/Scattergun,Team4761/Scattergun
from django.test import TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) self.assertEqual(test_team_1.name, "Test Team 1") ...
from django.core.urlresolvers import reverse from django.test import Client, TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) ...
<commit_before>from django.test import TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) self.assertEqual(test_team_1.name, ...
from django.core.urlresolvers import reverse from django.test import Client, TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) ...
from django.test import TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) self.assertEqual(test_team_1.name, "Test Team 1") ...
<commit_before>from django.test import TestCase from .models import Team class TeamTestCase(TestCase): def setUp(self): Team.objects.create(name="Test Team 1", number=1) def test_team_created_correctly(self): test_team_1 = Team.objects.get(number=1) self.assertEqual(test_team_1.name, ...
28c11c91ad056735952f904c86c2fb726ef90f81
test/util.py
test/util.py
def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'pytest-warnings', 'warnings', 'warning': if key in outcomes: del outcomes[key] assert outcomes == expected
def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'warnings': if key in outcomes: del outcomes[key] assert outcomes == expected
Remove checks for deprecated keys in outcomes
Remove checks for deprecated keys in outcomes
Python
mit
ropez/pytest-describe
def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'pytest-warnings', 'warnings', 'warning': if key in outcomes: del outcomes[key] assert outcomes == expected Remove checks for deprecated keys in outcomes
def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'warnings': if key in outcomes: del outcomes[key] assert outcomes == expected
<commit_before>def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'pytest-warnings', 'warnings', 'warning': if key in outcomes: del outcomes[key] assert outcomes == expected <commit_msg>Remove checks for deprecated keys in outcomes<commit_a...
def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'warnings': if key in outcomes: del outcomes[key] assert outcomes == expected
def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'pytest-warnings', 'warnings', 'warning': if key in outcomes: del outcomes[key] assert outcomes == expected Remove checks for deprecated keys in outcomesdef assert_outcomes(result, **expect...
<commit_before>def assert_outcomes(result, **expected): outcomes = result.parseoutcomes() for key in 'seconds', 'pytest-warnings', 'warnings', 'warning': if key in outcomes: del outcomes[key] assert outcomes == expected <commit_msg>Remove checks for deprecated keys in outcomes<commit_a...