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
91dc57bb07d6bfd17af378fd6fccf353317cb06c
tests/test_scatter_series.py
tests/test_scatter_series.py
from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) @patch("quick...
from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) @patch("quick...
Add check on ScatterSeries repr
Add check on ScatterSeries repr
Python
mit
samirelanduk/quickplots
from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) @patch("quick...
from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) @patch("quick...
<commit_before>from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) ...
from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) @patch("quick...
from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) @patch("quick...
<commit_before>from unittest import TestCase from unittest.mock import patch from quickplots.series import ScatterSeries, Series class LineSeriesCreationTests(TestCase): def test_can_create_line_series(self): series = ScatterSeries((1, 1), (2, 4), (3, 9)) self.assertIsInstance(series, Series) ...
48fc33be592e27e632958a58de99356494a4e511
test/dbusdef.py
test/dbusdef.py
import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager') database = dbus.Interface(bus.get_object('org.bluez', '/or...
import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.bluez.Manager') try: adapter = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAd...
Remove old 3.x API cruft
Remove old 3.x API cruft
Python
lgpl-2.1
pkarasev3/bluez,mapfau/bluez,silent-snowman/bluez,ComputeCycles/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,pkarasev3/bluez,ComputeCycles/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,mapfau/bluez,silent-snowman/bluez,mapfau/bluez,pkarasev3/blue...
import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager') database = dbus.Interface(bus.get_object('org.bluez', '/or...
import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.bluez.Manager') try: adapter = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAd...
<commit_before>import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager') database = dbus.Interface(bus.get_object('o...
import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.bluez.Manager') try: adapter = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAd...
import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager') database = dbus.Interface(bus.get_object('org.bluez', '/or...
<commit_before>import dbus bus = dbus.SystemBus() dummy = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.freedesktop.DBus.Introspectable') #print dummy.Introspect() manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager') database = dbus.Interface(bus.get_object('o...
5b3cdb3a1735a02fc10761b96f2d74b2fab8cd61
test_scraper.py
test_scraper.py
from scraper import search_CL def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8'
from scraper import search_CL from scraper import read_search_results def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8' def test_read_search_result(): test_body, test_encoding = read_...
Add test_read_search_result() to test reading data from a local .html
Add test_read_search_result() to test reading data from a local .html
Python
mit
jefrailey/basic-scraper
from scraper import search_CL def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8'Add test_read_search_result() to test reading data from a local .html
from scraper import search_CL from scraper import read_search_results def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8' def test_read_search_result(): test_body, test_encoding = read_...
<commit_before>from scraper import search_CL def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8'<commit_msg>Add test_read_search_result() to test reading data from a local .html<commit_after>
from scraper import search_CL from scraper import read_search_results def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8' def test_read_search_result(): test_body, test_encoding = read_...
from scraper import search_CL def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8'Add test_read_search_result() to test reading data from a local .htmlfrom scraper import search_CL from scrape...
<commit_before>from scraper import search_CL def test_search_CL(): test_body, test_encoding = search_CL(minAsk=100) assert "<span class=\"desktop\">craigslist</span>" in test_body assert test_encoding == 'utf-8'<commit_msg>Add test_read_search_result() to test reading data from a local .html<commit_after>...
01ef56e5ef825897648de792d1734a336499fb0b
ynr/apps/candidates/views/version_data.py
ynr/apps/candidates/views/version_data.py
import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip def create_v...
import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip def create_v...
Allow passing User directly to get_change_metadata
Allow passing User directly to get_change_metadata
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip def create_v...
import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip def create_v...
<commit_before>import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip...
import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip def create_v...
import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip def create_v...
<commit_before>import sys from datetime import datetime from random import randint def get_client_ip(request): x_forwarded_for = request.META.get("HTTP_X_FORWARDED_FOR") if x_forwarded_for: ip = x_forwarded_for.split(",")[-1].strip() else: ip = request.META.get("REMOTE_ADDR") return ip...
aaf3db955585396fe30c341fd406cd98ebdd8f7a
src/info_retrieval/info_retrieval.py
src/info_retrieval/info_retrieval.py
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
Stop writing Java code :/
Stop writing Java code :/
Python
mit
amkahn/question-answering,amkahn/question-answering
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
<commit_before># LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document col...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
# LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document collection def...
<commit_before># LING 573 Question Answering System # Code last updated 4/17/14 by Clara Gordon # This code implements an InfoRetriever for the question answering system. from pymur import * from general_classes import * class InfoRetriever: # builds a QueryEnvironment associated with the indexed document col...
be75e40136bcba9e3c02a811beedf9a800381062
changeling/api.py
changeling/api.py
import changeling.models class ChangeAPI(object): def __init__(self, config, storage): self.config = config self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def save(self, chan...
import changeling.models class ChangeAPI(object): def __init__(self, storage): self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def save(self, change): data = change.to_dict() ...
Drop config argument from ChangeAPI
Drop config argument from ChangeAPI
Python
apache-2.0
bcwaldon/changeling,bcwaldon/changeling
import changeling.models class ChangeAPI(object): def __init__(self, config, storage): self.config = config self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def save(self, chan...
import changeling.models class ChangeAPI(object): def __init__(self, storage): self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def save(self, change): data = change.to_dict() ...
<commit_before>import changeling.models class ChangeAPI(object): def __init__(self, config, storage): self.config = config self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def ...
import changeling.models class ChangeAPI(object): def __init__(self, storage): self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def save(self, change): data = change.to_dict() ...
import changeling.models class ChangeAPI(object): def __init__(self, config, storage): self.config = config self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def save(self, chan...
<commit_before>import changeling.models class ChangeAPI(object): def __init__(self, config, storage): self.config = config self.storage = storage def list(self): for change_data in self.storage.list_changes(): yield changeling.models.Change.from_dict(change_data) def ...
2b372d479f8c022d72954396be9a4a045596f497
tests/test52.py
tests/test52.py
import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 720ebe41-5987-b9...
import judicious # judicious.register("https://imprudent.herokuapp.com") # judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfd40f") def experiment(): with judicious.Person(lifetime=60) as person: if not person.consent(): return None j1 = person.joke() j2 = person.joke() ...
Update context manager test script
Update context manager test script
Python
mit
suchow/judicious,suchow/judicious,suchow/judicious
import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 720ebe41-5987-b9...
import judicious # judicious.register("https://imprudent.herokuapp.com") # judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfd40f") def experiment(): with judicious.Person(lifetime=60) as person: if not person.consent(): return None j1 = person.joke() j2 = person.joke() ...
<commit_before>import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 7...
import judicious # judicious.register("https://imprudent.herokuapp.com") # judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfd40f") def experiment(): with judicious.Person(lifetime=60) as person: if not person.consent(): return None j1 = person.joke() j2 = person.joke() ...
import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 720ebe41-5987-b9...
<commit_before>import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64dfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 7...
ed3e70d26f70e701e29e5d0798f5f55229ba5f6d
tracker/servers/cron_jobs.py
tracker/servers/cron_jobs.py
from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 2 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.objects.all(): ...
from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 1 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.objects.all(): ...
Set acquisition freq to 1 minute.
Set acquisition freq to 1 minute.
Python
mit
tomaszpiotro/Tracker,tomaszpiotro/Tracker,tomaszpiotro/Tracker
from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 2 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.objects.all(): ...
from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 1 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.objects.all(): ...
<commit_before>from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 2 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.object...
from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 1 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.objects.all(): ...
from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 2 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.objects.all(): ...
<commit_before>from servers.models import HttpSeries from django_cron import CronJobBase, Schedule class HttpSeriesCronJob(CronJobBase): RUN_EVERY_MINS = 2 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = "servers.cron.HttpSeriesCronJob" def do(self): for series in HttpSeries.object...
ea18ab430e49c5deb5a0c19fbda66cbaca8256c7
esipy/__init__.py
esipy/__init__.py
# -*- encoding: utf-8 -*- from __future__ import absolute_import from .client import EsiClient # noqa from .security import EsiSecurity # noqa try: from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore pass __ve...
# -*- encoding: utf-8 -*- from __future__ import absolute_import try: from .client import EsiClient # noqa from .security import EsiSecurity # noqa from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore pass ...
Move import in try except (forgot the others)
Move import in try except (forgot the others)
Python
bsd-3-clause
a-tal/EsiPy,Kyria/EsiPy
# -*- encoding: utf-8 -*- from __future__ import absolute_import from .client import EsiClient # noqa from .security import EsiSecurity # noqa try: from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore pass __ve...
# -*- encoding: utf-8 -*- from __future__ import absolute_import try: from .client import EsiClient # noqa from .security import EsiSecurity # noqa from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore pass ...
<commit_before># -*- encoding: utf-8 -*- from __future__ import absolute_import from .client import EsiClient # noqa from .security import EsiSecurity # noqa try: from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore ...
# -*- encoding: utf-8 -*- from __future__ import absolute_import try: from .client import EsiClient # noqa from .security import EsiSecurity # noqa from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore pass ...
# -*- encoding: utf-8 -*- from __future__ import absolute_import from .client import EsiClient # noqa from .security import EsiSecurity # noqa try: from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore pass __ve...
<commit_before># -*- encoding: utf-8 -*- from __future__ import absolute_import from .client import EsiClient # noqa from .security import EsiSecurity # noqa try: from pyswagger import App # noqa except Exception: # pragma: no cover # Not installed or in install (not yet installed) so ignore ...
6319303c93af973718c5e26c4d6b1d47310ff804
install_deps.py
install_deps.py
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
Correct for None appearing in requirements list
Correct for None appearing in requirements list
Python
bsd-3-clause
Neurita/galton
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
<commit_before>#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
<commit_before>#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse...
1c60cf7082672335279d5b96e83f3cb2eb57424f
purchase_supplier_minimum_order/models/__init__.py
purchase_supplier_minimum_order/models/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
# -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
Enforce minimum PO value for supplier.
Enforce minimum PO value for supplier.
Python
agpl-3.0
OpusVL/odoo-purchase-min-order
# -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
# -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gen...
# -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
# -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Set minimum order on suppliers # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gen...
f0fad3a710e6c9ec9475fa379521ba1e8e369c02
fixlib/channel.py
fixlib/channel.py
import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', self.closehook) def handle_accept(self): client = self....
import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', lambda x, y: self.close()) def handle_accept(self): clie...
Use a lambda as a proxy.
Use a lambda as a proxy.
Python
bsd-3-clause
djc/fixlib
import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', self.closehook) def handle_accept(self): client = self....
import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', lambda x, y: self.close()) def handle_accept(self): clie...
<commit_before>import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', self.closehook) def handle_accept(self): ...
import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', lambda x, y: self.close()) def handle_accept(self): clie...
import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', self.closehook) def handle_accept(self): client = self....
<commit_before>import asyncore import util try: import simplejson as json except ImportError: import json class ChannelServer(asyncore.dispatcher): def __init__(self, sock, dest): asyncore.dispatcher.__init__(self, sock) self.dest = dest dest.register('close', self.closehook) def handle_accept(self): ...
485bfd97d1b305ad0944192d4ea8c77a479936ad
util/log.py
util/log.py
import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENTA_FG, new_line)...
import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENTA_FG, new_line)...
Add note and fatal to Log
Add note and fatal to Log
Python
mit
JBarberU/strawberry_py
import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENTA_FG, new_line)...
import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENTA_FG, new_line)...
<commit_before>import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENT...
import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENTA_FG, new_line)...
import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENTA_FG, new_line)...
<commit_before>import sys from colors import Colors class Log: @classmethod def print_msg(cls, title, msg, color, new_line = True): Log.raw("{0}{1}{2}: {3}".format(color, title, Colors.NORMAL, msg), new_line) @classmethod def msg(cls, msg, new_line = True): Log.print_msg("Message", msg, Colors.MAGENT...
f1abc6b9ca132f80c53743dfff31247beabdbd7c
astropy/constants/__init__.py
astropy/constants/__init__.py
""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c ... define the ma...
""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c ... define the ma...
Sort constant names alphabetically in docstring
Sort constant names alphabetically in docstring
Python
bsd-3-clause
saimn/astropy,tbabej/astropy,bsipocz/astropy,DougBurke/astropy,pllim/astropy,mhvk/astropy,stargaser/astropy,StuartLittlefair/astropy,joergdietrich/astropy,dhomeier/astropy,larrybradley/astropy,mhvk/astropy,larrybradley/astropy,pllim/astropy,stargaser/astropy,dhomeier/astropy,DougBurke/astropy,MSeifert04/astropy,mhvk/as...
""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c ... define the ma...
""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c ... define the ma...
<commit_before>""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c .....
""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c ... define the ma...
""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c ... define the ma...
<commit_before>""" Contains astronomical and physical constants for use in Astropy or other places. The package contains a `~astropy.constants.cgs` and `~astropy.constants.si` module that define constants in CGS and SI units, respectively. A typical use case might be:: from astropy.constants.cgs import c .....
aa370f5eb39b587d71e511cb618951875896e75a
ckanext/ckanext-apicatalog_scheming/ckanext/apicatalog_scheming/tests/test_plugin.py
ckanext/ckanext-apicatalog_scheming/ckanext/apicatalog_scheming/tests/test_plugin.py
import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() org2_users = ...
import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() org2_users = ...
Add not allowed organization test
LIKA-410: Add not allowed organization test
Python
mit
vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog
import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() org2_users = ...
import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() org2_users = ...
<commit_before>import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() ...
import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() org2_users = ...
import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() org2_users = ...
<commit_before>import pytest from ckan.tests.factories import User, Dataset, Organization from ckan.plugins.toolkit import get_action @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_allowed_organization_user_should_see_subsystem(): organization1 = Organization() user2 = User() ...
0ee42ac3b80893557691d722eda207733289c97c
micropsi_core/world/minecraft/spockplugin.py
micropsi_core/world/minecraft/spockplugin.py
import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self.worldadapter = ...
import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self.worldadapter = ...
Move now sets the client position and allows the movement plugin do its thing
Move now sets the client position and allows the movement plugin do its thing
Python
mit
ianupright/micropsi2,ianupright/micropsi2,printedheart/micropsi2,ianupright/micropsi2,printedheart/micropsi2,printedheart/micropsi2
import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self.worldadapter = ...
import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self.worldadapter = ...
<commit_before>import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self....
import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self.worldadapter = ...
import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self.worldadapter = ...
<commit_before>import logging from spock.mcp import mcdata, mcpacket from spock.mcmap import smpmap from micropsi_core.world.minecraft.psidispatcher import PsiDispatcher from spock.utils import pl_announce @pl_announce('Micropsi') class MicropsiPlugin(object): def __init__(self, ploader, settings): self....
90d1ff207cce93585b52e5d107efe7221ed37175
test_project/djmercadopago_test_app_settings.SAMPLE.py
test_project/djmercadopago_test_app_settings.SAMPLE.py
DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_BUILDER = \ 'full.path.to.checkout.builder.implementation.function'
DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_UPDATER_FUNCTION = \ 'full.path.to.checkout.builder.implementation.function'
Test project: update settings names
Test project: update settings names
Python
bsd-3-clause
data-tsunami/django-mercadopago,data-tsunami/django-mercadopago
DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_BUILDER = \ 'full.path.to.checkout.builder.implementation.function' Test project: update settings names
DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_UPDATER_FUNCTION = \ 'full.path.to.checkout.builder.implementation.function'
<commit_before>DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_BUILDER = \ 'full.path.to.checkout.builder.implementation.function' <commit_msg>Test project: update settings names<commit_after>
DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_UPDATER_FUNCTION = \ 'full.path.to.checkout.builder.implementation.function'
DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_BUILDER = \ 'full.path.to.checkout.builder.implementation.function' Test project: update settings namesDJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMER...
<commit_before>DJMERCADOPAGO_CLIENT_ID = 'your-mp-client-id' DJMERCADOPAGO_CLIENTE_SECRET = 'your-mp-secret' DJMERCADOPAGO_SANDBOX_MODE = True DJMERCADOPAGO_CHECKOUT_PREFERENCE_BUILDER = \ 'full.path.to.checkout.builder.implementation.function' <commit_msg>Test project: update settings names<commit_after>DJMERCADOP...
9185d882dc5fc7131b90d3b93dff8b6603538a3d
app/cogs/twitch_emotes.py
app/cogs/twitch_emotes.py
from io import BytesIO import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot r = requests.get(TWITCH_EMOTES_API) emot...
from io import BytesIO import logging import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' logger = logging.getLogger(__name__) class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot ...
Add logging to Twitch emotes module
Add logging to Twitch emotes module
Python
mit
andrewlin16/duckbot,andrewlin16/duckbot
from io import BytesIO import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot r = requests.get(TWITCH_EMOTES_API) emot...
from io import BytesIO import logging import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' logger = logging.getLogger(__name__) class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot ...
<commit_before>from io import BytesIO import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot r = requests.get(TWITCH_EMOTES_AP...
from io import BytesIO import logging import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' logger = logging.getLogger(__name__) class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot ...
from io import BytesIO import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot r = requests.get(TWITCH_EMOTES_API) emot...
<commit_before>from io import BytesIO import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot r = requests.get(TWITCH_EMOTES_AP...
6c0999f2593da49c0fa78d035a049111a5676836
chatterbot_corpus/__init__.py
chatterbot_corpus/__init__.py
""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.1' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus'
""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.2' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus'
Update release version to 0.0.2
Update release version to 0.0.2
Python
bsd-3-clause
gunthercox/chatterbot-corpus
""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.1' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus' Update release version to 0.0.2
""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.2' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus'
<commit_before>""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.1' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus' <commit_msg>Update release version to 0.0.2<commit_after>
""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.2' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus'
""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.1' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus' Update release version to 0.0.2""" A machine readable multilingual dialog corpus. """ from .co...
<commit_before>""" A machine readable multilingual dialog corpus. """ from .corpus import Corpus __version__ = '0.0.1' __author__ = 'Gunther Cox' __email__ = 'gunthercx@gmail.com' __url__ = 'https://github.com/gunthercox/chatterbot-corpus' <commit_msg>Update release version to 0.0.2<commit_after>""" A machine readable...
79d2e089eff2f6bcfd150d3ac6e165bfefa475cb
modeltranslation/__init__.py
modeltranslation/__init__.py
from pathlib import Path __version__ = (Path(__file__).parent / "VERSION").open().read().strip() default_app_config = 'modeltranslation.apps.ModeltranslationConfig'
from pathlib import Path from django import VERSION as _django_version __version__ = (Path(__file__).parent / "VERSION").open().read().strip() if _django_version < (3, 2): default_app_config = 'modeltranslation.apps.ModeltranslationConfig'
Add django version check for default_app_config
fix: Add django version check for default_app_config
Python
bsd-3-clause
deschler/django-modeltranslation,deschler/django-modeltranslation
from pathlib import Path __version__ = (Path(__file__).parent / "VERSION").open().read().strip() default_app_config = 'modeltranslation.apps.ModeltranslationConfig' fix: Add django version check for default_app_config
from pathlib import Path from django import VERSION as _django_version __version__ = (Path(__file__).parent / "VERSION").open().read().strip() if _django_version < (3, 2): default_app_config = 'modeltranslation.apps.ModeltranslationConfig'
<commit_before>from pathlib import Path __version__ = (Path(__file__).parent / "VERSION").open().read().strip() default_app_config = 'modeltranslation.apps.ModeltranslationConfig' <commit_msg>fix: Add django version check for default_app_config<commit_after>
from pathlib import Path from django import VERSION as _django_version __version__ = (Path(__file__).parent / "VERSION").open().read().strip() if _django_version < (3, 2): default_app_config = 'modeltranslation.apps.ModeltranslationConfig'
from pathlib import Path __version__ = (Path(__file__).parent / "VERSION").open().read().strip() default_app_config = 'modeltranslation.apps.ModeltranslationConfig' fix: Add django version check for default_app_configfrom pathlib import Path from django import VERSION as _django_version __version__ = (Path(__file__)...
<commit_before>from pathlib import Path __version__ = (Path(__file__).parent / "VERSION").open().read().strip() default_app_config = 'modeltranslation.apps.ModeltranslationConfig' <commit_msg>fix: Add django version check for default_app_config<commit_after>from pathlib import Path from django import VERSION as _djan...
ac5c03cef0f0b3676b22e66e89f74ec33f69e9c6
tests/python/utils.py
tests/python/utils.py
from pyroute2 import NSPopen from distutils.spawn import find_executable class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if the program to be executed is available from the system path or not. If found, it proceeds with the usual NSPopen() call. Otherwise, it rai...
from pyroute2 import NSPopen from distutils.spawn import find_executable def has_executable(name): path = find_executable(name) if path is None: raise Exception(name + ": command not found") return path class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if ...
Add a generic utility to check any binary availability
Add a generic utility to check any binary availability In order to run, some test programs depend on the availability of binaries in locations that are part of PATH. So, we add a generic utility to simplify this. Signed-off-by: Sandipan Das <ae8113f64d9c72812e097938d25a8975da69c074@linux.vnet.ibm.com>
Python
apache-2.0
mcaleavya/bcc,brendangregg/bcc,iovisor/bcc,brendangregg/bcc,tuxology/bcc,mcaleavya/bcc,brendangregg/bcc,iovisor/bcc,iovisor/bcc,tuxology/bcc,tuxology/bcc,iovisor/bcc,brendangregg/bcc,brendangregg/bcc,mcaleavya/bcc,mcaleavya/bcc,iovisor/bcc,mcaleavya/bcc,tuxology/bcc,tuxology/bcc
from pyroute2 import NSPopen from distutils.spawn import find_executable class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if the program to be executed is available from the system path or not. If found, it proceeds with the usual NSPopen() call. Otherwise, it rai...
from pyroute2 import NSPopen from distutils.spawn import find_executable def has_executable(name): path = find_executable(name) if path is None: raise Exception(name + ": command not found") return path class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if ...
<commit_before>from pyroute2 import NSPopen from distutils.spawn import find_executable class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if the program to be executed is available from the system path or not. If found, it proceeds with the usual NSPopen() call. Ot...
from pyroute2 import NSPopen from distutils.spawn import find_executable def has_executable(name): path = find_executable(name) if path is None: raise Exception(name + ": command not found") return path class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if ...
from pyroute2 import NSPopen from distutils.spawn import find_executable class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if the program to be executed is available from the system path or not. If found, it proceeds with the usual NSPopen() call. Otherwise, it rai...
<commit_before>from pyroute2 import NSPopen from distutils.spawn import find_executable class NSPopenWithCheck(NSPopen): """ A wrapper for NSPopen that additionally checks if the program to be executed is available from the system path or not. If found, it proceeds with the usual NSPopen() call. Ot...
d52c661f65a4618893f676def6f18a226ad52a6c
oneflow/settings/snippets/celery_development.py
oneflow/settings/snippets/celery_development.py
BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL
BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL # I use these to debug kombu crashes; we get a more informative message. #CELERY_TASK_SERIALIZER = 'json' #CELERY_RESULT_SERIALIZER = 'json'
Put the JSON serializer in celery development settings, this has helped me a lot.
Put the JSON serializer in celery development settings, this has helped me a lot.
Python
agpl-3.0
WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow
BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL Put the JSON serializer in celery development settings, this has helped me a lot.
BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL # I use these to debug kombu crashes; we get a more informative message. #CELERY_TASK_SERIALIZER = 'json' #CELERY_RESULT_SERIALIZER = 'json'
<commit_before>BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL <commit_msg>Put the JSON serializer in celery development settings, this has helped me a lot.<commit_after>
BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL # I use these to debug kombu crashes; we get a more informative message. #CELERY_TASK_SERIALIZER = 'json' #CELERY_RESULT_SERIALIZER = 'json'
BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL Put the JSON serializer in celery development settings, this has helped me a lot.BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL # I use these to debug kombu crashes; we get a more informat...
<commit_before>BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL <commit_msg>Put the JSON serializer in celery development settings, this has helped me a lot.<commit_after>BROKER_URL = 'redis://{0}:6379/1'.format(MAIN_SERVER) CELERY_RESULT_BACKEND = BROKER_URL # I use these to de...
b195d6e7b79b07daf95c36cac2b9f808f5bd8b87
appengine-vmruntime/setup.py
appengine-vmruntime/setup.py
# Copyright 2016 Google Inc. 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 applicable law or a...
# Copyright 2016 Google Inc. 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 applicable law or a...
Increase appengine-vm-runtime version field to 0.65
Increase appengine-vm-runtime version field to 0.65
Python
apache-2.0
GoogleCloudPlatform/python-compat-runtime,GoogleCloudPlatform/python-compat-runtime,GoogleCloudPlatform/python-compat-runtime,GoogleCloudPlatform/python-compat-runtime,GoogleCloudPlatform/python-compat-runtime
# Copyright 2016 Google Inc. 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 applicable law or a...
# Copyright 2016 Google Inc. 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 applicable law or a...
<commit_before># Copyright 2016 Google Inc. 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 appl...
# Copyright 2016 Google Inc. 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 applicable law or a...
# Copyright 2016 Google Inc. 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 applicable law or a...
<commit_before># Copyright 2016 Google Inc. 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 appl...
3024a35626118e5fcf504bde9785992aa7e3eea5
apps/members/models.py
apps/members/models.py
from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUser): pass ...
from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUser): # Cre...
Create an address if none exists for a user
Create an address if none exists for a user
Python
bsd-3-clause
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUser): pass ...
from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUser): # Cre...
<commit_before>from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUs...
from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUser): # Cre...
from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUser): pass ...
<commit_before>from django.db import models from bluebottle.bb_accounts.models import BlueBottleBaseUser from bluebottle.utils.models import Address from djchoices.choices import DjangoChoices, ChoiceItem from django.conf import settings from django.utils.translation import ugettext as _ class Member(BlueBottleBaseUs...
88e7441314fa1f9cc1d23d2d7eac2a10429a2624
masters/master.chromium.git/master_source_cfg.py
masters/master.chromium.git/master_source_cfg.py
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( repourl='http://g...
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( repourl='https://...
Switch polling URL to git-on-borg.
Switch polling URL to git-on-borg. TBR=mmoss@chromium.org,cmp@chromium.org Review URL: https://codereview.chromium.org/12152002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@179999 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( repourl='http://g...
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( repourl='https://...
<commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( re...
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( repourl='https://...
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( repourl='http://g...
<commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master.chromium_git_poller_bb8 import ChromiumGitPoller def Update(config, active_master, c): poller = ChromiumGitPoller( re...
cdc43f6f6ee2d040675f10028af6372b0bf42a08
msmbuilder/tests/__init__.py
msmbuilder/tests/__init__.py
import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: ...
import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: ...
Fix for my nefarious `warn` replacement
Fix for my nefarious `warn` replacement
Python
lgpl-2.1
dr-nate/msmbuilder,brookehus/msmbuilder,cxhernandez/msmbuilder,msmbuilder/msmbuilder,dr-nate/msmbuilder,rafwiewiora/msmbuilder,Eigenstate/msmbuilder,rafwiewiora/msmbuilder,rafwiewiora/msmbuilder,msultan/msmbuilder,cxhernandez/msmbuilder,dr-nate/msmbuilder,msultan/msmbuilder,msmbuilder/msmbuilder,stephenliu1989/msmbuild...
import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: ...
import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: ...
<commit_before>import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = ...
import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: ...
import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: ...
<commit_before>import sys import warnings from warnings import warn as orig_warn def my_warn(message, category=None, stacklevel=1): # taken from warnings module # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = ...
44345a82380541e14c1fe099e6ab4ee7dfcd243a
massa/domain.py
massa/domain.py
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
Add a method to create a measurement.
Add a method to create a measurement.
Python
mit
jaapverloop/massa
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=Fals...
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
# -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=False), Col...
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import ( Column, Date, Integer, MetaData, Numeric, String, Table, ) def define_tables(metadata): Table('measurement', metadata, Column('id', Integer, primary_key=True), Column('weight', Numeric(4, 1), nullable=Fals...
4f497d86f7fedfb19ec910d5f0978f72d260b935
begotemp/views/geo_zone.py
begotemp/views/geo_zone.py
# -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config.add_route('geo....
# -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config.add_route('geo....
Add a flash message for empty zone list
Add a flash message for empty zone list
Python
mit
miniwark/begotemp
# -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config.add_route('geo....
# -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config.add_route('geo....
<commit_before># -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config....
# -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config.add_route('geo....
# -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config.add_route('geo....
<commit_before># -*- coding: utf-8 -*- """ Tools for geographical zones management.""" import logging from pyramid.view import view_config from webhelpers import paginate from anuket.models import DBSession from begotemp.models.zone import Zone log = logging.getLogger(__name__) def includeme(config): config....
4ae9e3f85af82bd1b7d06858757403d94b775f8a
stayput/cli.py
stayput/cli.py
import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) site = Site(root_path=cwd) site.scan() # do terrible things try: loader = imp.SourceFileLoader('stayput', os.path.join(cwd, 'stayput.py')) config = ...
import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) # No configuration, no site to build. if not os.path.exists(os.path.join(cwd, 'stayput.py')): print("Error: stayput.py not found.") sys.exit(1) # Creat...
Check for site config file
Check for site config file
Python
mit
veeti/stayput
import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) site = Site(root_path=cwd) site.scan() # do terrible things try: loader = imp.SourceFileLoader('stayput', os.path.join(cwd, 'stayput.py')) config = ...
import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) # No configuration, no site to build. if not os.path.exists(os.path.join(cwd, 'stayput.py')): print("Error: stayput.py not found.") sys.exit(1) # Creat...
<commit_before>import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) site = Site(root_path=cwd) site.scan() # do terrible things try: loader = imp.SourceFileLoader('stayput', os.path.join(cwd, 'stayput.py')) ...
import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) # No configuration, no site to build. if not os.path.exists(os.path.join(cwd, 'stayput.py')): print("Error: stayput.py not found.") sys.exit(1) # Creat...
import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) site = Site(root_path=cwd) site.scan() # do terrible things try: loader = imp.SourceFileLoader('stayput', os.path.join(cwd, 'stayput.py')) config = ...
<commit_before>import os import sys from importlib import machinery as imp from stayput import Site def main(): cwd = os.path.abspath(os.getcwd()) site = Site(root_path=cwd) site.scan() # do terrible things try: loader = imp.SourceFileLoader('stayput', os.path.join(cwd, 'stayput.py')) ...
42e5db7e254ce46e562993a8abded7e8e3c7102b
contrib/migrateticketmodel.py
contrib/migrateticketmodel.py
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
Fix missing import in contrib script added in [2630].
Fix missing import in contrib script added in [2630]. git-svn-id: f68c6b3b1dcd5d00a2560c384475aaef3bc99487@2631 af82e41b-90c4-0310-8c96-b1721e28e2e2
Python
bsd-3-clause
dokipen/trac,moreati/trac-gitsvn,exocad/exotrac,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,exocad/exotrac,dokipen/trac,moreati/trac-gitsvn,moreati/trac-gitsvn,dafrito/trac-mirror,dokipen/trac,exocad/exotrac,dafrito/trac-mirror,exocad/exotrac
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
<commit_before>#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # chan...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
<commit_before>#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # chan...
d9226d778a831d6d9f9f8d7645869245d0757754
tests/integration/test_cli.py
tests/integration/test_cli.py
import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_path) old_di...
import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_path) old_di...
Disable autoreload in integration tests
Disable autoreload in integration tests
Python
apache-2.0
awslabs/chalice
import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_path) old_di...
import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_path) old_di...
<commit_before>import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_p...
import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_path) old_di...
import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_path) old_di...
<commit_before>import os import subprocess import pytest from chalice.utils import OSUtils CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.join(CURRENT_DIR, 'testapp') @pytest.fixture def local_app(tmpdir): temp_dir_path = str(tmpdir) OSUtils().copytree(PROJECT_DIR, temp_dir_p...
ecd5aaa396c5d8ee82cabbb5d95c5c0b6c150270
irrigator_pro/irrigator_pro/wsgi.py
irrigator_pro/irrigator_pro/wsgi.py
""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path PROJECT_ROOT ...
""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path PROJECT_ROOT ...
Change host test to check for 'irrigatorpro' instead of my laptop's name, since the latter changes depending on the (wireless) network.
Change host test to check for 'irrigatorpro' instead of my laptop's name, since the latter changes depending on the (wireless) network.
Python
mit
warnes/irrigatorpro,warnes/irrigatorpro,warnes/irrigatorpro,warnes/irrigatorpro
""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path PROJECT_ROOT ...
""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path PROJECT_ROOT ...
<commit_before>""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path ...
""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path PROJECT_ROOT ...
""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path PROJECT_ROOT ...
<commit_before>""" WSGI config for irrigator_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os, os.path, site, sys, socket # Add django root dir to python path ...
6cd2f4f1f2f4a4dca74fcfd6484278cc90e6f77a
tests/test_security_object.py
tests/test_security_object.py
from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def test_le(self): ...
import sys from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def test_...
Update Security class unit tests for Python3 compatibility
TEST: Update Security class unit tests for Python3 compatibility
Python
apache-2.0
sketchytechky/zipline,stkubr/zipline,wubr2000/zipline,michaeljohnbennett/zipline,jimgoo/zipline-fork,kmather73/zipline,morrisonwudi/zipline,cmorgan/zipline,keir-rex/zipline,grundgruen/zipline,umuzungu/zipline,zhoulingjun/zipline,jordancheah/zipline,florentchandelier/zipline,nborggren/zipline,joequant/zipline,ronalcc/zi...
from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def test_le(self): ...
import sys from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def test_...
<commit_before>from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def t...
import sys from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def test_...
from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def test_le(self): ...
<commit_before>from unittest import TestCase from zipline.assets._securities import Security class TestSecurityRichCmp(TestCase): def test_lt(self): self.assertTrue(Security(3) < Security(4)) self.assertFalse(Security(4) < Security(4)) self.assertFalse(Security(5) < Security(4)) def t...
f3c0d4f0f64f79377b6f631426d2e78d8faecc60
bouncer-plumbing/mlab-to-bouncer/makeconfig.py
bouncer-plumbing/mlab-to-bouncer/makeconfig.py
#!/usr/bin/env python import sys import yaml def read_parts_from_stdin(): data = sys.stdin.read() parts_string = data.split("----") parts_parsed = [] for part in parts_string: part_parsed = yaml.safe_load(part) parts_parsed.append(part_parsed) return parts_parsed def assemble_boun...
#!/usr/bin/env python import sys import yaml import json import subprocess def read_parts_from_mlabns(): # FIXME: Check wget exit status MLAB_NS_QUERY_URL = "http://localhost:8585/ooni?match=all" json_list = subprocess.Popen(["wget", MLAB_NS_QUERY_URL, "-O", "-"], stdout=subprocess.PIPE).communicate()[0] ...
Make bouncer script pull from mlab-ns simulator
Make bouncer script pull from mlab-ns simulator
Python
apache-2.0
hellais/ooni-support,m-lab/ooni-support,m-lab/ooni-support,hellais/ooni-support
#!/usr/bin/env python import sys import yaml def read_parts_from_stdin(): data = sys.stdin.read() parts_string = data.split("----") parts_parsed = [] for part in parts_string: part_parsed = yaml.safe_load(part) parts_parsed.append(part_parsed) return parts_parsed def assemble_boun...
#!/usr/bin/env python import sys import yaml import json import subprocess def read_parts_from_mlabns(): # FIXME: Check wget exit status MLAB_NS_QUERY_URL = "http://localhost:8585/ooni?match=all" json_list = subprocess.Popen(["wget", MLAB_NS_QUERY_URL, "-O", "-"], stdout=subprocess.PIPE).communicate()[0] ...
<commit_before>#!/usr/bin/env python import sys import yaml def read_parts_from_stdin(): data = sys.stdin.read() parts_string = data.split("----") parts_parsed = [] for part in parts_string: part_parsed = yaml.safe_load(part) parts_parsed.append(part_parsed) return parts_parsed de...
#!/usr/bin/env python import sys import yaml import json import subprocess def read_parts_from_mlabns(): # FIXME: Check wget exit status MLAB_NS_QUERY_URL = "http://localhost:8585/ooni?match=all" json_list = subprocess.Popen(["wget", MLAB_NS_QUERY_URL, "-O", "-"], stdout=subprocess.PIPE).communicate()[0] ...
#!/usr/bin/env python import sys import yaml def read_parts_from_stdin(): data = sys.stdin.read() parts_string = data.split("----") parts_parsed = [] for part in parts_string: part_parsed = yaml.safe_load(part) parts_parsed.append(part_parsed) return parts_parsed def assemble_boun...
<commit_before>#!/usr/bin/env python import sys import yaml def read_parts_from_stdin(): data = sys.stdin.read() parts_string = data.split("----") parts_parsed = [] for part in parts_string: part_parsed = yaml.safe_load(part) parts_parsed.append(part_parsed) return parts_parsed de...
e1d527d0676fd0b3a7a1f7b5e9b98ddc23a41cd6
storage_service/locations/tests/test_fixity_log.py
storage_service/locations/tests/test_fixity_log.py
from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_object.password)...
from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'package.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_...
Fix to storage service test.
Fix to storage service test.
Python
agpl-3.0
artefactual/archivematica-storage-service,artefactual/archivematica-storage-service,artefactual/archivematica-storage-service,artefactual/archivematica-storage-service
from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_object.password)...
from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'package.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_...
<commit_before>from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_o...
from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'package.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_...
from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_object.password)...
<commit_before>from django.test import TestCase from locations import models class TestFixityLog(TestCase): fixtures = ['base.json', 'fixity_log.json'] def setUp(self): self.fl_object = models.FixityLog.objects.all()[0] #self.auth = requests.auth.HTTPBasicAuth(self.ds_object.user, self.ds_o...
38524cdfbaef36594a546ba3be8883ba00b2df28
tests/_support/docstrings.py
tests/_support/docstrings.py
from invoke import task @task def no_docstring(): pass @task def one_line(): """ foo """ @task def two_lines(): """ foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """ foo """
from invoke import task @task def no_docstring(): pass @task def one_line(): """foo """ @task def two_lines(): """foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """foo """
Remove leading whitespace from non leading whitespace tests
Remove leading whitespace from non leading whitespace tests
Python
bsd-2-clause
tyewang/invoke,mkusz/invoke,mkusz/invoke,singingwolfboy/invoke,frol/invoke,pyinvoke/invoke,kejbaly2/invoke,mattrobenolt/invoke,mattrobenolt/invoke,frol/invoke,pfmoore/invoke,pfmoore/invoke,sophacles/invoke,pyinvoke/invoke,kejbaly2/invoke
from invoke import task @task def no_docstring(): pass @task def one_line(): """ foo """ @task def two_lines(): """ foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """ foo """ Remove leading whitespace from non leadin...
from invoke import task @task def no_docstring(): pass @task def one_line(): """foo """ @task def two_lines(): """foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """foo """
<commit_before>from invoke import task @task def no_docstring(): pass @task def one_line(): """ foo """ @task def two_lines(): """ foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """ foo """ <commit_msg>Remove leading...
from invoke import task @task def no_docstring(): pass @task def one_line(): """foo """ @task def two_lines(): """foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """foo """
from invoke import task @task def no_docstring(): pass @task def one_line(): """ foo """ @task def two_lines(): """ foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """ foo """ Remove leading whitespace from non leadin...
<commit_before>from invoke import task @task def no_docstring(): pass @task def one_line(): """ foo """ @task def two_lines(): """ foo bar """ @task def leading_whitespace(): """ foo """ @task(aliases=('a', 'b')) def with_aliases(): """ foo """ <commit_msg>Remove leading...
708571834a7a0c92273e628c2854b4ebefad3f4f
nrf/examples/ssd1306_mod.py
nrf/examples/ssd1306_mod.py
# NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SPI(128, 64, spi,...
# NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SPI(128, 64, spi,...
Update ssd1306 modification example to import correct class.
nrf/examples: Update ssd1306 modification example to import correct class.
Python
mit
tralamazza/micropython,tralamazza/micropython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,tralamazza/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit...
# NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SPI(128, 64, spi,...
# NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SPI(128, 64, spi,...
<commit_before># NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SP...
# NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SPI(128, 64, spi,...
# NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SPI(128, 64, spi,...
<commit_before># NOTE: Modified version to align with implemented I2C API in nrf port. # # Examples usage of SSD1306_SPI on pca10040 # # from machine import Pin, SPI # from ssd1306 import SSD1306_SPI # spi = SPI(0, baudrate=40000000) # dc = Pin.board.PA11 # res = Pin.board.PA12 # cs = Pin.board.PA13 # disp = SSD1306_SP...
707a6016a3023fe423ede53db707c55273b0f6d0
oauth2_provider/backends.py
oauth2_provider/backends.py
from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): request = cr...
from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): request = cr...
Use the OAuthLibCore object defined at the module level.
Use the OAuthLibCore object defined at the module level.
Python
bsd-2-clause
bleib1dj/django-oauth-toolkit,StepicOrg/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,StepicOrg/django-oauth-toolkit,DeskConnect/django-oauth-toolkit,bleib1dj/django-oauth-toolkit,DeskConnect/django-oauth-toolkit
from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): request = cr...
from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): request = cr...
<commit_before>from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): ...
from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): request = cr...
from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): request = cr...
<commit_before>from django.contrib.auth import get_user_model from .oauth2_backends import get_oauthlib_core UserModel = get_user_model() OAuthLibCore = get_oauthlib_core() class OAuth2Backend(object): """ Authenticate against an OAuth2 access token """ def authenticate(self, **credentials): ...
6874ebd9e1d1ad3cd9a0babc0797558ef76527a9
picoCTF-web/api/api/setup.py
picoCTF-web/api/api/setup.py
""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.groups.ensure_inde...
""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.groups.ensure_inde...
Index on the cache collection. More work could be done here
Index on the cache collection. More work could be done here
Python
mit
picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF
""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.groups.ensure_inde...
""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.groups.ensure_inde...
<commit_before>""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.gro...
""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.groups.ensure_inde...
""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.groups.ensure_inde...
<commit_before>""" Setup for the API """ import api log = api.logger.use(__name__) def index_mongo(): """ Ensure the mongo collections are indexed. """ db = api.common.get_conn() log.debug("Ensuring mongo is indexed.") db.users.ensure_index("uid", unique=True, name="unique uid") db.gro...
922df036fdb2642f5a9fc0c126e36169315242db
direnaj/direnaj_api/config/server_celeryconfig.py
direnaj/direnaj_api/config/server_celeryconfig.py
__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( Queue('timelines', ...
__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( #Queue('timelines',...
Fix for periodic task scheduler (5)
Fix for periodic task scheduler (5)
Python
mit
boun-cmpe-soslab/drenaj,boun-cmpe-soslab/drenaj,boun-cmpe-soslab/drenaj,boun-cmpe-soslab/drenaj
__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( Queue('timelines', ...
__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( #Queue('timelines',...
<commit_before>__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( Queu...
__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( #Queue('timelines',...
__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( Queue('timelines', ...
<commit_before>__author__ = 'onur' from kombu import Queue CELERY_ACKS_LATE = True CELERYD_PREFETCH_MULTIPLIER = 1 BROKER_URL = 'amqp://%s' % "direnaj-staging.cmpe.boun.edu.tr" CELERY_DEFAULT_QUEUE = 'control' CELERY_DEFAULT_EXCHANGE = 'campaigns' CELERY_DEFAULT_EXCHANGE_TYPE = 'topic' CELERY_QUEUES = ( Queu...
d2f31bf45b7dfcf7dc9e62e442c99a1c1eb98e89
docs/examples/api/accessing_values_test.py
docs/examples/api/accessing_values_test.py
import mappyfile def test(): # START OF API EXAMPLE # load will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] layer2 = layers...
import mappyfile def test(): # START OF API EXAMPLE # open will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] layer2 = layers...
Update example to match new API
Update example to match new API
Python
mit
geographika/mappyfile,geographika/mappyfile
import mappyfile def test(): # START OF API EXAMPLE # load will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] layer2 = layers...
import mappyfile def test(): # START OF API EXAMPLE # open will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] layer2 = layers...
<commit_before>import mappyfile def test(): # START OF API EXAMPLE # load will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] ...
import mappyfile def test(): # START OF API EXAMPLE # open will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] layer2 = layers...
import mappyfile def test(): # START OF API EXAMPLE # load will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] layer2 = layers...
<commit_before>import mappyfile def test(): # START OF API EXAMPLE # load will accept a filename (loads will accept a string) mapfile = mappyfile.open("./docs/examples/raster.map") # print the map name print(mapfile["name"]) # "MyMap" # access layers layers = mapfile["layers"] ...
51533420b6422515ea10fb323cb318c104a99650
pypi/models.py
pypi/models.py
from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' unique_together = ('name', 'version') def __unicode__(self):...
from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' ordering = ('-version',) unique_together = ('name', 'vers...
Order by version instead, it should mostly be what we want.
Order by version instead, it should mostly be what we want.
Python
mit
kitsunde/django-pypi
from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' unique_together = ('name', 'version') def __unicode__(self):...
from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' ordering = ('-version',) unique_together = ('name', 'vers...
<commit_before>from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' unique_together = ('name', 'version') def __u...
from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' ordering = ('-version',) unique_together = ('name', 'vers...
from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' unique_together = ('name', 'version') def __unicode__(self):...
<commit_before>from django.db import models class Package(models.Model): name = models.CharField(max_length=100) version = models.CharField(max_length=100) released_at = models.DateTimeField() class Meta: get_latest_by = 'released_at' unique_together = ('name', 'version') def __u...
7b6125c0af688ec1b6b4e0baf667e71064dbb0cf
test/unit/Algorithms/OrdinaryPercolationTest.py
test/unit/Algorithms/OrdinaryPercolationTest.py
import OpenPNM mgr = OpenPNM.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5]) self.geo = OpenPNM.Geometry.Toray090(network=self.net, pores=self.net.Ps, ...
import OpenPNM as op import scipy as sp mgr = op.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = op.Network.Cubic(shape=[5, 5, 5]) self.geo = op.Geometry.Toray090(network=self.net, pores=self.net.Ps, ...
Add unit test for late pore filling
Add unit test for late pore filling
Python
mit
TomTranter/OpenPNM,PMEAL/OpenPNM
import OpenPNM mgr = OpenPNM.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5]) self.geo = OpenPNM.Geometry.Toray090(network=self.net, pores=self.net.Ps, ...
import OpenPNM as op import scipy as sp mgr = op.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = op.Network.Cubic(shape=[5, 5, 5]) self.geo = op.Geometry.Toray090(network=self.net, pores=self.net.Ps, ...
<commit_before>import OpenPNM mgr = OpenPNM.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5]) self.geo = OpenPNM.Geometry.Toray090(network=self.net, pores=self.net.P...
import OpenPNM as op import scipy as sp mgr = op.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = op.Network.Cubic(shape=[5, 5, 5]) self.geo = op.Geometry.Toray090(network=self.net, pores=self.net.Ps, ...
import OpenPNM mgr = OpenPNM.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5]) self.geo = OpenPNM.Geometry.Toray090(network=self.net, pores=self.net.Ps, ...
<commit_before>import OpenPNM mgr = OpenPNM.Base.Workspace() mgr.loglevel = 60 class OrdinaryPercolationTest: def setup_test(self): self.net = OpenPNM.Network.Cubic(shape=[5, 5, 5]) self.geo = OpenPNM.Geometry.Toray090(network=self.net, pores=self.net.P...
fdf33278f66028a932dbecb999f66445ab0a3cd1
shuup/admin/modules/product_types/views/edit.py
shuup/admin/modules/product_types/views/edit.py
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import forms from shu...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from shuup.admin.forms.fields impo...
Use Select2 in attribute selection
Use Select2 in attribute selection With large amounts of attributes product type creation was really slow Refs SH-73
Python
agpl-3.0
shawnadelic/shuup,suutari-ai/shoop,shoopio/shoop,suutari-ai/shoop,shawnadelic/shuup,hrayr-artunyan/shuup,suutari/shoop,suutari/shoop,hrayr-artunyan/shuup,suutari/shoop,suutari-ai/shoop,hrayr-artunyan/shuup,shoopio/shoop,shawnadelic/shuup,shoopio/shoop
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import forms from shu...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from shuup.admin.forms.fields impo...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import ...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from shuup.admin.forms.fields impo...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import forms from shu...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import ...
6d6709b0df05cccfd44bd68cea9fb30c4b6bd41f
asymmetric_jwt_auth/models.py
asymmetric_jwt_auth/models.py
from django.conf import settings from django.db import models from django.contrib.auth.models import User class PublicKey(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='public_keys') key = models.TextField(help_text="The user's RSA public key") comment = models.CharField(m...
from django.conf import settings from django.db import models from django.contrib.auth.models import User from django.core.exceptions import ValidationError from cryptography.hazmat.primitives.serialization import load_ssh_public_key from cryptography.hazmat.backends import default_backend def validate_public_key(val...
Validate a public key before saving it
Validate a public key before saving it
Python
isc
crgwbr/asymmetric_jwt_auth,crgwbr/asymmetric_jwt_auth
from django.conf import settings from django.db import models from django.contrib.auth.models import User class PublicKey(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='public_keys') key = models.TextField(help_text="The user's RSA public key") comment = models.CharField(m...
from django.conf import settings from django.db import models from django.contrib.auth.models import User from django.core.exceptions import ValidationError from cryptography.hazmat.primitives.serialization import load_ssh_public_key from cryptography.hazmat.backends import default_backend def validate_public_key(val...
<commit_before>from django.conf import settings from django.db import models from django.contrib.auth.models import User class PublicKey(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='public_keys') key = models.TextField(help_text="The user's RSA public key") comment = mod...
from django.conf import settings from django.db import models from django.contrib.auth.models import User from django.core.exceptions import ValidationError from cryptography.hazmat.primitives.serialization import load_ssh_public_key from cryptography.hazmat.backends import default_backend def validate_public_key(val...
from django.conf import settings from django.db import models from django.contrib.auth.models import User class PublicKey(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='public_keys') key = models.TextField(help_text="The user's RSA public key") comment = models.CharField(m...
<commit_before>from django.conf import settings from django.db import models from django.contrib.auth.models import User class PublicKey(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='public_keys') key = models.TextField(help_text="The user's RSA public key") comment = mod...
eab3b3417f649e06c5d3f09b6c3369ef92da2e7d
users/admin.py
users/admin.py
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models import User, Membe...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models import User, Membe...
Add a filter for membership_type.
Add a filter for membership_type.
Python
apache-2.0
malemburg/pythondotorg,Mariatta/pythondotorg,lebronhkh/pythondotorg,lebronhkh/pythondotorg,fe11x/pythondotorg,lepture/pythondotorg,proevo/pythondotorg,willingc/pythondotorg,ahua/pythondotorg,SujaySKumar/pythondotorg,ahua/pythondotorg,berkerpeksag/pythondotorg,python/pythondotorg,SujaySKumar/pythondotorg,fe11x/pythondot...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models import User, Membe...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models import User, Membe...
<commit_before>from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models imp...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models import User, Membe...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models import User, Membe...
<commit_before>from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import AdminPasswordChangeForm from tastypie.admin import ApiKeyInline from tastypie.models import ApiKey from .forms import UserCreationForm, UserChangeForm from .models imp...
5657fb5cb8d5abbc8f6ab8cf59208a97e8104f34
utils/graph.py
utils/graph.py
""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color='red'): plt.p...
""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color='red'): plt.p...
Remove unused `--output stdout` option
Remove unused `--output stdout` option
Python
mit
wei2912/bce-simulation,wei2912/bce-simulation,wei2912/bce-simulation,wei2912/bce-simulation
""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color='red'): plt.p...
""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color='red'): plt.p...
<commit_before>""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color...
""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color='red'): plt.p...
""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color='red'): plt.p...
<commit_before>""" This module serves as an interface to matplotlib. """ from utils import config OFFSET = 2 # offset = max_x/stepsize * OFFSET def init(output): import matplotlib config.mpl(matplotlib, bool(output)) from matplotlib import pyplot globals()['plt'] = pyplot def line_plot(xs, ys, color...
0e301d3ee54366187b2e12fa5c6927f27e907347
tools/python/frame_processor/frame_processor.py
tools/python/frame_processor/frame_processor.py
from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configuration container ...
from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configuration container ...
Update python frame processor test harness to send IPC JSON messages to frame receiver for testing of control path and channel multiplexing
Update python frame processor test harness to send IPC JSON messages to frame receiver for testing of control path and channel multiplexing
Python
apache-2.0
odin-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,odin-detector/odin-data,percival-detector/odin-data,percival-detector/odin-data,percival-detector/odin-data,percival-detector/odin-data,odin-det...
from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configuration container ...
from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configuration container ...
<commit_before>from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configura...
from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configuration container ...
from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configuration container ...
<commit_before>from frame_receiver.ipc_channel import IpcChannel, IpcChannelException from frame_receiver.ipc_message import IpcMessage, IpcMessageException from frame_processor_config import FrameProcessorConfig import time class FrameProcessor(object): def __init__(self): # Instantiate a configura...
90506789edab1afb58ecebb90218f2654498a754
regserver/regserver/urls.py
regserver/regserver/urls.py
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), url(r'^eregulations/', include('regulations.urls')), )
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), )
Remove eregulations url as reversing is not consistent
Remove eregulations url as reversing is not consistent
Python
cc0-1.0
18F/regulations-site,adderall/regulations-site,eregs/regulations-site,EricSchles/regulations-site,grapesmoker/regulations-site,tadhg-ohiggins/regulations-site,ascott1/regulations-site,jeremiak/regulations-site,ascott1/regulations-site,willbarton/regulations-site,EricSchles/regulations-site,jeremiak/regulations-site,gra...
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), url(r'^eregulations/', include('regulations.urls')), ) Remove eregulations url as reversing is not consistent
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), )
<commit_before>from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), url(r'^eregulations/', include('regulations.urls')), ) <commit_msg>Remove eregulations url as reversing is not consistent<commit_after>
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), )
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), url(r'^eregulations/', include('regulations.urls')), ) Remove eregulations url as reversing is not consistentfrom django.conf.urls import patterns, include, url urlpatterns = patterns( ...
<commit_before>from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'', include('regulations.urls')), url(r'^eregulations/', include('regulations.urls')), ) <commit_msg>Remove eregulations url as reversing is not consistent<commit_after>from django.conf.urls import patterns,...
a2be69f45ffa351c43a60d3eca0414788e9c9737
cherrypy/test/test_native.py
cherrypy/test/test_native.py
"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason="tests fail on Windows", ) @pytest.fixture def cp_native_server(request): """A native server.""" class Root(object)...
"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason='tests fail on Windows', ) @pytest.fixture def cp_native_server(request): """A native server.""" class Root(object)...
Replace double quotes with single ones
Replace double quotes with single ones
Python
bsd-3-clause
cherrypy/cherrypy,Safihre/cherrypy,cherrypy/cherrypy,Safihre/cherrypy
"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason="tests fail on Windows", ) @pytest.fixture def cp_native_server(request): """A native server.""" class Root(object)...
"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason='tests fail on Windows', ) @pytest.fixture def cp_native_server(request): """A native server.""" class Root(object)...
<commit_before>"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason="tests fail on Windows", ) @pytest.fixture def cp_native_server(request): """A native server.""" cla...
"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason='tests fail on Windows', ) @pytest.fixture def cp_native_server(request): """A native server.""" class Root(object)...
"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason="tests fail on Windows", ) @pytest.fixture def cp_native_server(request): """A native server.""" class Root(object)...
<commit_before>"""Test the native server.""" import pytest from requests_toolbelt import sessions import cherrypy._cpnative_server pytestmark = pytest.mark.skipif( 'sys.platform == "win32"', reason="tests fail on Windows", ) @pytest.fixture def cp_native_server(request): """A native server.""" cla...
c4dc76587a5021de30e8811332869fa4cc6f9ed0
bucketeer/test/test_commit.py
bucketeer/test/test_commit.py
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3() bucket = c...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on existing bucket ...
Add create and remove file for setUp and tearDown
Add create and remove file for setUp and tearDown
Python
mit
mgarbacz/bucketeer
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3() bucket = c...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on existing bucket ...
<commit_before>import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3()...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on existing bucket ...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3() bucket = c...
<commit_before>import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3()...
236f10e790757db0cc563f5f19ca5863877b1e7f
busstops/management/tests/test_import_singapore.py
busstops/management/tests/test_import_singapore.py
import os import vcr from django.test import TestCase, override_settings from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classmethod def s...
import os import vcr from django.test import TestCase from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classmethod def setUpTestData(cls): ...
Remove unused import to fix flake8
Remove unused import to fix flake8
Python
mpl-2.0
jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk
import os import vcr from django.test import TestCase, override_settings from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classmethod def s...
import os import vcr from django.test import TestCase from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classmethod def setUpTestData(cls): ...
<commit_before>import os import vcr from django.test import TestCase, override_settings from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classm...
import os import vcr from django.test import TestCase from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classmethod def setUpTestData(cls): ...
import os import vcr from django.test import TestCase, override_settings from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classmethod def s...
<commit_before>import os import vcr from django.test import TestCase, override_settings from django.core.management import call_command from ...models import StopPoint, Service, Place FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') class ImportSingaporeTest(TestCase): @classm...
34ab7f1090d878bf8328f25f0fa4be4e575e7f43
numba/sigutils.py
numba/sigutils.py
from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _parse_signature...
from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _parse_signature...
Update return value order in normalize_signature docstring
Update return value order in normalize_signature docstring [skip ci]
Python
bsd-2-clause
IntelLabs/numba,gmarkall/numba,jriehl/numba,jriehl/numba,seibert/numba,numba/numba,IntelLabs/numba,stonebig/numba,stonebig/numba,stonebig/numba,stonebig/numba,sklam/numba,stuartarchibald/numba,seibert/numba,stuartarchibald/numba,jriehl/numba,seibert/numba,cpcloud/numba,cpcloud/numba,cpcloud/numba,numba/numba,IntelLabs/...
from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _parse_signature...
from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _parse_signature...
<commit_before>from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _...
from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _parse_signature...
from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _parse_signature...
<commit_before>from __future__ import print_function, division, absolute_import from numba import types, typing def is_signature(sig): """ Return whether *sig* is a potentially valid signature specification (for user-facing APIs). """ return isinstance(sig, (str, tuple, typing.Signature)) def _...
b1d889dc4207af08e8c1ee3f75006fa6b4051376
vitrage/rpc.py
vitrage/rpc.py
# Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 applicabl...
# Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 applicabl...
Set access_policy for messaging's dispatcher
Set access_policy for messaging's dispatcher oslo.messaging allow dispatcher to restrict endpoint methods since 5.11.0 in d3a8f280ebd6fd12865fd20c4d772774e39aefa2, set with DefaultRPCAccessPolicy to fix FutureWarning like: "The access_policy argument is changing its default value to <class 'oslo_messaging.rpc.dispatc...
Python
apache-2.0
openstack/vitrage,openstack/vitrage,openstack/vitrage
# Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 applicabl...
# Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 applicabl...
<commit_before># Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 requir...
# Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 applicabl...
# Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 applicabl...
<commit_before># Copyright 2015 - Alcatel-Lucent # Copyright 2016 - Nokia # # 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 requir...
b521c3a23d2802419fa2e15839aaceb27794ab64
nikola/md.py
nikola/md.py
"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data) with codecs.open(dest, "w+", "utf8")...
"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs import re from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data, ['fenced_code', 'codehilite']) ...
Make python-markdown play well with pygments.
Make python-markdown play well with pygments. Use the codehilite and fenced_code extensions, and add a regexp substitution to make the codehilite extension match pygments' css "api".
Python
mit
damianavila/nikola,x1101/nikola,wcmckee/nikola,jjconti/nikola,knowsuchagency/nikola,TyberiusPrime/nikola,pluser/nikola,yamila-moreno/nikola,getnikola/nikola,immanetize/nikola,Proteus-tech/nikola,okin/nikola,lucacerone/nikola,techdragon/nikola,TyberiusPrime/nikola,Proteus-tech/nikola,xuhdev/nikola,schettino72/nikola,tec...
"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data) with codecs.open(dest, "w+", "utf8")...
"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs import re from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data, ['fenced_code', 'codehilite']) ...
<commit_before>"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data) with codecs.open(dest...
"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs import re from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data, ['fenced_code', 'codehilite']) ...
"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data) with codecs.open(dest, "w+", "utf8")...
<commit_before>"""Implementation of compile_html based on markdown.""" __all__ = ['compile_html'] import codecs from markdown import markdown def compile_html(source, dest): with codecs.open(source, "r", "utf8") as in_file: data = in_file.read() output = markdown(data) with codecs.open(dest...
bcd7f8f3d7313538ab1c04da9c42e774350ccdfe
ui/widgets/histogram/TrackingHistogramWidget.py
ui/widgets/histogram/TrackingHistogramWidget.py
""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget """ updatePosition = Signal...
""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem from ui.widgets import Style class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget ...
Fix background color on OS X for histogram widget of ray.
Fix background color on OS X for histogram widget of ray.
Python
mit
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget """ updatePosition = Signal...
""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem from ui.widgets import Style class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget ...
<commit_before>""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget """ updatePo...
""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem from ui.widgets import Style class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget ...
""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget """ updatePosition = Signal...
<commit_before>""" TrackingHistogramWidget :Authors: Berend Klein Haneveld """ from PySide.QtGui import * from PySide.QtCore import * from HistogramWidget import HistogramWidget from TrackingNodeItem import TrackingNodeItem class TrackingHistogramWidget(HistogramWidget): """ TrackingHistogramWidget """ updatePo...
7c7319590e5deaed36365f91fb0aebdf93407f07
__init__.py
__init__.py
from ._jute import Interface, Dynamic __all__ = [ 'Interface', 'Dynamic', ]
from ._jute import Interface, Dynamic, InterfaceConformanceError __all__ = [ 'Interface', 'Dynamic', 'InterfaceConformanceError', ]
Add InterfaceConformanceError to exported names.
Add InterfaceConformanceError to exported names.
Python
mit
jongiddy/jute,jongiddy/jute
from ._jute import Interface, Dynamic __all__ = [ 'Interface', 'Dynamic', ] Add InterfaceConformanceError to exported names.
from ._jute import Interface, Dynamic, InterfaceConformanceError __all__ = [ 'Interface', 'Dynamic', 'InterfaceConformanceError', ]
<commit_before>from ._jute import Interface, Dynamic __all__ = [ 'Interface', 'Dynamic', ] <commit_msg>Add InterfaceConformanceError to exported names.<commit_after>
from ._jute import Interface, Dynamic, InterfaceConformanceError __all__ = [ 'Interface', 'Dynamic', 'InterfaceConformanceError', ]
from ._jute import Interface, Dynamic __all__ = [ 'Interface', 'Dynamic', ] Add InterfaceConformanceError to exported names.from ._jute import Interface, Dynamic, InterfaceConformanceError __all__ = [ 'Interface', 'Dynamic', 'InterfaceConformanceError', ]
<commit_before>from ._jute import Interface, Dynamic __all__ = [ 'Interface', 'Dynamic', ] <commit_msg>Add InterfaceConformanceError to exported names.<commit_after>from ._jute import Interface, Dynamic, InterfaceConformanceError __all__ = [ 'Interface', 'Dynamic', 'InterfaceConformanceError', ]
87cd4025aed62d76e3c64ba939f5241307b4478f
CascadeCount.py
CascadeCount.py
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
Load from the pre processed data
Load from the pre processed data
Python
mit
danjamker/DiffusionSimulation
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
<commit_before>from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.proto...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.protocol import JSON...
<commit_before>from __future__ import division import gzip try: from BytesIO import BytesIO except ImportError: from io import BytesIO try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import hdfs import pandas as pd from mrjob.job import MRJob from mrjob.proto...
caab96114964a1c9154df67d97c66c701cede8d9
waterbutler/core/__init__.py
waterbutler/core/__init__.py
from waterbutler.core.utils import async_retry from waterbutler.core.utils import backgrounded __all__ = [ 'backgrounded', 'async_retry' ]
from waterbutler.core.utils import async_retry from waterbutler.core.utils import make_provider __all__ = [ 'async_retry', 'make_provider', ]
Allow make_provider to be imported from waterbutler core
Allow make_provider to be imported from waterbutler core
Python
apache-2.0
chrisseto/waterbutler,Johnetordoff/waterbutler,rafaeldelucena/waterbutler,cosenal/waterbutler,CenterForOpenScience/waterbutler,rdhyee/waterbutler,Ghalko/waterbutler,kwierman/waterbutler,icereval/waterbutler,felliott/waterbutler,hmoco/waterbutler,TomBaxter/waterbutler,RCOSDP/waterbutler
from waterbutler.core.utils import async_retry from waterbutler.core.utils import backgrounded __all__ = [ 'backgrounded', 'async_retry' ] Allow make_provider to be imported from waterbutler core
from waterbutler.core.utils import async_retry from waterbutler.core.utils import make_provider __all__ = [ 'async_retry', 'make_provider', ]
<commit_before>from waterbutler.core.utils import async_retry from waterbutler.core.utils import backgrounded __all__ = [ 'backgrounded', 'async_retry' ] <commit_msg>Allow make_provider to be imported from waterbutler core<commit_after>
from waterbutler.core.utils import async_retry from waterbutler.core.utils import make_provider __all__ = [ 'async_retry', 'make_provider', ]
from waterbutler.core.utils import async_retry from waterbutler.core.utils import backgrounded __all__ = [ 'backgrounded', 'async_retry' ] Allow make_provider to be imported from waterbutler corefrom waterbutler.core.utils import async_retry from waterbutler.core.utils import make_provider __all__ = [ 'as...
<commit_before>from waterbutler.core.utils import async_retry from waterbutler.core.utils import backgrounded __all__ = [ 'backgrounded', 'async_retry' ] <commit_msg>Allow make_provider to be imported from waterbutler core<commit_after>from waterbutler.core.utils import async_retry from waterbutler.core.utils ...
44f92d7c96b074054b11876d208494da1acef7e7
Lib/tempfile.py
Lib/tempfile.py
# Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Kludge to hold mutable state class Struct: pass G = Struct() G.i = 0 # User-callable function # XXX Should thi...
# Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Counter for generating unique names counter = 0 # User-callable function # XXX Should this have a parameter, l...
Use 'global' instead of struct kludge.
Use 'global' instead of struct kludge.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
# Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Kludge to hold mutable state class Struct: pass G = Struct() G.i = 0 # User-callable function # XXX Should thi...
# Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Counter for generating unique names counter = 0 # User-callable function # XXX Should this have a parameter, l...
<commit_before># Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Kludge to hold mutable state class Struct: pass G = Struct() G.i = 0 # User-callable function #...
# Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Counter for generating unique names counter = 0 # User-callable function # XXX Should this have a parameter, l...
# Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Kludge to hold mutable state class Struct: pass G = Struct() G.i = 0 # User-callable function # XXX Should thi...
<commit_before># Temporary file name allocation import posix import path # Changeable parameters (by clients!)... # XXX Should the environment variable $TMPDIR override tempdir? tempdir = '/usr/tmp' template = '@' # Kludge to hold mutable state class Struct: pass G = Struct() G.i = 0 # User-callable function #...
70323d2cc7c568fecda66adb0e8ace1922b15b8f
recipes/graphviz/run_test.py
recipes/graphviz/run_test.py
#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=...
#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=...
Add tests for svg and pdf on Windows
Add tests for svg and pdf on Windows
Python
bsd-3-clause
cpaulik/staged-recipes,jerowe/staged-recipes,cpaulik/staged-recipes,asmeurer/staged-recipes,hajapy/staged-recipes,guillochon/staged-recipes,richardotis/staged-recipes,glemaitre/staged-recipes,kwilcox/staged-recipes,patricksnape/staged-recipes,pstjohn/staged-recipes,johannesring/staged-recipes,caspervdw/staged-recipes,p...
#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=...
#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=...
<commit_before>#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da....
#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=...
#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da.ones(4, chunks=...
<commit_before>#!/usr/bin/env python import os # This is failing for now on Windows. We need to submit # a patch to the graphviz package to fix it if not os.name == 'nt': # Install graphviz Python package import pip pip.main(['install', 'graphviz']) # Dask test import dask.array as da x = da....
18550958c5c6d3a2d56074d53aa4f0b73e510163
AT0206/Analysis/signal_mask.py
AT0206/Analysis/signal_mask.py
''' Make a mask of the emission ''' cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) noise_cube = Noise(cube) new_noise = noise_cube.scale cube = cube.with_mask(cube > new_noise*u.Jy) # Load in the broad clean mask used clean_mask = fits.getdata("../../../Arecibo/M33_newmask.f...
''' Make a mask of the emission ''' from astropy.io import fits from spectral_cube import SpectralCube, BooleanArrayMask from signal_id import RadioMask, Noise from astropy import units as u make_mask = True save_mask = False cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) if...
Choose whether to make new mask
Choose whether to make new mask
Python
mit
e-koch/VLA_Lband,e-koch/VLA_Lband
''' Make a mask of the emission ''' cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) noise_cube = Noise(cube) new_noise = noise_cube.scale cube = cube.with_mask(cube > new_noise*u.Jy) # Load in the broad clean mask used clean_mask = fits.getdata("../../../Arecibo/M33_newmask.f...
''' Make a mask of the emission ''' from astropy.io import fits from spectral_cube import SpectralCube, BooleanArrayMask from signal_id import RadioMask, Noise from astropy import units as u make_mask = True save_mask = False cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) if...
<commit_before> ''' Make a mask of the emission ''' cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) noise_cube = Noise(cube) new_noise = noise_cube.scale cube = cube.with_mask(cube > new_noise*u.Jy) # Load in the broad clean mask used clean_mask = fits.getdata("../../../Arecib...
''' Make a mask of the emission ''' from astropy.io import fits from spectral_cube import SpectralCube, BooleanArrayMask from signal_id import RadioMask, Noise from astropy import units as u make_mask = True save_mask = False cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) if...
''' Make a mask of the emission ''' cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) noise_cube = Noise(cube) new_noise = noise_cube.scale cube = cube.with_mask(cube > new_noise*u.Jy) # Load in the broad clean mask used clean_mask = fits.getdata("../../../Arecibo/M33_newmask.f...
<commit_before> ''' Make a mask of the emission ''' cube = SpectralCube.read("M33_206_b_c_HI.fits") cube = cube.with_mask(cube != 0*u.Jy) noise_cube = Noise(cube) new_noise = noise_cube.scale cube = cube.with_mask(cube > new_noise*u.Jy) # Load in the broad clean mask used clean_mask = fits.getdata("../../../Arecib...
62400c15ceafe1af9a41d526deb94591ebdd3bcb
ideascube/conf/idb_irq_bardarash.py
ideascube/conf/idb_irq_bardarash.py
"""Bardarash in Kurdistan, Iraq""" from .azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation',...
"""Bardarash in Kurdistan, Iraq""" from .idb_jor_azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occu...
Fix import bardarash conf import path
Fix import bardarash conf import path
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
"""Bardarash in Kurdistan, Iraq""" from .azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation',...
"""Bardarash in Kurdistan, Iraq""" from .idb_jor_azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occu...
<commit_before>"""Bardarash in Kurdistan, Iraq""" from .azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_orig...
"""Bardarash in Kurdistan, Iraq""" from .idb_jor_azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occu...
"""Bardarash in Kurdistan, Iraq""" from .azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation',...
<commit_before>"""Bardarash in Kurdistan, Iraq""" from .azraq import * # noqa from django.utils.translation import ugettext_lazy as _ USER_FORM_FIELDS = ( ('Ideasbox', ['serial', 'box_awareness']), (_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_orig...
a03d34cbfd4f9fcf98ba0cb4584a24f0632897cf
Simulator/src/sim_tools/text_box.py
Simulator/src/sim_tools/text_box.py
import pygame class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmethod def draw(self, disp...
import pygame #WRITEN BY JACOB PANIKULAM class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmeth...
Add Jake's name to top of file
Add Jake's name to top of file
Python
mit
ufieeehw/IEEE2016,ufieeehw/IEEE2016,ufieeehw/IEEE2016,ufieeehw/IEEE2016
import pygame class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmethod def draw(self, disp...
import pygame #WRITEN BY JACOB PANIKULAM class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmeth...
<commit_before>import pygame class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmethod def ...
import pygame #WRITEN BY JACOB PANIKULAM class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmeth...
import pygame class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmethod def draw(self, disp...
<commit_before>import pygame class Text_Box(object): '''Text_Box() You never have to initialize this! Just call Text_Box.draw(display, pos, color, text) It draws the same way a pygame primitive would. ''' pygame.font.init() font = pygame.font.SysFont("monospace", 15) @classmethod def ...
29fa35d8ff6fa26e676c693ea17faeb03440d116
scripts/3b-show-features.py
scripts/3b-show-features.py
#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # specified method an...
#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # specified method an...
Support showing features for a single image.
Support showing features for a single image. Former-commit-id: 4143a53dae02b9ece391f65a47c060bbcfd0b7a8
Python
mit
UASLab/ImageAnalysis
#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # specified method an...
#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # specified method an...
<commit_before>#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # spec...
#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # specified method an...
#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # specified method an...
<commit_before>#!/usr/bin/python import sys sys.path.insert(0, "/usr/local/opencv-2.4.11/lib/python2.7/site-packages/") import argparse import commands import cv2 import fnmatch import os.path sys.path.append('../lib') import ProjectMgr # for all the images in the project image_dir, detect features using the # spec...
0fc7a7962579cef554b30028e56923e2d05903c1
custom/icds_reports/models/manager.py
custom/icds_reports/models/manager.py
from __future__ import absolute_import, unicode_literals import uuid from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER class CitusComparisonQuerySet(QuerySet): def _fetch_all(self): ...
from __future__ import absolute_import, unicode_literals import json import uuid from django.core.serializers.json import DjangoJSONEncoder from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER cla...
Use django json encoder for models manger params
Use django json encoder for models manger params
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from __future__ import absolute_import, unicode_literals import uuid from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER class CitusComparisonQuerySet(QuerySet): def _fetch_all(self): ...
from __future__ import absolute_import, unicode_literals import json import uuid from django.core.serializers.json import DjangoJSONEncoder from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER cla...
<commit_before>from __future__ import absolute_import, unicode_literals import uuid from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER class CitusComparisonQuerySet(QuerySet): def _fetch_all...
from __future__ import absolute_import, unicode_literals import json import uuid from django.core.serializers.json import DjangoJSONEncoder from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER cla...
from __future__ import absolute_import, unicode_literals import uuid from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER class CitusComparisonQuerySet(QuerySet): def _fetch_all(self): ...
<commit_before>from __future__ import absolute_import, unicode_literals import uuid from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from corehq.toggles import ICDS_COMPARE_QUERIES_AGAINST_CITUS, NAMESPACE_OTHER class CitusComparisonQuerySet(QuerySet): def _fetch_all...
307b728c36adafab3832a03fffc6edef67828ca5
scripts/launch.py
scripts/launch.py
import logging from os import getenv import sys from flash import app logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', 5000)), debug=F...
import logging from os import getenv import sys logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) from flash import app if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', 5000)), debug=F...
Configure logging before importing application
Configure logging before importing application
Python
isc
textbook/flash,textbook/flash,textbook/flash
import logging from os import getenv import sys from flash import app logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', 5000)), debug=F...
import logging from os import getenv import sys logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) from flash import app if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', 5000)), debug=F...
<commit_before>import logging from os import getenv import sys from flash import app logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', ...
import logging from os import getenv import sys logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) from flash import app if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', 5000)), debug=F...
import logging from os import getenv import sys from flash import app logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', 5000)), debug=F...
<commit_before>import logging from os import getenv import sys from flash import app logging.basicConfig( datefmt='%Y/%m/%d %H.%M.%S', format='%(levelname)s:%(name)s:%(message)s', level=logging.DEBUG, stream=sys.stdout, ) if __name__ == '__main__': app.run(host='0.0.0.0', port=int(getenv('PORT', ...
66ce0f3ce263804a032e399f8019fb481d4c4adc
manchester_traffic_offences/context_processors.py
manchester_traffic_offences/context_processors.py
from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', # Propositio...
from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', # Propositio...
Switch phase tag to BETA
Switch phase tag to BETA
Python
mit
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', # Propositio...
from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', # Propositio...
<commit_before>from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', ...
from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', # Propositio...
from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', # Propositio...
<commit_before>from django.conf import settings from django.utils.translation import ugettext as _, get_language from django.utils.safestring import mark_safe def globals(request): return { # Application Title (Populates <title>) 'app_title': _('Make a Plea: Traffic offences') + ' - GOV.UK', ...
cf550ac3a00531f2f964fbbb7e27c37071983d26
utils/aiohttp_wrap.py
utils/aiohttp_wrap.py
#!/bin/env python import aiohttp async def aio_get(url: str): async with aiohttp.ClientSession() as session: <<<<<<< HEAD async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async def aio_get_jso...
#!/bin/env python import aiohttp async def aio_get_text(url, headers=None): async with aiohttp.ClientSession() as session: async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async def aio_get_js...
Revert "Revert "progress on DDG cog & aiohttp wrapper""
Revert "Revert "progress on DDG cog & aiohttp wrapper"" This reverts commit 85d3b1203d9861f986356e593a2b79d96c38c1b3.
Python
mit
Naught0/qtbot
#!/bin/env python import aiohttp async def aio_get(url: str): async with aiohttp.ClientSession() as session: <<<<<<< HEAD async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async def aio_get_jso...
#!/bin/env python import aiohttp async def aio_get_text(url, headers=None): async with aiohttp.ClientSession() as session: async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async def aio_get_js...
<commit_before>#!/bin/env python import aiohttp async def aio_get(url: str): async with aiohttp.ClientSession() as session: <<<<<<< HEAD async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async ...
#!/bin/env python import aiohttp async def aio_get_text(url, headers=None): async with aiohttp.ClientSession() as session: async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async def aio_get_js...
#!/bin/env python import aiohttp async def aio_get(url: str): async with aiohttp.ClientSession() as session: <<<<<<< HEAD async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async def aio_get_jso...
<commit_before>#!/bin/env python import aiohttp async def aio_get(url: str): async with aiohttp.ClientSession() as session: <<<<<<< HEAD async with session.get(url, headers=headers) as r: if r.status == 200: return r.text() else: return None async ...
a0d614591ff472ca2904de5c562931d50f5654f3
publishconf.py
publishconf.py
#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/...
#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/...
Update Google Analytics tracking ID
Update Google Analytics tracking ID
Python
mit
edwinksl/edwinksl.github.io,edwinksl/edwinksl.github.io,edwinksl/edwinksl.github.io,edwinksl/edwinksl.github.io
#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/...
#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/...
<commit_before>#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED...
#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/...
#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/...
<commit_before>#!/usr/bin/env python # This file is only used if you use `make publish` or explicitly specify it as your config file import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://www.edwinksl.com' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED...
b278eef6eb0f92694e70118e1e07855ea92dec5b
pulsar/client/transport/requests.py
pulsar/client/transport/requests.py
from __future__ import absolute_import try: from galaxy import eggs eggs.require("requets") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_available = True exce...
from __future__ import absolute_import try: from galaxy import eggs eggs.require("requests") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_available = True exc...
Fix typo Nate caught in Galaxy.
Fix typo Nate caught in Galaxy.
Python
apache-2.0
natefoo/pulsar,galaxyproject/pulsar,ssorgatem/pulsar,galaxyproject/pulsar,jmchilton/pulsar,natefoo/pulsar,ssorgatem/pulsar,jmchilton/pulsar
from __future__ import absolute_import try: from galaxy import eggs eggs.require("requets") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_available = True exce...
from __future__ import absolute_import try: from galaxy import eggs eggs.require("requests") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_available = True exc...
<commit_before>from __future__ import absolute_import try: from galaxy import eggs eggs.require("requets") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_availa...
from __future__ import absolute_import try: from galaxy import eggs eggs.require("requests") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_available = True exc...
from __future__ import absolute_import try: from galaxy import eggs eggs.require("requets") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_available = True exce...
<commit_before>from __future__ import absolute_import try: from galaxy import eggs eggs.require("requets") except ImportError: pass try: import requests except ImportError: requests = None requests_multipart_post_available = False try: import requests_toolbelt requests_multipart_post_availa...
6ce6f22837b9e6a1dc8423038b6e2eb3d0a8de89
rxet/helper.py
rxet/helper.py
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0]
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]
Add big endian integer reading
Add big endian integer reading
Python
mit
RenolY2/battalion-tools
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0]Add big endian integer reading
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]
<commit_before>from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0]<commit_msg>Add big endian integer reading<commit_after>
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0]Add big endian integer readingfrom struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.r...
<commit_before>from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0]<commit_msg>Add big endian integer reading<commit_after>from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fi...
0d33cf650480ea7b71e13ef67b566fc6ec1c93ee
demo/demo/todos/models.py
demo/demo/todos/models.py
from django.db import models class Todo(models.Model): name = models.CharField(max_length=200) complete = models.BooleanField()
from django.db import models class Todo(models.Model): name = models.CharField(max_length=200)
Remove "complete" boolean from demo todo model.
Remove "complete" boolean from demo todo model.
Python
bsd-3-clause
jgerigmeyer/jquery-django-superformset,jgerigmeyer/jquery-django-superformset
from django.db import models class Todo(models.Model): name = models.CharField(max_length=200) complete = models.BooleanField() Remove "complete" boolean from demo todo model.
from django.db import models class Todo(models.Model): name = models.CharField(max_length=200)
<commit_before>from django.db import models class Todo(models.Model): name = models.CharField(max_length=200) complete = models.BooleanField() <commit_msg>Remove "complete" boolean from demo todo model.<commit_after>
from django.db import models class Todo(models.Model): name = models.CharField(max_length=200)
from django.db import models class Todo(models.Model): name = models.CharField(max_length=200) complete = models.BooleanField() Remove "complete" boolean from demo todo model.from django.db import models class Todo(models.Model): name = models.CharField(max_length=200)
<commit_before>from django.db import models class Todo(models.Model): name = models.CharField(max_length=200) complete = models.BooleanField() <commit_msg>Remove "complete" boolean from demo todo model.<commit_after>from django.db import models class Todo(models.Model): name = models.CharField(max_lengt...
4f273d56ece230909094d8851d6f79695fb13d88
diffanalysis/exporters.py
diffanalysis/exporters.py
from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + ( 'm...
from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + ( 'm...
Include the version delta field in AnalyzedCSVExporter
Include the version delta field in AnalyzedCSVExporter Fix #11
Python
agpl-3.0
Cartocite/osmada
from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + ( 'm...
from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + ( 'm...
<commit_before>from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + (...
from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + ( 'm...
from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + ( 'm...
<commit_before>from django.conf import settings from osmdata.exporters import CSVExporter from .models import ActionReport class AnalyzedCSVExporter(CSVExporter): """ Enhance CSVExporter adding some fields from diffanalysis module """ def get_header_row(self): return super().get_header_row() + (...
2b7ea531846b43946afee2c4f1d9ed89c3cd947c
ForgeHg/forgehg/tests/functional/test_controllers.py
ForgeHg/forgehg/tests/functional/test_controllers.py
import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', 'src_hg') ...
import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', 'src_hg') ...
Update test to reflect changing hg codebase
Update test to reflect changing hg codebase
Python
apache-2.0
lym/allura-git,apache/allura,heiths/allura,lym/allura-git,leotrubach/sourceforge-allura,leotrubach/sourceforge-allura,apache/incubator-allura,Bitergia/allura,lym/allura-git,apache/allura,leotrubach/sourceforge-allura,heiths/allura,apache/allura,Bitergia/allura,apache/allura,lym/allura-git,Bitergia/allura,apache/incubat...
import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', 'src_hg') ...
import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', 'src_hg') ...
<commit_before>import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', ...
import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', 'src_hg') ...
import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', 'src_hg') ...
<commit_before>import os import pkg_resources from pylons import c from ming.orm import ThreadLocalORMSession from pyforge.lib import helpers as h from forgehg.tests import TestController class TestRootController(TestController): def setUp(self): TestController.setUp(self) h.set_context('test', ...
aaaaa995a77110b779d9613d95800af609324edc
falcom/tree/test/test_tree.py
falcom/tree/test/test_tree.py
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNothing (unittest...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNothing (unittest...
Replace duplicate code with setUp method
Replace duplicate code with setUp method
Python
bsd-3-clause
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNothing (unittest...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNothing (unittest...
<commit_before># Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNo...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNothing (unittest...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNothing (unittest...
<commit_before># Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from hamcrest import * import unittest from ..read_only_tree import Tree from ..mutable_tree import MutableTree class GivenNo...
de1a07992ad4f4be25c57d992720f7b3c3f0bc04
first_databank/__openerp__.py
first_databank/__openerp__.py
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
Remove physician_us depends in first_databank
Remove physician_us depends in first_databank
Python
agpl-3.0
laslabs/odoo-connector-carepoint
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
<commit_before># -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs...
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
# -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs", 'license...
<commit_before># -*- coding: utf-8 -*- # © 2015 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'First Databank', 'description': 'Provides base models for storage of First Databank data', 'version': '9.0.1.0.0', 'category': 'Connector', 'author': "LasLabs...
07b6f05d913337619205d6fd82b472e112e2a2c7
src/demo.py
src/demo.py
#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) def main(args): ...
#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) hard_puzzle = Nonog...
Add a hard puzzle not yet correctly solved
Add a hard puzzle not yet correctly solved
Python
apache-2.0
ggould256/nonogram
#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) def main(args): ...
#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) hard_puzzle = Nonog...
<commit_before>#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) def ...
#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) hard_puzzle = Nonog...
#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) def main(args): ...
<commit_before>#!/usr/bin/env python """Brief demo of nonogram solving.""" import sys from rules.nonogram import NonogramPuzzle easy_puzzle = NonogramPuzzle([[1], [1, 1]], [[1], [1], [1]]) ambiguous_puzzle = NonogramPuzzle([[1], [1]], [[1], [1]]) def ...
6e6fed456ff9c641292933f87c99af8be6823e3f
src/main.py
src/main.py
from rules import ascii_code_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' pp = pprint.PrettyPrinter() def main(file_name, output='default'): with open(file_name) as bibtex_fil...
from rules import ascii_code_rule, no_short_title_rule, enforce_year_rule, no_super_long_title_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' SCHEMAS = { 'ASCII_CODE_RULE': ascii...
Implement filter based on user input
Implement filter based on user input
Python
mit
DanielCMS/bibtex-cleaner
from rules import ascii_code_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' pp = pprint.PrettyPrinter() def main(file_name, output='default'): with open(file_name) as bibtex_fil...
from rules import ascii_code_rule, no_short_title_rule, enforce_year_rule, no_super_long_title_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' SCHEMAS = { 'ASCII_CODE_RULE': ascii...
<commit_before>from rules import ascii_code_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' pp = pprint.PrettyPrinter() def main(file_name, output='default'): with open(file_name...
from rules import ascii_code_rule, no_short_title_rule, enforce_year_rule, no_super_long_title_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' SCHEMAS = { 'ASCII_CODE_RULE': ascii...
from rules import ascii_code_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' pp = pprint.PrettyPrinter() def main(file_name, output='default'): with open(file_name) as bibtex_fil...
<commit_before>from rules import ascii_code_rule import utils import pprint import bibtexparser from bibtexparser.bparser import BibTexParser from bibtexparser.customization import homogeneize_latex_encoding DEFAULT = 'default' pp = pprint.PrettyPrinter() def main(file_name, output='default'): with open(file_name...
79d8916aecc95919fa77ddd845fdd3e0a7e0c4d9
src/ngin.py
src/ngin.py
import argparse from string import Template """ Subclassing template class """ class NginTemplate(Template): delimiter = '#' """ Reverse Proxy Template """ reverse_proxy_template = """ server { listen 80; server_name #{server_name}; access_log /var/log/nginx/#{server_name}.access.log; error_log...
import argparse from nginx_conf import server, reverse_proxy from nginx_blocks import make_location_block, make_server_block from utils import to_nginx_template, make_indent """ Initiate argparse """ parser = argparse.ArgumentParser() """ Add arguments """ parser.add_argument("-r", "--revproxy", help="reverse proxy",...
Remove old stuff with dynamic config generator
Remove old stuff with dynamic config generator
Python
mit
thesabbir/nginpro
import argparse from string import Template """ Subclassing template class """ class NginTemplate(Template): delimiter = '#' """ Reverse Proxy Template """ reverse_proxy_template = """ server { listen 80; server_name #{server_name}; access_log /var/log/nginx/#{server_name}.access.log; error_log...
import argparse from nginx_conf import server, reverse_proxy from nginx_blocks import make_location_block, make_server_block from utils import to_nginx_template, make_indent """ Initiate argparse """ parser = argparse.ArgumentParser() """ Add arguments """ parser.add_argument("-r", "--revproxy", help="reverse proxy",...
<commit_before>import argparse from string import Template """ Subclassing template class """ class NginTemplate(Template): delimiter = '#' """ Reverse Proxy Template """ reverse_proxy_template = """ server { listen 80; server_name #{server_name}; access_log /var/log/nginx/#{server_name}.access.log...
import argparse from nginx_conf import server, reverse_proxy from nginx_blocks import make_location_block, make_server_block from utils import to_nginx_template, make_indent """ Initiate argparse """ parser = argparse.ArgumentParser() """ Add arguments """ parser.add_argument("-r", "--revproxy", help="reverse proxy",...
import argparse from string import Template """ Subclassing template class """ class NginTemplate(Template): delimiter = '#' """ Reverse Proxy Template """ reverse_proxy_template = """ server { listen 80; server_name #{server_name}; access_log /var/log/nginx/#{server_name}.access.log; error_log...
<commit_before>import argparse from string import Template """ Subclassing template class """ class NginTemplate(Template): delimiter = '#' """ Reverse Proxy Template """ reverse_proxy_template = """ server { listen 80; server_name #{server_name}; access_log /var/log/nginx/#{server_name}.access.log...
e86bf68cb3454e203b5f077bc302151b30294a9d
opps/articles/templatetags/article_tags.py
opps/articles/templatetags/article_tags.py
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from .models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = "{0}-{1}".for...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = ...
Fix slug unicode on template tag article get ArticleBox
Fix slug unicode on template tag article get ArticleBox
Python
mit
YACOWS/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,opps/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,opps/opps,opps/opps
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from .models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = "{0}-{1}".for...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = ...
<commit_before># -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from .models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug ...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from opps.articles.models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = ...
# -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from .models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug = "{0}-{1}".for...
<commit_before># -*- coding: utf-8 -*- from django import template from django.conf import settings from django.utils import timezone from .models import ArticleBox register = template.Library() @register.simple_tag def get_articlebox(slug, channel_slug=None, template_name=None): if channel_slug: slug ...
195de4097075c7dd53671242822521e07690391e
databroker/__init__.py
databroker/__init__.py
import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import (DataBroker, DataBroker as db, get_events, get_table, stream, get_fields, restream, process) from .pims_readers import get_images from .handler_regis...
import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import DataBroker except ImportError: warnings.warn("The top-level functions (get_table, get_events, etc.)" "cannot be created because " "the necessary configuration was not found.")...
Isolate import error to DataBroker.
REF: Isolate import error to DataBroker.
Python
bsd-3-clause
ericdill/databroker,ericdill/databroker
import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import (DataBroker, DataBroker as db, get_events, get_table, stream, get_fields, restream, process) from .pims_readers import get_images from .handler_regis...
import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import DataBroker except ImportError: warnings.warn("The top-level functions (get_table, get_events, etc.)" "cannot be created because " "the necessary configuration was not found.")...
<commit_before>import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import (DataBroker, DataBroker as db, get_events, get_table, stream, get_fields, restream, process) from .pims_readers import get_images from...
import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import DataBroker except ImportError: warnings.warn("The top-level functions (get_table, get_events, etc.)" "cannot be created because " "the necessary configuration was not found.")...
import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import (DataBroker, DataBroker as db, get_events, get_table, stream, get_fields, restream, process) from .pims_readers import get_images from .handler_regis...
<commit_before>import warnings import logging logger = logging.getLogger(__name__) try: from .databroker import (DataBroker, DataBroker as db, get_events, get_table, stream, get_fields, restream, process) from .pims_readers import get_images from...
31d3202855fc4bb341eaa0bc212d302bd7d0f2f6
keystoneclient/auth/token_endpoint.py
keystoneclient/auth/token_endpoint.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add endpoint handling to Token/Endpoint auth
Add endpoint handling to Token/Endpoint auth This auth plugin was initially created before get_endpoint was available. Implement the get_endpoint method so that we can use the plugin with relative URLs. Closes-Bug: #1323926 Change-Id: Ic868f509e708ad29faf86ec5ceeab2a9c98a24fc
Python
apache-2.0
jamielennox/keystoneauth,citrix-openstack-build/keystoneauth,sileht/keystoneauth
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
1329e2e76fbd144594243c12655b58e424d6edcd
stix2/bundle.py
stix2/bundle.py
"""STIX 2 Bundle object""" from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = { 'type': TypeProperty(_type), 'id': IDProperty(_type), 'spec_version': Property(fixed="2.0"), 'objects': ...
"""STIX 2 Bundle object""" from collections import OrderedDict from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = OrderedDict() _properties = _properties.update([ ('type', TypeProperty(_type)), (...
Apply OrderedDict changes to Bundle.
Apply OrderedDict changes to Bundle.
Python
bsd-3-clause
oasis-open/cti-python-stix2
"""STIX 2 Bundle object""" from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = { 'type': TypeProperty(_type), 'id': IDProperty(_type), 'spec_version': Property(fixed="2.0"), 'objects': ...
"""STIX 2 Bundle object""" from collections import OrderedDict from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = OrderedDict() _properties = _properties.update([ ('type', TypeProperty(_type)), (...
<commit_before>"""STIX 2 Bundle object""" from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = { 'type': TypeProperty(_type), 'id': IDProperty(_type), 'spec_version': Property(fixed="2.0"), ...
"""STIX 2 Bundle object""" from collections import OrderedDict from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = OrderedDict() _properties = _properties.update([ ('type', TypeProperty(_type)), (...
"""STIX 2 Bundle object""" from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = { 'type': TypeProperty(_type), 'id': IDProperty(_type), 'spec_version': Property(fixed="2.0"), 'objects': ...
<commit_before>"""STIX 2 Bundle object""" from .base import _STIXBase from .properties import IDProperty, Property, TypeProperty class Bundle(_STIXBase): _type = 'bundle' _properties = { 'type': TypeProperty(_type), 'id': IDProperty(_type), 'spec_version': Property(fixed="2.0"), ...
5deeeb3993925850d3deeaa87aad8b6f524c18fd
tobolist.py
tobolist.py
# -*- coding: utf-8 -*- import csv from difflib import get_close_matches with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] #print csv_files[5] address = u'高雄市三民區大昌二路' print address for i in get_close_matches(address.encode('utf-8'), csv_fil...
# -*- coding: utf-8 -*- import csv from difflib import get_close_matches from random import choice with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] print u'測試:', choice(csv_files) address = u'高雄市三民區大昌二路307-1號' print u'查詢:', address print u...
Add full address for test.
Add full address for test.
Python
mit
moskytw/zipcodetw,simonfork/zipcodetw,linpan/zipcodetw,moskytw/zipcodetw,moskytw/zipcodetw,simonfork/zipcodetw,linpan/zipcodetw,linpan/zipcodetw,simonfork/zipcodetw
# -*- coding: utf-8 -*- import csv from difflib import get_close_matches with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] #print csv_files[5] address = u'高雄市三民區大昌二路' print address for i in get_close_matches(address.encode('utf-8'), csv_fil...
# -*- coding: utf-8 -*- import csv from difflib import get_close_matches from random import choice with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] print u'測試:', choice(csv_files) address = u'高雄市三民區大昌二路307-1號' print u'查詢:', address print u...
<commit_before># -*- coding: utf-8 -*- import csv from difflib import get_close_matches with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] #print csv_files[5] address = u'高雄市三民區大昌二路' print address for i in get_close_matches(address.encode('u...
# -*- coding: utf-8 -*- import csv from difflib import get_close_matches from random import choice with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] print u'測試:', choice(csv_files) address = u'高雄市三民區大昌二路307-1號' print u'查詢:', address print u...
# -*- coding: utf-8 -*- import csv from difflib import get_close_matches with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] #print csv_files[5] address = u'高雄市三民區大昌二路' print address for i in get_close_matches(address.encode('utf-8'), csv_fil...
<commit_before># -*- coding: utf-8 -*- import csv from difflib import get_close_matches with open('./Zip32_10301.csv') as files: csv_files = csv.reader(files) csv_files = [' '.join(i) for i in csv_files] #print csv_files[5] address = u'高雄市三民區大昌二路' print address for i in get_close_matches(address.encode('u...
5f7fcd4a22171315db56dd2c8ed5689b5a07cceb
apps/urls.py
apps/urls.py
# -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from apps.rss_creator.feeds import AnnouncementsTeilarFeed #feeds = { # '...
# -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns #feeds = { # 'announcements': AnnouncementsFeed, #} handler500 = 'apps.l...
Remove reference to deprecated module
Remove reference to deprecated module
Python
agpl-3.0
LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr
# -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from apps.rss_creator.feeds import AnnouncementsTeilarFeed #feeds = { # '...
# -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns #feeds = { # 'announcements': AnnouncementsFeed, #} handler500 = 'apps.l...
<commit_before># -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from apps.rss_creator.feeds import AnnouncementsTeilarFeed #f...
# -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns #feeds = { # 'announcements': AnnouncementsFeed, #} handler500 = 'apps.l...
# -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from apps.rss_creator.feeds import AnnouncementsTeilarFeed #feeds = { # '...
<commit_before># -*- coding: utf-8 -*- #from apps.announcements.feeds import AnnouncementsFeed from django.conf.urls.defaults import patterns, include, url from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from apps.rss_creator.feeds import AnnouncementsTeilarFeed #f...
8ec1ebb189d9386e4302f86a41d3092eb558d3d4
app/helpers/slugify.py
app/helpers/slugify.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used freely for anyth...
#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used freely for anyth...
Remove call to unicode which does not exist on Python 3
Remove call to unicode which does not exist on Python 3
Python
mit
peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag
#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used freely for anyth...
#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used freely for anyth...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used f...
#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used freely for anyth...
#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used freely for anyth...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # import re from unidecode import unidecode def slugify(text, delim=u'-'): """Slugifier that handles Asian UTF-8 characters and generates an ASCII-only slug. From: http://flask.pocoo.org/snippets/5/ This snippet by Armin Ronacher can be used f...
2f5e0e330de33376236ba7eef3a9ae20a0a38986
breakpad.py
breakpad.py
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import traceback impor...
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import traceback impor...
Add a check so non-google employee don't send crash dumps.
Add a check so non-google employee don't send crash dumps. Add a warning message in case the check ever fail. Review URL: http://codereview.chromium.org/460044 git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@33700 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Python
bsd-3-clause
svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import traceback impor...
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import traceback impor...
<commit_before># Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import ...
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import traceback impor...
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import traceback impor...
<commit_before># Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Breakpad for Python. Sends a notification when a process stops on an exception.""" import atexit import getpass import urllib import ...
fb69c9b65b5c0f16eb58d530c130e1e9a1201de6
tests/multi_memory_mgmt_test.py
tests/multi_memory_mgmt_test.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collection(self): ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collection(self): ...
Apply object_count-1 allowance to multi memory management test
Apply object_count-1 allowance to multi memory management test
Python
lgpl-2.1
pycurl/pycurl,pycurl/pycurl,pycurl/pycurl
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collection(self): ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collection(self): ...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collecti...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collection(self): ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collection(self): ...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import gc debug = False class MultiMemoryMgmtTest(unittest.TestCase): def test_opensocketfunction_collection(self): self.check_callback(pycurl.M_SOCKETFUNCTION) def test_seekfunction_collecti...
1d6fb58d0a6c1d1162e10a22ad68b841fdec834d
books/models.py
books/models.py
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): title = fields.CharField(max_length=255) price = fields.DecimalField(max_digits=10, decimal_places=2) created = fields.DateTimeFie...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): CATEGORY_CHOICES = ( (0, 'expense'), (1, 'income'), ) title = fields.CharField(max_length=255) amount = field...
Use amount and category fields instead of price
Use amount and category fields instead of price This is more convenient and more user friendly.. I guess.
Python
mit
trimailov/finance,trimailov/finance,trimailov/finance
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): title = fields.CharField(max_length=255) price = fields.DecimalField(max_digits=10, decimal_places=2) created = fields.DateTimeFie...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): CATEGORY_CHOICES = ( (0, 'expense'), (1, 'income'), ) title = fields.CharField(max_length=255) amount = field...
<commit_before>from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): title = fields.CharField(max_length=255) price = fields.DecimalField(max_digits=10, decimal_places=2) created = fie...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): CATEGORY_CHOICES = ( (0, 'expense'), (1, 'income'), ) title = fields.CharField(max_length=255) amount = field...
from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): title = fields.CharField(max_length=255) price = fields.DecimalField(max_digits=10, decimal_places=2) created = fields.DateTimeFie...
<commit_before>from django.contrib.auth.models import User from django.db import models from django.db.models import fields from django.utils import timezone class Transaction(models.Model): title = fields.CharField(max_length=255) price = fields.DecimalField(max_digits=10, decimal_places=2) created = fie...
c34ebf0da60e1c4542fd69870202f49fe085dd67
BigStash/decorators.py
BigStash/decorators.py
from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException: raise Big...
from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException as e: rais...
Add decorator for empty responses and show error messages
Add decorator for empty responses and show error messages - Add decorator for responses with no content, like delete requests. - Show original error messages for now
Python
apache-2.0
longaccess/bigstash-python,longaccess/bigstash-python
from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException: raise Big...
from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException as e: rais...
<commit_before>from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException: ...
from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException as e: rais...
from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException: raise Big...
<commit_before>from requests.exceptions import RequestException from .error import BigStashError from wrapt import decorator @decorator def json_response(wrapped, instance, args, kwargs): try: r = wrapped(*args, **kwargs) r.raise_for_status() return r.json() except RequestException: ...
0f753f67c48b02b4ee7fdb67a416a5cc86f66e0b
LennardJones.py
LennardJones.py
from fluid import LJContainer NUM_PARTICLES = 108 TIME_STEP = 0.001 class LennardJones: def __init__(self, density, temperature): #Initialize the container container = LJContainer() #Equilibriate the system #Start measuring while self.t < run_length: ...
#!/usr/bin/env python from fluid import LJContainer PARTICLES = 108.0 TEMPERATURE = 2.0 DENSITY = 1.0 TIME_STEP = 0.001 STEPS = 2000 class LennardJones: _t = 0 def __init__(self): #Initialize the container container = LJContainer(PARTICLES, DENSITY, TEMPERATURE) #Eq...
Modify simulation to use global parameters
Modify simulation to use global parameters
Python
mit
hkaju/LennardJones,hkaju/LennardJones,hkaju/LennardJones
from fluid import LJContainer NUM_PARTICLES = 108 TIME_STEP = 0.001 class LennardJones: def __init__(self, density, temperature): #Initialize the container container = LJContainer() #Equilibriate the system #Start measuring while self.t < run_length: ...
#!/usr/bin/env python from fluid import LJContainer PARTICLES = 108.0 TEMPERATURE = 2.0 DENSITY = 1.0 TIME_STEP = 0.001 STEPS = 2000 class LennardJones: _t = 0 def __init__(self): #Initialize the container container = LJContainer(PARTICLES, DENSITY, TEMPERATURE) #Eq...
<commit_before>from fluid import LJContainer NUM_PARTICLES = 108 TIME_STEP = 0.001 class LennardJones: def __init__(self, density, temperature): #Initialize the container container = LJContainer() #Equilibriate the system #Start measuring while self.t < run_len...
#!/usr/bin/env python from fluid import LJContainer PARTICLES = 108.0 TEMPERATURE = 2.0 DENSITY = 1.0 TIME_STEP = 0.001 STEPS = 2000 class LennardJones: _t = 0 def __init__(self): #Initialize the container container = LJContainer(PARTICLES, DENSITY, TEMPERATURE) #Eq...
from fluid import LJContainer NUM_PARTICLES = 108 TIME_STEP = 0.001 class LennardJones: def __init__(self, density, temperature): #Initialize the container container = LJContainer() #Equilibriate the system #Start measuring while self.t < run_length: ...
<commit_before>from fluid import LJContainer NUM_PARTICLES = 108 TIME_STEP = 0.001 class LennardJones: def __init__(self, density, temperature): #Initialize the container container = LJContainer() #Equilibriate the system #Start measuring while self.t < run_len...
3211e90bf13abb423d23b33a4a9802907e992f4e
eduid_signup/sna_callbacks.py
eduid_signup/sna_callbacks.py
import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def google_callback(request, user_id, attributes): """pyramid_sna calls this function aftera successfull authentication flow""" # Create or update the user user = request.db.users.find_one({'google_id': use...
import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def create_or_update(request, provider, provider_user_id, attributes): provider_key = '%s_id' % provider # Create or update the user user = request.db.users.find_one({provider_key: provider_user_id}) if...
Refactor the Google sna callback since the Facebook one is almost the same
Refactor the Google sna callback since the Facebook one is almost the same
Python
bsd-3-clause
SUNET/eduid-signup,SUNET/eduid-signup,SUNET/eduid-signup
import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def google_callback(request, user_id, attributes): """pyramid_sna calls this function aftera successfull authentication flow""" # Create or update the user user = request.db.users.find_one({'google_id': use...
import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def create_or_update(request, provider, provider_user_id, attributes): provider_key = '%s_id' % provider # Create or update the user user = request.db.users.find_one({provider_key: provider_user_id}) if...
<commit_before>import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def google_callback(request, user_id, attributes): """pyramid_sna calls this function aftera successfull authentication flow""" # Create or update the user user = request.db.users.find_one({'...
import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def create_or_update(request, provider, provider_user_id, attributes): provider_key = '%s_id' % provider # Create or update the user user = request.db.users.find_one({provider_key: provider_user_id}) if...
import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def google_callback(request, user_id, attributes): """pyramid_sna calls this function aftera successfull authentication flow""" # Create or update the user user = request.db.users.find_one({'google_id': use...
<commit_before>import datetime from pyramid.httpexceptions import HTTPFound from pyramid.security import remember def google_callback(request, user_id, attributes): """pyramid_sna calls this function aftera successfull authentication flow""" # Create or update the user user = request.db.users.find_one({'...
96ac90788adac986531aa854357a6c77b0f171d4
tmlib/errors.py
tmlib/errors.py
class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' Error class tha...
class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' Error class tha...
Add workflow specific error classes
Add workflow specific error classes
Python
agpl-3.0
TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary
class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' Error class tha...
class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' Error class tha...
<commit_before>class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' ...
class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' Error class tha...
class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' Error class tha...
<commit_before>class NotSupportedError(Exception): ''' Error class that is raised when a feature is not supported by the program. ''' class MetadataError(Exception): ''' Error class that is raised when a metadata element cannot be retrieved. ''' class SubmissionError(Exception): ''' ...
9a896de52b353e17a4216fdaf1342275e1ecc30a
autoconf/raw.py
autoconf/raw.py
from _external import * from m import * from gomp import * from lcms import * raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = [ m, gomp, lcms, ] )
from _external import * from m import * if not windows: from gomp import * from lcms import * if windows: tmpDep = [ m, lcms, ] else: tmpDep = [ m, gomp, lcms, ] raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = tmpDep )
Remove gomp dependency for Raw win build
Remove gomp dependency for Raw win build
Python
mit
tuttleofx/sconsProject
from _external import * from m import * from gomp import * from lcms import * raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = [ m, gomp, lcms, ] ) Remove gomp dependency for Raw win build
from _external import * from m import * if not windows: from gomp import * from lcms import * if windows: tmpDep = [ m, lcms, ] else: tmpDep = [ m, gomp, lcms, ] raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = tmpDep )
<commit_before>from _external import * from m import * from gomp import * from lcms import * raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = [ m, gomp, lcms, ] ) <commit_msg>Remove gomp dependency for Raw win build<commit_after>
from _external import * from m import * if not windows: from gomp import * from lcms import * if windows: tmpDep = [ m, lcms, ] else: tmpDep = [ m, gomp, lcms, ] raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = tmpDep )
from _external import * from m import * from gomp import * from lcms import * raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = [ m, gomp, lcms, ] ) Remove gomp dependency for Raw win buildfrom _external import * from m import * if not windows: from gomp import * from l...
<commit_before>from _external import * from m import * from gomp import * from lcms import * raw = LibWithHeaderChecker( 'raw', 'libraw/libraw.h', 'c', dependencies = [ m, gomp, lcms, ] ) <commit_msg>Remove gomp dependency for Raw win build<commit_after>from _external import * from m import * if n...
a6a81790d43442f88738e5ae141f6b9c6d0efc74
authentication/urls.py
authentication/urls.py
from django.conf.urls import patterns, url from authentication.views import user_login, user_logout from authentication.views import approve, UnapprovedUsers, CustomAdminIndex from authentication.views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^register/donor$', Do...
from django.conf.urls import patterns, url from .views import user_login, user_logout from .views import approve, UnapprovedUsers, CustomAdminIndex from .views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^register/donor$', DonorRegistrationView.as_view(), name='donor...
Use relative import for files inside the same package
Use relative import for files inside the same package
Python
bsd-3-clause
agiliq/fundraiser,febinstephen/django-fundrasiser-app,agiliq/fundraiser,febinstephen/django-fundrasiser-app,febinstephen/django-fundrasiser-app,agiliq/fundraiser
from django.conf.urls import patterns, url from authentication.views import user_login, user_logout from authentication.views import approve, UnapprovedUsers, CustomAdminIndex from authentication.views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^register/donor$', Do...
from django.conf.urls import patterns, url from .views import user_login, user_logout from .views import approve, UnapprovedUsers, CustomAdminIndex from .views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^register/donor$', DonorRegistrationView.as_view(), name='donor...
<commit_before>from django.conf.urls import patterns, url from authentication.views import user_login, user_logout from authentication.views import approve, UnapprovedUsers, CustomAdminIndex from authentication.views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^regis...
from django.conf.urls import patterns, url from .views import user_login, user_logout from .views import approve, UnapprovedUsers, CustomAdminIndex from .views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^register/donor$', DonorRegistrationView.as_view(), name='donor...
from django.conf.urls import patterns, url from authentication.views import user_login, user_logout from authentication.views import approve, UnapprovedUsers, CustomAdminIndex from authentication.views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^register/donor$', Do...
<commit_before>from django.conf.urls import patterns, url from authentication.views import user_login, user_logout from authentication.views import approve, UnapprovedUsers, CustomAdminIndex from authentication.views import BeneficiaryRegistrationView, DonorRegistrationView urlpatterns = patterns('', url(r'^regis...
453497b0755d8bc2d6bd6ccc3830394e50ed9a07
pywikibot/families/outreach_family.py
pywikibot/families/outreach_family.py
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikimedia.org', ...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikimedia.org', ...
Update mw version 1.24wmf11 derived from super class
Update mw version 1.24wmf11 derived from super class Change-Id: If142c57a88179f80e2e652e844c7aadbc2468f7c
Python
mit
trishnaguha/pywikibot-core,Darkdadaah/pywikibot-core,VcamX/pywikibot-core,magul/pywikibot-core,PersianWikipedia/pywikibot-core,magul/pywikibot-core,icyflame/batman,Darkdadaah/pywikibot-core,wikimedia/pywikibot-core,happy5214/pywikibot-core,TridevGuha/pywikibot-core,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,valh...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikimedia.org', ...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikimedia.org', ...
<commit_before># -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikime...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikimedia.org', ...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikimedia.org', ...
<commit_before># -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # Outreach wiki custom family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = u'outreach' self.langs = { 'outreach': 'outreach.wikime...
56184affcbc2b5185a011e689fbf4b9564d380f5
trakt/client.py
trakt/client.py
from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url = 'https://api....
from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url = 'https://api-...
Use new v2 api endpoint
Use new v2 api endpoint
Python
mit
fuzeman/trakt.py,shad7/trakt.py
from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url = 'https://api....
from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url = 'https://api-...
<commit_before>from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url ...
from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url = 'https://api-...
from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url = 'https://api....
<commit_before>from trakt.core.configuration import ConfigurationManager from trakt.core.http import HttpClient from trakt.interfaces import construct_map from trakt.interfaces.base import InterfaceProxy import logging __version__ = '2.1.0' log = logging.getLogger(__name__) class TraktClient(object): base_url ...
81e14c5e21eeea0776ba26d4a65dd3c364d41855
netmiko/hp/hp_procurve_ssh.py
netmiko/hp/hp_procurve_ssh.py
from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press any key to conti...
from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press any key to conti...
Change function name enable to enable_mode
Change function name enable to enable_mode
Python
mit
shsingh/netmiko,rdezavalia/netmiko,enzzzy/netmiko,ktbyers/netmiko,jumpojoy/netmiko,fooelisa/netmiko,ktbyers/netmiko,shamanu4/netmiko,ivandgreat/netmiko,nitzmahone/netmiko,rdezavalia/netmiko,isponline/netmiko,brutus333/netmiko,mileswdavis/netmiko,shamanu4/netmiko,mzbenami/netmiko,rumo/netmiko,MikeOfNoTrades/netmiko,fooe...
from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press any key to conti...
from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press any key to conti...
<commit_before>from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press a...
from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press any key to conti...
from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press any key to conti...
<commit_before>from netmiko.ssh_connection import SSHConnection from netmiko.netmiko_globals import MAX_BUFFER import time class HPProcurveSSH(SSHConnection): def session_preparation(self): ''' Prepare the session after the connection has been established ''' # HP uses - 'Press a...
185f88089cc0bfaa025d147f870245523307d03f
tests/utils.py
tests/utils.py
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmpl = compiler.ko...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: tmpl ...
Add option for passing debug flag to template compiler
Add option for passing debug flag to template compiler
Python
mit
funkybob/knights-templater,funkybob/knights-templater
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmpl = compiler.ko...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: tmpl ...
<commit_before>import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmp...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None, debug=False): try: tmpl ...
import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmpl = compiler.ko...
<commit_before>import unittest from knights import compiler class Mock(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TemplateTestCase(unittest.TestCase): def assertRendered(self, source, expected, context=None): try: tmp...