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
91ad56ea892d2f2fdb2af97f81ec70a7b9f9305c
analysis/sanity-check-velocity.py
analysis/sanity-check-velocity.py
#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10, 20, 50, 80, 90, 95, 98, 99]) ...
#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) t.add_accelerations(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10...
Use trial logging. Tweak numpy logging output.
Use trial logging. Tweak numpy logging output.
Python
mit
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10, 20, 50, 80, 90, 95, 98, 99]) ...
#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) t.add_accelerations(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10...
<commit_before>#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10, 20, 50, 80, 90, 9...
#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) t.add_accelerations(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10...
#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10, 20, 50, 80, 90, 95, 98, 99]) ...
<commit_before>#!/usr/bin/env python import climate import joblib import lmj.cubes import numpy as np def _check(t): t.load() t.add_velocities(smooth=0) vel = abs(t.df[t.marker_velocity_columns].values).flatten() vel = vel[np.isfinite(vel)] pct = np.percentile(vel, [1, 2, 5, 10, 20, 50, 80, 90, 9...
0cccd467ac4c0bd8b8110fcfe47f81d73a238aa9
plugins/uptime.py
plugins/uptime.py
import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(round(time.time() - self.vk_bot.start_tim...
import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(ro...
Fix code string length (PEP8)
Fix code string length (PEP8)
Python
mit
roman901/vk_bot
import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(round(time.time() - self.vk_bot.start_tim...
import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(ro...
<commit_before>import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(round(time.time() - self.v...
import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(ro...
import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(round(time.time() - self.vk_bot.start_tim...
<commit_before>import time class Plugin: def __init__(self, vk_bot): self.vk_bot = vk_bot self.vk_bot.add_command('uptime', self.uptime) async def uptime(self, vk_api, sender, message): await self.vk_bot.send_message(sender, 'Total uptime: {} seconds'.format(round(time.time() - self.v...
e26434ee69545b8c16b62ebd78e5bec0c95d579a
lib/rapidsms/webui/urls.py
lib/rapidsms/webui/urls.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os urlpatterns = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. it's okay # if t...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os, sys urlpatterns = [] loaded = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. it...
Print a list of which URLs got loaded. This doesn't help that much when trying to debug errors that keep URLs from getting loaded. But it's a start.
Print a list of which URLs got loaded. This doesn't help that much when trying to debug errors that keep URLs from getting loaded. But it's a start.
Python
bsd-3-clause
rapidsms/rapidsms-legacy,rapidsms/rapidsms-legacy,rapidsms/rapidsms-legacy
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os urlpatterns = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. it's okay # if t...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os, sys urlpatterns = [] loaded = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. it...
<commit_before>#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os urlpatterns = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. i...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os, sys urlpatterns = [] loaded = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. it...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os urlpatterns = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. it's okay # if t...
<commit_before>#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os urlpatterns = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import the urls.py from each. i...
21e02ee04ef359abfcaacf35375176b296ae7ea1
tests/__init__.py
tests/__init__.py
from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_database() for mo...
import logging from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_dat...
Reduce Peewee's logging level to INFO in tests.
Reduce Peewee's logging level to INFO in tests.
Python
bsd-2-clause
rockwotj/redash,crowdworks/redash,pubnative/redash,stefanseifert/redash,pubnative/redash,akariv/redash,amino-data/redash,jmvasquez/redashtest,ninneko/redash,useabode/redash,stefanseifert/redash,crowdworks/redash,pubnative/redash,stefanseifert/redash,stefanseifert/redash,getredash/redash,amino-data/redash,M32Media/redas...
from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_database() for mo...
import logging from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_dat...
<commit_before>from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_dat...
import logging from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_dat...
from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_database() for mo...
<commit_before>from unittest import TestCase from redash import settings, db, app import redash.models # TODO: this isn't pretty... settings.DATABASE_CONFIG = { 'name': 'circle_test', 'engine': 'peewee.PostgresqlDatabase', 'threadlocals': True } app.config['DATABASE'] = settings.DATABASE_CONFIG db.load_dat...
48af7d169bac32898763af671f3a30170b85d2cd
tests/__main__.py
tests/__main__.py
import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') unittest.TextTestRunner().run(all_tests)
import sys import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') ret = unittest.TextTestRunner().run(all_tests) sys.exit(not ret.wasSuccessful())
Fix an issue when unit tests always return 0 status.
Fix an issue when unit tests always return 0 status.
Python
mit
sergeymironov0001/twitch-chat-bot
import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') unittest.TextTestRunner().run(all_tests) Fix an issue when unit tests always return 0 status.
import sys import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') ret = unittest.TextTestRunner().run(all_tests) sys.exit(not ret.wasSuccessful())
<commit_before>import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') unittest.TextTestRunner().run(all_tests) <commit_msg>Fix an issue when unit tests always return 0 status.<commit_after>
import sys import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') ret = unittest.TextTestRunner().run(all_tests) sys.exit(not ret.wasSuccessful())
import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') unittest.TextTestRunner().run(all_tests) Fix an issue when unit tests always return 0 status.import sys import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('....
<commit_before>import unittest if __name__ == '__main__': all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py') unittest.TextTestRunner().run(all_tests) <commit_msg>Fix an issue when unit tests always return 0 status.<commit_after>import sys import unittest if __name__ == '__main__': all_...
9dc35ebafb3e33c3736c8d58a8cb2353695ddedb
tests/settings.py
tests/settings.py
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"]
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"]
Set DEFAULT_AUTO_FIELD for the test project
Set DEFAULT_AUTO_FIELD for the test project https://docs.djangoproject.com/en/dev/releases/3.2/#customizing-type-of-auto-created-primary-keys Avoid warnings on Django master: ``` tests.TestModelPhoneNU: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.Au...
Python
mit
stefanfoulis/django-phonenumber-field
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"] Set DEFAULT_AUTO_FIELD for the test project https://docs.djangoproject.com/en/dev/releases/3.2/#customizing-type-of-auto-created-primary-keys Avoid warnings on Django master: ``...
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"]
<commit_before>DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"] <commit_msg>Set DEFAULT_AUTO_FIELD for the test project https://docs.djangoproject.com/en/dev/releases/3.2/#customizing-type-of-auto-created-primary-keys Avoid war...
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"]
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"] Set DEFAULT_AUTO_FIELD for the test project https://docs.djangoproject.com/en/dev/releases/3.2/#customizing-type-of-auto-created-primary-keys Avoid warnings on Django master: ``...
<commit_before>DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} SECRET_KEY = "secrekey" INSTALLED_APPS = ["phonenumber_field", "tests"] <commit_msg>Set DEFAULT_AUTO_FIELD for the test project https://docs.djangoproject.com/en/dev/releases/3.2/#customizing-type-of-auto-created-primary-keys Avoid war...
25478444e1ec5b4b1c9f811fea7fe0b401f14514
lingcod/bookmarks/forms.py
lingcod/bookmarks/forms.py
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
Allow IP to be blank in form
Allow IP to be blank in form
Python
bsd-3-clause
Alwnikrotikz/marinemap,google-code-export/marinemap,google-code-export/marinemap,Alwnikrotikz/marinemap,google-code-export/marinemap,google-code-export/marinemap,Alwnikrotikz/marinemap,Alwnikrotikz/marinemap
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
<commit_before>from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=for...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
<commit_before>from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=for...
9217bfc6bab0d152e33d9fda60218c404b61d064
cmd2/__init__.py
cmd2/__init__.py
# # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
# # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, EmptyStatement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
Add EmptyStatement exception to default imports
Add EmptyStatement exception to default imports
Python
mit
python-cmd2/cmd2,python-cmd2/cmd2
# # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category Add EmptyStatement exception to default imports
# # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, EmptyStatement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
<commit_before># # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category <commit_msg>Add EmptyStatement exception to default imports<commit_after>
# # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, EmptyStatement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
# # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category Add EmptyStatement exception to default imports# # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Stat...
<commit_before># # -*- coding: utf-8 -*- from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category <commit_msg>Add EmptyStatement exception to default imports<commit_after># # -*- coding: utf-8 -*- from .cmd2...
e2126518957d0e3e360af3f80b1657bde9053b23
capstone/game/players/alphabeta.py
capstone/game/players/alphabeta.py
import random from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=1000): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name def __repr__(self...
import random import numpy as np from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=np.inf): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name ...
Use np.inf for max/min limit values
Use np.inf for max/min limit values
Python
mit
davidrobles/mlnd-capstone-code
import random from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=1000): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name def __repr__(self...
import random import numpy as np from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=np.inf): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name ...
<commit_before>import random from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=1000): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name de...
import random import numpy as np from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=np.inf): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name ...
import random from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=1000): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name def __repr__(self...
<commit_before>import random from ..player import Player from ..utils import utility class AlphaBeta(Player): name = 'Alpha-Beta' def __init__(self, eval_func=utility, max_depth=1000): self._eval = eval_func self._max_depth = max_depth def __str__(self): return self.name de...
a17c2ce30f30d0441b1475457b0bc9d04da9f143
coil/__init__.py
coil/__init__.py
"""Coil: A Configuration Library.""" __version__ = "0.2.2"
"""Coil: A Configuration Library.""" __version__ = "0.3.0" from coil.parser import Parser def parse_file(file_name): """Open and parse a coil file. Returns the root Struct. """ coil = open(file_name) return Parser(coil, file_name).root() def parse(string): """Parse a coil string. Retur...
Add helpers for parsing files and strings
Add helpers for parsing files and strings
Python
mit
tectronics/coil,marineam/coil,kovacsbalu/coil,kovacsbalu/coil,marineam/coil,tectronics/coil
"""Coil: A Configuration Library.""" __version__ = "0.2.2" Add helpers for parsing files and strings
"""Coil: A Configuration Library.""" __version__ = "0.3.0" from coil.parser import Parser def parse_file(file_name): """Open and parse a coil file. Returns the root Struct. """ coil = open(file_name) return Parser(coil, file_name).root() def parse(string): """Parse a coil string. Retur...
<commit_before>"""Coil: A Configuration Library.""" __version__ = "0.2.2" <commit_msg>Add helpers for parsing files and strings<commit_after>
"""Coil: A Configuration Library.""" __version__ = "0.3.0" from coil.parser import Parser def parse_file(file_name): """Open and parse a coil file. Returns the root Struct. """ coil = open(file_name) return Parser(coil, file_name).root() def parse(string): """Parse a coil string. Retur...
"""Coil: A Configuration Library.""" __version__ = "0.2.2" Add helpers for parsing files and strings"""Coil: A Configuration Library.""" __version__ = "0.3.0" from coil.parser import Parser def parse_file(file_name): """Open and parse a coil file. Returns the root Struct. """ coil = open(file_name)...
<commit_before>"""Coil: A Configuration Library.""" __version__ = "0.2.2" <commit_msg>Add helpers for parsing files and strings<commit_after>"""Coil: A Configuration Library.""" __version__ = "0.3.0" from coil.parser import Parser def parse_file(file_name): """Open and parse a coil file. Returns the root S...
f664609d579e7b709945756def90092f0814998e
libpb/__init__.py
libpb/__init__.py
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import kill, killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags ...
Send SIGTERM and SIGKILL to child processes.
Send SIGTERM and SIGKILL to child processes. With the removal of subprocess there was no way to known what were the subprocesses, however after the introduction of Jobs tracking the PIDs it is now possible. Use those PIDs.
Python
bsd-2-clause
DragonSA/portbuilder,DragonSA/portbuilder
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import kill, killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags ...
<commit_before>"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus,...
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import kill, killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags ...
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
<commit_before>"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus,...
605339144c61c4860f1dc7dec5fc5a0ff959600f
company/forms.py
company/forms.py
from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, CommitDescriptionMixi...
from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, CommitDescriptionMixi...
Add 'common_name' to company's form
Add 'common_name' to company's form
Python
bsd-3-clause
KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend
from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, CommitDescriptionMixi...
from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, CommitDescriptionMixi...
<commit_before>from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, Commit...
from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, CommitDescriptionMixi...
from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, CommitDescriptionMixi...
<commit_before>from django import forms from . import models from pola.forms import (CommitDescriptionMixin, FormHorizontalMixin, SaveButtonMixin, ReadOnlyFieldsMixin) class CompanyForm(ReadOnlyFieldsMixin, SaveButtonMixin, FormHorizontalMixin, Commit...
559fa4bf1982de6dd4a8943939b535972731bd08
comrade/core/context_processors.py
comrade/core/context_processors.py
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
Add full base URL for site to default context.
Add full base URL for site to default context.
Python
mit
bueda/django-comrade
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTIO...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['current_site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: ...
from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTION: cont...
<commit_before>from django.conf import settings from django.contrib.sites.models import Site from settings import DeploymentType def default(request): context = {} context['DEPLOYMENT'] = settings.DEPLOYMENT context['site'] = Site.objects.get_current() if settings.DEPLOYMENT != DeploymentType.PRODUCTIO...
1b97aa2dae43a8988802ca532a3200f444f85db3
markups/common.py
markups/common.py
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')) MA...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')) MA...
Add initial support for pygments styles
Add initial support for pygments styles
Python
bsd-3-clause
retext-project/pymarkups,mitya57/pymarkups
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')) MA...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')) MA...
<commit_before># This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')) MA...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')) MA...
<commit_before># This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('...
05cb698d45ce4e33e2f4bfdc38f9633083a284a7
test_project/project_specific/generic_channel_example.py
test_project/project_specific/generic_channel_example.py
import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, results): if...
import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, results): if...
Implement query_filter for MyGenericChannel, because it should search by something other than search_name in the case of Address
Implement query_filter for MyGenericChannel, because it should search by something other than search_name in the case of Address
Python
mit
Eraldo/django-autocomplete-light,spookylukey/django-autocomplete-light,Perkville/django-autocomplete-light,jonashaag/django-autocomplete-light,yourlabs/django-autocomplete-light,shubhamdipt/django-autocomplete-light,Perkville/django-autocomplete-light,Visgean/django-autocomplete-light,dsanders11/django-autocomplete-lig...
import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, results): if...
import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, results): if...
<commit_before>import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, resul...
import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, results): if...
import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, results): if...
<commit_before>import autocomplete_light from models import Contact, Address class MyGenericChannel(autocomplete_light.GenericChannelBase): def get_querysets(self): return { Contact: Contact.objects.all(), Address: Address.objects.all(), } def order_results(self, resul...
d8c75104acb68ca648c5a3b30d6791775272e5c1
authentic2/idp/idp_openid/admin.py
authentic2/idp/idp_openid/admin.py
# -*- coding: utf-8 -*- # vim: set ts=4 sw=4 : */ from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce)
# -*- coding: utf-8 -*- from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce)
Remove vim instruction in prologue.
[idp/idp_openid] Remove vim instruction in prologue.
Python
agpl-3.0
incuna/authentic,incuna/authentic,adieu/authentic2,incuna/authentic,adieu/authentic2,BryceLohr/authentic,BryceLohr/authentic,incuna/authentic,BryceLohr/authentic,pu239ppy/authentic2,BryceLohr/authentic,pu239ppy/authentic2,pu239ppy/authentic2,adieu/authentic2,adieu/authentic2,incuna/authentic,pu239ppy/authentic2
# -*- coding: utf-8 -*- # vim: set ts=4 sw=4 : */ from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce) [idp/idp_openid] Remove vim instruction in prologue.
# -*- coding: utf-8 -*- from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce)
<commit_before># -*- coding: utf-8 -*- # vim: set ts=4 sw=4 : */ from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce) <commit_msg>[idp/idp_openid] Remove vim instruction in prologue.<commit_afte...
# -*- coding: utf-8 -*- from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce)
# -*- coding: utf-8 -*- # vim: set ts=4 sw=4 : */ from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce) [idp/idp_openid] Remove vim instruction in prologue.# -*- coding: utf-8 -*- from django.co...
<commit_before># -*- coding: utf-8 -*- # vim: set ts=4 sw=4 : */ from django.contrib import admin from models import TrustedRoot, Association, Nonce admin.site.register(TrustedRoot) admin.site.register(Association) admin.site.register(Nonce) <commit_msg>[idp/idp_openid] Remove vim instruction in prologue.<commit_afte...
15c596ea224fb0a624404d425a2580ab3503807d
bluebottle/utils/middleware.py
bluebottle/utils/middleware.py
from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_default_language c...
from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_default_language c...
Use full code to check if api language actually exists
Use full code to check if api language actually exists
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_default_language c...
from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_default_language c...
<commit_before>from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_defau...
from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_default_language c...
from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_default_language c...
<commit_before>from importlib import import_module from django.conf import settings from django.contrib.sessions import middleware from django.db import connection from django.utils import translation from tenant_extras.middleware import tenant_translation from bluebottle.utils.models import get_languages, get_defau...
0ad7be235135303cb9d902df2a89b17da8aac918
syntacticframes_project/syntacticframes/migrations/0012_auto_20150220_1836.py
syntacticframes_project/syntacticframes/migrations/0012_auto_20150220_1836.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_list = sorted(L...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_list = sorted(L...
Make the 0012 migration reversible
Make the 0012 migration reversible
Python
mit
aymara/verbenet-editor,aymara/verbenet-editor,aymara/verbenet-editor
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_list = sorted(L...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_list = sorted(L...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_list = sorted(L...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_list = sorted(L...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from django.db import models, migrations def set_position_value_for_levin_classes(apps, schema_editor): i = 0 LevinClass = apps.get_model('syntacticframes', 'LevinClass') levin_class_...
31d973be4f50e2e26d8ff65dd86d96d55e6b6250
contrib/zmq/chromecast-snoop.py
contrib/zmq/chromecast-snoop.py
#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: self.artist = s...
#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None self.pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: self.artis...
Print exceptions since pychromecast just ignores them
Print exceptions since pychromecast just ignores them
Python
apache-2.0
hackeriet/nfcd,hackeriet/nfcd,hackeriet/pyhackeriet,hackeriet/pyhackeriet,hackeriet/nfcd,hackeriet/pyhackeriet
#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: self.artist = s...
#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None self.pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: self.artis...
<commit_before>#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: ...
#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None self.pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: self.artis...
#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: self.artist = s...
<commit_before>#!/usr/bin/env python3 class Listener(object): def __init__(self): import zmqclient self.artist = None self.title = None pub = zmqclient.pub() def new_media_status(self, status): if status.artist != self.artist or status.title != self.title: ...
fdbf12d560a18724b5293e4cee8aa3a03a48c90b
tcconfig/tcdel.py
tcconfig/tcdel.py
#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from ._common impor...
#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from ._common impor...
Modify to handle exception properly
Modify to handle exception properly
Python
mit
thombashi/tcconfig,thombashi/tcconfig
#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from ._common impor...
#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from ._common impor...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from...
#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from ._common impor...
#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from ._common impor...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import sys import logbook import subprocrunner import tcconfig from .traffic_control import TrafficControl from ._argparse_wrapper import ArgparseWrapper from...
f6dd7d0ca966856325adc50f4c5ca2cc48dda0a5
cogbot/cog_bot_server_state.py
cogbot/cog_bot_server_state.py
import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot self.serv...
import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot self.serv...
Fix mod log optional channel
Fix mod log optional channel
Python
mit
Arcensoth/cogbot
import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot self.serv...
import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot self.serv...
<commit_before>import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot ...
import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot self.serv...
import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot self.serv...
<commit_before>import json import logging import typing from datetime import datetime import discord from cogbot.types import ServerId, ChannelId log = logging.getLogger(__name__) class CogBotServerState: def __init__(self, bot, server: discord.Server, log_channel: ChannelId = None): self.bot = bot ...
67c671260858cc2c3d3041188cebda63cac1c4eb
prequ/__init__.py
prequ/__init__.py
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: __version__ = None
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: # pragma: no cover __version__ = None
Add "no cover" pragma to version setting code
Add "no cover" pragma to version setting code
Python
bsd-2-clause
suutari-ai/prequ,suutari/prequ,suutari/prequ
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: __version__ = None Add "no cover" pragma to version setting code
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: # pragma: no cover __version__ = None
<commit_before>import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: __version__ = None <commit_msg>Add "no cover" pragma to version setting code<commit_after>
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: # pragma: no cover __version__ = None
import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: __version__ = None Add "no cover" pragma to version setting codeimport pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources....
<commit_before>import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: __version__ = None <commit_msg>Add "no cover" pragma to version setting code<commit_after>import pkg_resources try: __version__ = pkg_resources.get_distributio...
6171b8111359cc54a4af2c3444ce0e0e2db5ba80
froide/helper/context_processors.py
froide/helper/context_processors.py
from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN": settings.FROI...
from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN": settings.FROI...
Add Froide Dry Run Domain and Language Code to context_processor
Add Froide Dry Run Domain and Language Code to context_processor
Python
mit
okfse/froide,ryankanno/froide,fin/froide,LilithWittmann/froide,okfse/froide,fin/froide,ryankanno/froide,LilithWittmann/froide,catcosmo/froide,CodeforHawaii/froide,CodeforHawaii/froide,stefanw/froide,catcosmo/froide,ryankanno/froide,catcosmo/froide,catcosmo/froide,okfse/froide,fin/froide,ryankanno/froide,stefanw/froide,...
from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN": settings.FROI...
from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN": settings.FROI...
<commit_before>from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN"...
from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN": settings.FROI...
from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN": settings.FROI...
<commit_before>from django.conf import settings def froide(request): return {"froide": settings.FROIDE_CONFIG} def site_settings(request): return {"SITE_NAME": settings.SITE_NAME, "SITE_URL": settings.SITE_URL, "FROIDE_DRYRUN": settings.FROIDE_DRYRUN, "FROIDE_DRYRUN_DOMAIN"...
50451c69d337228c2016851258ff7249bf906440
profiling/plot.py
profiling/plot.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import numpy as np import matplotlib.pyplot as plt csv_files = glob.glob('*.csv') fig = plt.figure() ax = fig.add_subplot(111) colors = iter(plt.cm.rainbow(np.linspace(0,1,len(csv_files)))) p = re.compile(r'profiling_(.*?)_(.*?)\.csv') ms_to_s ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import os import sys import numpy as np import matplotlib.pyplot as plt if len(sys.argv) == 1: print('Usage: plot.py path/to/build/profiling') sys.exit(0) csv_files = glob.glob(os.path.join(sys.argv[1], '*.csv')) fig = plt.figure() ax = ...
Use path given as argument
Use path given as argument
Python
bsd-3-clause
nbigaouette/sorting,nbigaouette/sorting,nbigaouette/sorting,nbigaouette/sorting
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import numpy as np import matplotlib.pyplot as plt csv_files = glob.glob('*.csv') fig = plt.figure() ax = fig.add_subplot(111) colors = iter(plt.cm.rainbow(np.linspace(0,1,len(csv_files)))) p = re.compile(r'profiling_(.*?)_(.*?)\.csv') ms_to_s ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import os import sys import numpy as np import matplotlib.pyplot as plt if len(sys.argv) == 1: print('Usage: plot.py path/to/build/profiling') sys.exit(0) csv_files = glob.glob(os.path.join(sys.argv[1], '*.csv')) fig = plt.figure() ax = ...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import numpy as np import matplotlib.pyplot as plt csv_files = glob.glob('*.csv') fig = plt.figure() ax = fig.add_subplot(111) colors = iter(plt.cm.rainbow(np.linspace(0,1,len(csv_files)))) p = re.compile(r'profiling_(.*?)_(.*?)\...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import os import sys import numpy as np import matplotlib.pyplot as plt if len(sys.argv) == 1: print('Usage: plot.py path/to/build/profiling') sys.exit(0) csv_files = glob.glob(os.path.join(sys.argv[1], '*.csv')) fig = plt.figure() ax = ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import numpy as np import matplotlib.pyplot as plt csv_files = glob.glob('*.csv') fig = plt.figure() ax = fig.add_subplot(111) colors = iter(plt.cm.rainbow(np.linspace(0,1,len(csv_files)))) p = re.compile(r'profiling_(.*?)_(.*?)\.csv') ms_to_s ...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import glob import re import numpy as np import matplotlib.pyplot as plt csv_files = glob.glob('*.csv') fig = plt.figure() ax = fig.add_subplot(111) colors = iter(plt.cm.rainbow(np.linspace(0,1,len(csv_files)))) p = re.compile(r'profiling_(.*?)_(.*?)\...
d8ce56feada64d287306d7f439ec12a42acda0d6
bot.py
bot.py
#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) userid = str(input("Please input ...
#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) def getdata(): userid = str(i...
Make it more complex (((
Make it more complex (((
Python
mit
zhangyubaka/tweepy_favbot
#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) userid = str(input("Please input ...
#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) def getdata(): userid = str(i...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) userid = str(input...
#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) def getdata(): userid = str(i...
#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) userid = str(input("Please input ...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf8 -*- import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) userid = str(input...
f511af4fc89a170914a86de1704e8e842ffd6b6d
test/test_configuration.py
test/test_configuration.py
#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest import heatmap as hm class Tests(unittest.TestCase): # To remove Python 3's # "DeprecationWarning: Please use assertRaisesRegex instead" if sys.ve...
#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest ROOT_DIR = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0] sys.path.append(ROOT_DIR) import heatmap as hm class Tests(unittest.TestCase): # T...
Update sys.path to import heatmap
Update sys.path to import heatmap
Python
agpl-3.0
hugovk/heatmap,hugovk/heatmap,sethoscope/heatmap,sethoscope/heatmap
#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest import heatmap as hm class Tests(unittest.TestCase): # To remove Python 3's # "DeprecationWarning: Please use assertRaisesRegex instead" if sys.ve...
#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest ROOT_DIR = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0] sys.path.append(ROOT_DIR) import heatmap as hm class Tests(unittest.TestCase): # T...
<commit_before>#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest import heatmap as hm class Tests(unittest.TestCase): # To remove Python 3's # "DeprecationWarning: Please use assertRaisesRegex instead...
#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest ROOT_DIR = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0] sys.path.append(ROOT_DIR) import heatmap as hm class Tests(unittest.TestCase): # T...
#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest import heatmap as hm class Tests(unittest.TestCase): # To remove Python 3's # "DeprecationWarning: Please use assertRaisesRegex instead" if sys.ve...
<commit_before>#!/usr/bin/env python """Test coordinate classes.""" import sys try: import unittest2 as unittest # Python 2.6 except ImportError: import unittest import heatmap as hm class Tests(unittest.TestCase): # To remove Python 3's # "DeprecationWarning: Please use assertRaisesRegex instead...
c3883ad36139db4592c259a94e7b254702ec2f00
run.py
run.py
import glpi.server;glpi.server.app.run(debug = True)
import glpi.server;glpi.server.app.run(debug = True, host='0.0.0.0')
Add option to rlisten on al interfaces
Add option to rlisten on al interfaces
Python
agpl-3.0
ddurieux/poc_glpi
import glpi.server;glpi.server.app.run(debug = True) Add option to rlisten on al interfaces
import glpi.server;glpi.server.app.run(debug = True, host='0.0.0.0')
<commit_before>import glpi.server;glpi.server.app.run(debug = True) <commit_msg>Add option to rlisten on al interfaces<commit_after>
import glpi.server;glpi.server.app.run(debug = True, host='0.0.0.0')
import glpi.server;glpi.server.app.run(debug = True) Add option to rlisten on al interfacesimport glpi.server;glpi.server.app.run(debug = True, host='0.0.0.0')
<commit_before>import glpi.server;glpi.server.app.run(debug = True) <commit_msg>Add option to rlisten on al interfaces<commit_after>import glpi.server;glpi.server.app.run(debug = True, host='0.0.0.0')
f62ec2304bb42b0bf0eba121c1b88adb35cec6d3
run.py
run.py
#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push heroku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) args = parser.par...
#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push dokku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) args = parser.pars...
Switch to dokku for deployment.
Switch to dokku for deployment.
Python
mit
EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger
#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push heroku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) args = parser.par...
#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push dokku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) args = parser.pars...
<commit_before>#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push heroku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) ar...
#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push dokku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) args = parser.pars...
#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push heroku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) args = parser.par...
<commit_before>#!/usr/bin/env python import os import argparse def run(): os.system("gunicorn server:app --reload --config gunicorn_config.py") def deploy(): os.system("git push heroku master") def main(): parser = argparse.ArgumentParser() parser.add_argument('--deploy', action="store_true", required=False) ar...
a24faf712d8dfba0f6ac9fc295807552dca37ae9
custom/inddex/reports/utils.py
custom/inddex/reports/utils.py
from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabularReport): report_template...
from itertools import chain from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabula...
Move export to a background process
Move export to a background process
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabularReport): report_template...
from itertools import chain from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabula...
<commit_before>from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabularReport): ...
from itertools import chain from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabula...
from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabularReport): report_template...
<commit_before>from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin class MultiTabularReport(DatespanMixin, CustomProjectReport, GenericTabularReport): ...
46c33ca68c1124fb06c4ba62306cb00ba61d7e5c
tests/__init__.py
tests/__init__.py
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
Add metadata.tables to mock db.
Add metadata.tables to mock db.
Python
mit
FelixLoether/flask-uploads,FelixLoether/flask-image-upload-thing
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
<commit_before>from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, Moc...
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, MockStorage, resiz...
<commit_before>from flexmock import flexmock from flask.ext.storage import MockStorage from flask_uploads import init class TestCase(object): added_objects = [] committed_objects = [] created_objects = [] deleted_objects = [] def setup_method(self, method, resizer=None): init(db_mock, Moc...
3037c15a658ee05a4483c5b1c8c137a06e9d7707
tests/conftest.py
tests/conftest.py
''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: import pytest_b...
''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: import pytest_b...
Use hypothesis setting load_profile to setup health check
Use hypothesis setting load_profile to setup health check Fixes #779
Python
mit
untitaker/vdirsyncer,untitaker/vdirsyncer,untitaker/vdirsyncer
''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: import pytest_b...
''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: import pytest_b...
<commit_before>''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: ...
''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: import pytest_b...
''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: import pytest_b...
<commit_before>''' General-purpose fixtures for vdirsyncer's testsuite. ''' import logging import os import click_log from hypothesis import HealthCheck, Verbosity, settings import pytest @pytest.fixture(autouse=True) def setup_logging(): click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG) try: ...
24b78a4d510606563106da24d568d5fb79ddca2b
IPython/__main__.py
IPython/__main__.py
# encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with th...
# encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with th...
Use new entry point for python -m IPython
Use new entry point for python -m IPython
Python
bsd-3-clause
ipython/ipython,ipython/ipython
# encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with th...
# encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with th...
<commit_before># encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, dist...
# encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with th...
# encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with th...
<commit_before># encoding: utf-8 """Terminal-based IPython entry point. """ #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, dist...
8c8b668ba3684c3e756bf9fccafbd1bd8e1a7cfe
mediapipe/__init__.py
mediapipe/__init__.py
"""Copyright 2019 - 2020 The MediaPipe Authors. 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 wr...
# Copyright 2019 - 2022 The MediaPipe Authors. # # 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 agr...
Fix comment for `mediapipe` license.
Fix comment for `mediapipe` license. The `"""` comment indicates a public docstring for the module, and will end up in the generated docs. By using a "private" comment (`#`) we will not document the license as part of the API. The Apache license is noted in the footer of generated docs, and this is sufficient. Piper...
Python
apache-2.0
google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe,google/mediapipe
"""Copyright 2019 - 2020 The MediaPipe Authors. 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 wr...
# Copyright 2019 - 2022 The MediaPipe Authors. # # 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 agr...
<commit_before>"""Copyright 2019 - 2020 The MediaPipe Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
# Copyright 2019 - 2022 The MediaPipe Authors. # # 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 agr...
"""Copyright 2019 - 2020 The MediaPipe Authors. 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 wr...
<commit_before>"""Copyright 2019 - 2020 The MediaPipe Authors. 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 ...
189847ffdca0264ddd6248faa9974ba35eaea373
tests/test_aur.py
tests/test_aur.py
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky(max_runs=5) async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky(max_runs=5) async def test_aur_strip...
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky async def test_aur_strip_release(get_version): ...
Revert "make AUR tests more flaky"
Revert "make AUR tests more flaky" This reverts commit 61df628bd8bc97acbed40a4af67b124c47584f5f. It doesn't help :-(
Python
mit
lilydjwg/nvchecker
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky(max_runs=5) async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky(max_runs=5) async def test_aur_strip...
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky async def test_aur_strip_release(get_version): ...
<commit_before># MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky(max_runs=5) async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky(max_runs=5) async def...
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky async def test_aur_strip_release(get_version): ...
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky(max_runs=5) async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky(max_runs=5) async def test_aur_strip...
<commit_before># MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. from flaky import flaky import pytest pytestmark = pytest.mark.asyncio @flaky(max_runs=5) async def test_aur(get_version): assert await get_version("asciidoc-fake", {"aur": None}) == "1.0-1" @flaky(max_runs=5) async def...
6d22cc47174139b56fad7d94696b08d9830a7ea4
lettuce_webdriver/tests/__init__.py
lettuce_webdriver/tests/__init__.py
from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): world.browser = web...
from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): world.browser = web...
Print scenario/step names on failure
Print scenario/step names on failure
Python
mit
koterpillar/aloe_webdriver,infoxchange/aloe_webdriver,infoxchange/aloe_webdriver,aloetesting/aloe_webdriver,aloetesting/aloe_webdriver,aloetesting/aloe_webdriver,koterpillar/aloe_webdriver
from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): world.browser = web...
from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): world.browser = web...
<commit_before>from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): worl...
from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): world.browser = web...
from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): world.browser = web...
<commit_before>from __future__ import print_function import os from contextlib import contextmanager from selenium import webdriver from aloe import around, world here = os.path.dirname(__file__) html_pages = os.path.join(here, 'html_pages') @around.each_feature @contextmanager def with_browser(feature): worl...
73c1900a05fa3e4f68224f4e0d5dce2c08687254
opwen_email_server/backend/email_sender.py
opwen_email_server/backend/email_sender.py
from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=config.QUEUES_K...
from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=config.QUEUES_K...
Add attachment support to email sender CLI
Add attachment support to email sender CLI
Python
apache-2.0
ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver
from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=config.QUEUES_K...
from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=config.QUEUES_K...
<commit_before>from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=...
from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=config.QUEUES_K...
from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=config.QUEUES_K...
<commit_before>from typing import Tuple from opwen_email_server import azure_constants as constants from opwen_email_server import config from opwen_email_server.services.queue import AzureQueue from opwen_email_server.services.sendgrid import SendgridEmailSender QUEUE = AzureQueue(account=config.QUEUES_ACCOUNT, key=...
dd5d81263842066bf1faa3699c12da47f9453401
packages/flake8-config-4catalyzer/setup.py
packages/flake8-config-4catalyzer/setup.py
from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Development Status...
from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Development Status...
Add flake8-debugger to list of flake8 checks
Add flake8-debugger to list of flake8 checks
Python
mit
4Catalyzer/python
from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Development Status...
from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Development Status...
<commit_before>from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Dev...
from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Development Status...
from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Development Status...
<commit_before>from setuptools import setup setup( name='flake8-config-4catalyzer', version='0.2.1', url='https://github.com/4Catalyzer/python/tree/packages/flake8-config-4catalyzer', author="Alex Rothberg", author_email='arothberg@4catalyzer.com', license='MIT', classifiers=( 'Dev...
dcb1fc943ec4fe39bd752b1015ba11f6d8145c27
modules/status.py
modules/status.py
import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this instance of scubot.'...
import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this instance of scubot.'...
Fix uptime and uptime timing
Fix uptime and uptime timing
Python
mit
suclearnub/scubot
import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this instance of scubot.'...
import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this instance of scubot.'...
<commit_before>import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this insta...
import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this instance of scubot.'...
import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this instance of scubot.'...
<commit_before>import discord from modules.botModule import BotModule from modules.help import * import time import datetime class Status(BotModule): name = 'status' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!status` shows information about this insta...
a9e80e81fe2e6ad1325047cb3045ab12640f984f
cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py
cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
Refactor code so we can use command in tests
Refactor code so we can use command in tests
Python
mit
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
<commit_before>from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two...
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two_years = self.n...
<commit_before>from django.core.management.base import BaseCommand from dateutil.relativedelta import relativedelta from legalaid.models import Case from cla_butler.tasks import DeleteOldData class FindAndDeleteCasesUsingCreationTime(DeleteOldData): def get_eligible_cases(self): self._setup() two...
cb2a6c44fcff3453bbf20dbecbd807ee8e640e8e
database/queries/select_queries.py
database/queries/select_queries.py
SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY p.DATE; ''' S...
SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY p.DATE; ''' S...
Select Queries Table names changed
Select Queries Table names changed
Python
mit
BrickText/JHROM
SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY p.DATE; ''' S...
SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY p.DATE; ''' S...
<commit_before>SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY ...
SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY p.DATE; ''' S...
SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY p.DATE; ''' S...
<commit_before>SELECT_MOVIES_ORDERED_BY_RATING = ''' SELECT * FROM MOVIE ORDER BY RATING; ''' SELECT_PROJECTION_FOR_MOVIE = ''' SELECT p.*, COUNT(r.ROW * r.COL) FROM PROJECTION as p LEFT JOIN RESERVATION as r ON r.PROJECTION_ID = p.ID WHERE p.MOVIE_ID = ? GROUP BY p.ID ORDER BY ...
01cd080395533b9e8d53f4c203ef6be185d97ebc
dbaas/integrations/iaas/manager.py
dbaas/integrations/iaas/manager.py
from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, database, *args, **kwargs): plan = database.plan ...
from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider from integrations.monitoring.manager import MonitoringManager import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, ...
Add call to monitoring app
Add call to monitoring app
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, database, *args, **kwargs): plan = database.plan ...
from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider from integrations.monitoring.manager import MonitoringManager import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, ...
<commit_before>from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, database, *args, **kwargs): plan = data...
from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider from integrations.monitoring.manager import MonitoringManager import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, ...
from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, database, *args, **kwargs): plan = database.plan ...
<commit_before>from dbaas_cloudstack.provider import CloudStackProvider from pre_provisioned.pre_provisioned_provider import PreProvisionedProvider import logging LOG = logging.getLogger(__name__) class IaaSManager(): @classmethod def destroy_instance(cls, database, *args, **kwargs): plan = data...
2313424f811c59563090e77966d906dd3eb7f127
tools/buildbot.py
tools/buildbot.py
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
Add better way to generate MDK project file.
[tools] Add better way to generate MDK project file.
Python
apache-2.0
RT-Thread/rt-thread,FlyLu/rt-thread,weiyuliang/rt-thread,ArdaFu/rt-thread,weiyuliang/rt-thread,geniusgogo/rt-thread,weety/rt-thread,igou/rt-thread,weiyuliang/rt-thread,hezlog/rt-thread,armink/rt-thread,wolfgangz2013/rt-thread,armink/rt-thread,ArdaFu/rt-thread,hezlog/rt-thread,AubrCool/rt-thread,geniusgogo/rt-thread,yon...
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
<commit_before>import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: ...
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
<commit_before>import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: ...
155822548be11161aefdb0d93d5ec86095ab3624
rt.py
rt.py
import queue import threading def loop(queue, actor): while True: message = queue.get() actor.behavior(message) class Actor(object): def __init__(self): pass def _start_loop(self): self.queue = queue.Queue() self.dispatcher = threading.Thread( ...
import queue import threading def indiviual_loop(queue, actor): while True: message = queue.get() actor.behavior(message) def global_loop(queue): while True: actor, message = queue.get() actor.behavior(message) class EventLoop(object): loop = None def __init__...
Refactor to allow different event loops
Refactor to allow different event loops
Python
mit
waltermoreira/tartpy
import queue import threading def loop(queue, actor): while True: message = queue.get() actor.behavior(message) class Actor(object): def __init__(self): pass def _start_loop(self): self.queue = queue.Queue() self.dispatcher = threading.Thread( ...
import queue import threading def indiviual_loop(queue, actor): while True: message = queue.get() actor.behavior(message) def global_loop(queue): while True: actor, message = queue.get() actor.behavior(message) class EventLoop(object): loop = None def __init__...
<commit_before>import queue import threading def loop(queue, actor): while True: message = queue.get() actor.behavior(message) class Actor(object): def __init__(self): pass def _start_loop(self): self.queue = queue.Queue() self.dispatcher = threa...
import queue import threading def indiviual_loop(queue, actor): while True: message = queue.get() actor.behavior(message) def global_loop(queue): while True: actor, message = queue.get() actor.behavior(message) class EventLoop(object): loop = None def __init__...
import queue import threading def loop(queue, actor): while True: message = queue.get() actor.behavior(message) class Actor(object): def __init__(self): pass def _start_loop(self): self.queue = queue.Queue() self.dispatcher = threading.Thread( ...
<commit_before>import queue import threading def loop(queue, actor): while True: message = queue.get() actor.behavior(message) class Actor(object): def __init__(self): pass def _start_loop(self): self.queue = queue.Queue() self.dispatcher = threa...
ef73cc38e08db709a33321cde47ceb6dfce3504d
chrome/test/functional/chromeos_private_view.py
chrome/test/functional/chromeos_private_view.py
#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(pyauto.PyUITest)...
#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(pyauto.PyUITest)...
Modify pyauto test ChromeosPrivateViewTest to use 2.2.28 data file.
Modify pyauto test ChromeosPrivateViewTest to use 2.2.28 data file. BUG=none TEST=This is a test. Review URL: https://chromiumcodereview.appspot.com/10389084 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@136454 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
TheTypoMaster/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,Jonekee/chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa...
#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(pyauto.PyUITest)...
#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(pyauto.PyUITest)...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(p...
#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(pyauto.PyUITest)...
#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(pyauto.PyUITest)...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 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. import os import pyauto_functional # must be imported before pyauto import pyauto class ChromeosPrivateViewTest(p...
db43b3b3079842fb2baf6d181ef39374acf0053c
.gitlab/linters/check-makefiles.py
.gitlab/linters/check-makefiles.py
#!/usr/bin/env python3 """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one of those flags when adding a new test. """ from linter import run_linters, RegexpLinter...
#!/usr/bin/env python3 """ Linters for testsuite makefiles """ from linter import run_linters, RegexpLinter """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one o...
Add linter to catch unquoted use of $(TEST_HC)
linters: Add linter to catch unquoted use of $(TEST_HC) This is a common bug that creeps into Makefiles (e.g. see T12674).
Python
bsd-3-clause
sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc
#!/usr/bin/env python3 """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one of those flags when adding a new test. """ from linter import run_linters, RegexpLinter...
#!/usr/bin/env python3 """ Linters for testsuite makefiles """ from linter import run_linters, RegexpLinter """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one o...
<commit_before>#!/usr/bin/env python3 """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one of those flags when adding a new test. """ from linter import run_linter...
#!/usr/bin/env python3 """ Linters for testsuite makefiles """ from linter import run_linters, RegexpLinter """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one o...
#!/usr/bin/env python3 """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one of those flags when adding a new test. """ from linter import run_linters, RegexpLinter...
<commit_before>#!/usr/bin/env python3 """ Warn for use of `--interactive` inside Makefiles (#11468). Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to forget one of those flags when adding a new test. """ from linter import run_linter...
dc1a7bc4d674fd6e7235222612f1d147112d77db
src/nodeconductor_assembly_waldur/packages/migrations/0002_openstack_packages.py
src/nodeconductor_assembly_waldur/packages/migrations/0002_openstack_packages.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backend_id'), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backend_id'), ...
Remove useless default from migration
Remove useless default from migration - wal-26
Python
mit
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backend_id'), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backend_id'), ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backen...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backend_id'), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backend_id'), ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import nodeconductor.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack', '0022_volume_device'), ('structure', '0037_remove_customer_billing_backen...
5e504ae82c37b47ad2c1781cc74d13cdccc72495
dthm4kaiako/config/__init__.py
dthm4kaiako/config/__init__.py
"""Configuration for Django system.""" __version__ = "0.16.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.16.3" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
Increment version number to 0.16.3
Increment version number to 0.16.3
Python
mit
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
"""Configuration for Django system.""" __version__ = "0.16.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.16.3
"""Configuration for Django system.""" __version__ = "0.16.3" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
<commit_before>"""Configuration for Django system.""" __version__ = "0.16.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.16.3<commit_after>
"""Configuration for Django system.""" __version__ = "0.16.3" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.16.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.16.3"""Configuration for Django system.""" __version__ = "0.16.3" __version_info...
<commit_before>"""Configuration for Django system.""" __version__ = "0.16.2" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.16.3<commit_after>"""Configuration for Django system."...
3dbc981e62c2d153913557b62083f60888fa7e83
ynr/apps/ynr_refactoring/management/commands/ynr_refactoring_remove_legacy_IDs.py
ynr/apps/ynr_refactoring/management/commands/ynr_refactoring_remove_legacy_IDs.py
import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): schemes =...
import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): schemes =...
Remove IDs for all candidates, not just Zac
Remove IDs for all candidates, not just Zac
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): schemes =...
import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): schemes =...
<commit_before>import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): ...
import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): schemes =...
import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): schemes =...
<commit_before>import json from django.core.management.base import BaseCommand from django.db import transaction from people.models import Person from candidates.views.version_data import get_change_metadata from popolo.models import Identifier class Command(BaseCommand): def handle(self, *args, **options): ...
e5f4dc01e94694bf9bfcae3ecd6eca34a33a24eb
openquake/__init__.py
openquake/__init__.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Make the openquake namespace compatible with old setuptools
Make the openquake namespace compatible with old setuptools
Python
agpl-3.0
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
<commit_before># -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
<commit_before># -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version...
5a69162e82c2c6031587448b975f5867c94873ed
pyramid_es/dotdict.py
pyramid_es/dotdict.py
class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value, list): ...
class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value, list): ...
Make DotDict repr() use class name so that it doesn't print misleading results if subclassed
Make DotDict repr() use class name so that it doesn't print misleading results if subclassed
Python
mit
storborg/pyramid_es
class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value, list): ...
class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value, list): ...
<commit_before>class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value,...
class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value, list): ...
class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value, list): ...
<commit_before>class DotDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def __init__(self, d={}): for key, value in d.items(): if hasattr(value, 'keys'): value = DotDict(value) if isinstance(value,...
9a240f0efab9be036fe39f9b2b63cc399e5f8134
registration/admin.py
registration/admin.py
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin)
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users.
Use raw_id_fields for the relation from RegistrationProfile to User, for sites which have huge numbers of users.
Python
bsd-3-clause
dinie/django-registration,Avenza/django-registration,FundedByMe/django-registration,dinie/django-registration,FundedByMe/django-registration
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin) Use raw...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
<commit_before>from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, Registratio...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') raw_id_fields = ['user'] search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfil...
from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, RegistrationAdmin) Use raw...
<commit_before>from django.contrib import admin from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'activation_key_expired') search_fields = ('user__username', 'user__first_name') admin.site.register(RegistrationProfile, Registratio...
552d216f2cbcb780c08cc351a7456fb97ac3c3dd
app.py
app.py
from flask import Flask, request, render_template import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: app.secret_key = os.urandom(30) @app.route("/domain", methods=["GET", "POST"]) def domain(): if requ...
from flask import Flask, request, render_template from route import Route from route.db import init_db, db_session import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: init_db() app.secret_key = os.urand...
Add domain route and case handling
Add domain route and case handling
Python
apache-2.0
bunseokbot/proxy_register,bunseokbot/proxy_register
from flask import Flask, request, render_template import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: app.secret_key = os.urandom(30) @app.route("/domain", methods=["GET", "POST"]) def domain(): if requ...
from flask import Flask, request, render_template from route import Route from route.db import init_db, db_session import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: init_db() app.secret_key = os.urand...
<commit_before>from flask import Flask, request, render_template import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: app.secret_key = os.urandom(30) @app.route("/domain", methods=["GET", "POST"]) def domain...
from flask import Flask, request, render_template from route import Route from route.db import init_db, db_session import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: init_db() app.secret_key = os.urand...
from flask import Flask, request, render_template import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: app.secret_key = os.urandom(30) @app.route("/domain", methods=["GET", "POST"]) def domain(): if requ...
<commit_before>from flask import Flask, request, render_template import os app = Flask(__name__) app.debug = True # Secret Key setting based on debug setting if app.debug: app.secret_key = "T3st_s3cret_k3y!~$@" else: app.secret_key = os.urandom(30) @app.route("/domain", methods=["GET", "POST"]) def domain...
f4500e6422f1c6af8e9ce7d2d79d81e7479f0b7f
Instanssi/admin_programme/forms.py
Instanssi/admin_programme/forms.py
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Program...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Program...
Fix form to reflect model change
admin_programme: Fix form to reflect model change
Python
mit
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Program...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Program...
<commit_before># -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): ...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Program...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Program...
<commit_before># -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_programme.models import ProgrammeEvent class ProgrammeEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): ...
71cffcb8a8ec7e36dc389a5aa6dc2cc9769a9e97
distutils/tests/test_ccompiler.py
distutils/tests/test_ccompiler.py
import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths return list(...
import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths return list(...
Extend the test to compile a second time after setting include dirs again.
Extend the test to compile a second time after setting include dirs again.
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths return list(...
import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths return list(...
<commit_before>import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths ...
import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths return list(...
import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths return list(...
<commit_before>import os import sys import platform import textwrap import sysconfig import pytest from distutils import ccompiler def _make_strs(paths): """ Convert paths to strings for legacy compatibility. """ if sys.version_info > (3, 8) and platform.system() != "Windows": return paths ...
792b9d42167208b39a5e37f2ddf608547238af4f
django_graph_api/graphql/utils.py
django_graph_api/graphql/utils.py
from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message self.location = {'line': 0, 'column': 0} if settings.DEBUG: print(format_exc...
from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message if settings.DEBUG: self.traceback = format_exc().split('\n') def format(self): ...
Undo error changes for now
Undo error changes for now
Python
mit
melinath/django-graph-api,melinath/django-graph-api
from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message self.location = {'line': 0, 'column': 0} if settings.DEBUG: print(format_exc...
from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message if settings.DEBUG: self.traceback = format_exc().split('\n') def format(self): ...
<commit_before>from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message self.location = {'line': 0, 'column': 0} if settings.DEBUG: p...
from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message if settings.DEBUG: self.traceback = format_exc().split('\n') def format(self): ...
from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message self.location = {'line': 0, 'column': 0} if settings.DEBUG: print(format_exc...
<commit_before>from traceback import format_exc from django.conf import settings class GraphQLError(Exception): def __init__(self, message): super(GraphQLError, self).__init__(message) self.message = message self.location = {'line': 0, 'column': 0} if settings.DEBUG: p...
08489ea2c1596a067b482878ff4450db43c08612
conf.py
conf.py
# -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme...
# -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme...
Add custom CSS style to FIWARE doc
Add custom CSS style to FIWARE doc Change-Id: I74293d488e0cd762ad023b94879ee618a4016110
Python
apache-2.0
Kurento/doc-kurento,SanMi86/doc-kurento,SanMi86/doc-kurento,SanMi86/doc-kurento,Kurento/doc-kurento,Kurento/doc-kurento,SanMi86/doc-kurento
# -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme...
# -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme...
<commit_before># -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [s...
# -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme...
# -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme...
<commit_before># -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [s...
0fbc02b40f4414d96686d879aa9f7611e8fbb85d
singlet/config.py
singlet/config.py
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') with open(confi...
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') with open(confi...
Remove function to reset _once_warnings (messy)
Remove function to reset _once_warnings (messy)
Python
mit
iosonofabio/singlet,iosonofabio/singlet
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') with open(confi...
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') with open(confi...
<commit_before># vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') ...
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') with open(confi...
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') with open(confi...
<commit_before># vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to the Google Sheet APIs. # Modules import os import yaml # Globals config_filename = os.getenv( 'SINGLET_CONFIG_FILENAME', os.getenv('HOME') + '/.singlet/config.yml') ...
ed7d0c5f8b64185f9fc612b44e4182b12a0fa62e
yunity/users/factories.py
yunity/users/factories.py
from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_model() ...
from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_model() ...
Comment about display_name == password
Comment about display_name == password
Python
agpl-3.0
yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend
from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_model() ...
from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_model() ...
<commit_before>from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_m...
from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_model() ...
from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_model() ...
<commit_before>from django.contrib.auth import get_user_model from factory import DjangoModelFactory, CREATE_STRATEGY, LazyAttribute, PostGeneration, SubFactory from yunity.walls.factories import Wall from yunity.utils.tests.fake import faker class User(DjangoModelFactory): class Meta: model = get_user_m...
aed9b3066f9d796e5c89e38d833c87e130a421c3
auth0/v2/blacklists.py
auth0/v2/blacklists.py
from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(endpoint=url, jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud } retur...
from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): self.url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud } return self.cli...
Fix Blacklists usage of RestClient
Fix Blacklists usage of RestClient
Python
mit
auth0/auth0-python,auth0/auth0-python
from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(endpoint=url, jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud } retur...
from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): self.url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud } return self.cli...
<commit_before>from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(endpoint=url, jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud }...
from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): self.url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud } return self.cli...
from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(endpoint=url, jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud } retur...
<commit_before>from .rest import RestClient class Blacklists(object): def __init__(self, domain, jwt_token): url = 'https://%s/api/v2/blacklists/tokens' % domain self.client = RestClient(endpoint=url, jwt=jwt_token) def get(self, aud=None): params = { 'aud': aud }...
e49163ceecc5da949fe01281a87b56be513784d5
abbr/languages/pt_br/dictionary.py
abbr/languages/pt_br/dictionary.py
# Copyright 2016 Adler Brediks Medrado # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright 2016 Adler Brediks Medrado # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
Add new words to wordlist
Add new words to wordlist
Python
apache-2.0
adlermedrado/abbr
# Copyright 2016 Adler Brediks Medrado # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright 2016 Adler Brediks Medrado # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
<commit_before># Copyright 2016 Adler Brediks Medrado # # 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 ...
# Copyright 2016 Adler Brediks Medrado # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright 2016 Adler Brediks Medrado # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
<commit_before># Copyright 2016 Adler Brediks Medrado # # 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 ...
92e5ff34737feef0d196e25b97dbc817b502a59d
demo.py
demo.py
from FbFeed import NewsFeed username = raw_input('Enter your email id registered with facebook : ') password = raw_input('Enter your Password : ') print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() #Add people to group print('Add people ...
from FbFeed import NewsFeed import getpass username = raw_input('Enter your email id registered with facebook : ') password = getpass.getpass(prompt='Enter your Password : ',stream=None) print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() ...
Hide password in terminal input
Hide password in terminal input
Python
mit
ashishpahwa7/Fb-Feedirator
from FbFeed import NewsFeed username = raw_input('Enter your email id registered with facebook : ') password = raw_input('Enter your Password : ') print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() #Add people to group print('Add people ...
from FbFeed import NewsFeed import getpass username = raw_input('Enter your email id registered with facebook : ') password = getpass.getpass(prompt='Enter your Password : ',stream=None) print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() ...
<commit_before>from FbFeed import NewsFeed username = raw_input('Enter your email id registered with facebook : ') password = raw_input('Enter your Password : ') print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() #Add people to group pri...
from FbFeed import NewsFeed import getpass username = raw_input('Enter your email id registered with facebook : ') password = getpass.getpass(prompt='Enter your Password : ',stream=None) print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() ...
from FbFeed import NewsFeed username = raw_input('Enter your email id registered with facebook : ') password = raw_input('Enter your Password : ') print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() #Add people to group print('Add people ...
<commit_before>from FbFeed import NewsFeed username = raw_input('Enter your email id registered with facebook : ') password = raw_input('Enter your Password : ') print('Creating new session on Firefox..') fb = NewsFeed(username,password) print('Logging into your facebook account') fb.login() #Add people to group pri...
deeaed14e40b9deca39c46ec7879f775606898c0
Instanssi/dblog/handlers.py
Instanssi/dblog/handlers.py
# -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogEntry() ...
# -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogEntry() ...
Handle optional field saving with exceptions, save module name.
dblog: Handle optional field saving with exceptions, save module name.
Python
mit
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
# -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogEntry() ...
# -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogEntry() ...
<commit_before># -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogE...
# -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogEntry() ...
# -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogEntry() ...
<commit_before># -*- coding: utf-8 -*- from logging import Handler from datetime import datetime class DBLogHandler(Handler, object): def __init__(self): super(DBLogHandler, self).__init__() def emit(self, record): from models import DBLogEntry as _LogEntry entry = _LogE...
407a032acb307e5f936437aec4975ef69133d0c5
DisplayAdapter/testing/test_display_adapter/test_display_driver/test_display_drivers.py
DisplayAdapter/testing/test_display_adapter/test_display_driver/test_display_drivers.py
""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from display_adapter.display_driver.display_drivers import DisplayDriver class TestDisplayDriver(object):...
""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from datetime import datetime from display_adapter.display_driver.display_drivers import minutify, Display...
Test functionality has been added. Paired by Richard and Michael.
Test functionality has been added. Paired by Richard and Michael. The functionality for the minutify function has now been tested; and the tests work (Support 231)
Python
mit
CO600GOL/Game_of_life,CO600GOL/Game_of_life,CO600GOL/Game_of_life
""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from display_adapter.display_driver.display_drivers import DisplayDriver class TestDisplayDriver(object):...
""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from datetime import datetime from display_adapter.display_driver.display_drivers import minutify, Display...
<commit_before>""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from display_adapter.display_driver.display_drivers import DisplayDriver class TestDisplay...
""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from datetime import datetime from display_adapter.display_driver.display_drivers import minutify, Display...
""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from display_adapter.display_driver.display_drivers import DisplayDriver class TestDisplayDriver(object):...
<commit_before>""" This module contains the testing framework for the display driver functionality, and is responsible for testing whether the pi can correctly and sufficiently connect to the display. """ from mock import patch from display_adapter.display_driver.display_drivers import DisplayDriver class TestDisplay...
3e4094d838df26afadfa7074a16c6a21f06ba6b8
bamp/logs.py
bamp/logs.py
import logging class ExceptionFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True # clear exceptions when not in debug if record.levelname == 'ERROR' and record.exc_info: recor...
import logging class DebugFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True return False LOGGING = { 'version': 1, 'filters': { 'exc_filter': { '()': DebugFilter, ...
Disable printing error messages not in debug
Disable printing error messages not in debug
Python
mit
inirudebwoy/bamp
import logging class ExceptionFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True # clear exceptions when not in debug if record.levelname == 'ERROR' and record.exc_info: recor...
import logging class DebugFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True return False LOGGING = { 'version': 1, 'filters': { 'exc_filter': { '()': DebugFilter, ...
<commit_before>import logging class ExceptionFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True # clear exceptions when not in debug if record.levelname == 'ERROR' and record.exc_info: ...
import logging class DebugFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True return False LOGGING = { 'version': 1, 'filters': { 'exc_filter': { '()': DebugFilter, ...
import logging class ExceptionFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True # clear exceptions when not in debug if record.levelname == 'ERROR' and record.exc_info: recor...
<commit_before>import logging class ExceptionFilter(logging.Filter): def __init__(self, debug=None): self.debug = debug def filter(self, record): if self.debug: return True # clear exceptions when not in debug if record.levelname == 'ERROR' and record.exc_info: ...
61d7c9e99398874745d11720cd8d985bdc3d7514
demoapp/views.py
demoapp/views.py
from demoapp.forms import DemoLoginForm from django.shortcuts import render_to_response from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) if form.is_vali...
from demoapp.forms import DemoLoginForm from django.shortcuts import render from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) if form.is_valid(): ...
Add context to login view
Add context to login view
Python
unlicense
dboczek/django-demo,dboczek/django-demo
from demoapp.forms import DemoLoginForm from django.shortcuts import render_to_response from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) if form.is_vali...
from demoapp.forms import DemoLoginForm from django.shortcuts import render from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) if form.is_valid(): ...
<commit_before>from demoapp.forms import DemoLoginForm from django.shortcuts import render_to_response from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) ...
from demoapp.forms import DemoLoginForm from django.shortcuts import render from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) if form.is_valid(): ...
from demoapp.forms import DemoLoginForm from django.shortcuts import render_to_response from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) if form.is_vali...
<commit_before>from demoapp.forms import DemoLoginForm from django.shortcuts import render_to_response from django.shortcuts import redirect from demoapp import app_settings from demoapp.utils import get_salt def login_view(request): if request.method == 'POST': form = DemoLoginForm(request.POST) ...
fc3408e0d8336ca2324b272dbb4aa0e69914a27c
build_chrome_webapp.py
build_chrome_webapp.py
import os.path from shutil import copyfile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if not os.path.exists(output_dir): os.makedirs(output_dir) def add_background_script(): copyfile...
import os.path from shutil import copyfile from shutil import copytree from shutil import rmtree try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if os.path.exists(output_dir): rmtree(output_di...
Copy static dirs as well
Copy static dirs as well
Python
mit
youtify/youtify,youtify/youtify,youtify/youtify
import os.path from shutil import copyfile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if not os.path.exists(output_dir): os.makedirs(output_dir) def add_background_script(): copyfile...
import os.path from shutil import copyfile from shutil import copytree from shutil import rmtree try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if os.path.exists(output_dir): rmtree(output_di...
<commit_before>import os.path from shutil import copyfile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if not os.path.exists(output_dir): os.makedirs(output_dir) def add_background_script(...
import os.path from shutil import copyfile from shutil import copytree from shutil import rmtree try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if os.path.exists(output_dir): rmtree(output_di...
import os.path from shutil import copyfile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if not os.path.exists(output_dir): os.makedirs(output_dir) def add_background_script(): copyfile...
<commit_before>import os.path from shutil import copyfile try: from jinja2 import Template except: print "Could not import Jinja2, run 'easy_install Jinja2'" exit() output_dir = os.path.join('./', 'chrome_webstore') if not os.path.exists(output_dir): os.makedirs(output_dir) def add_background_script(...
5c1615d9e3e16c1f48be41733997d8c39355bcb4
django_distributed_queue/utils.py
django_distributed_queue/utils.py
class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with any field and met...
class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with any field and met...
Fix for LazyModel infinite recursion
Fix for LazyModel infinite recursion
Python
mit
ProstoKSI/django-distributed-queue
class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with any field and met...
class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with any field and met...
<commit_before>class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with an...
class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with any field and met...
class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with any field and met...
<commit_before>class LazyModel(object): """ It's a helper class that is used in case you have model_class and object primary key. You might need to use only object id. If you try to access other fields of the model class then we will query the database to get that object and provide you with an...
df1617a7518f66d87470f948e057e4d7d7d8f026
driller/tasks.py
driller/tasks.py
import redis from celery import Celery from .driller import Driller app = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost') redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1) @app.task def drill(binary, input, fuzz_bitmap, qemu_dir): redis_inst = redis.Redis(connec...
import redis from celery import Celery from .driller import Driller import config backend_url = "redis://%s:%d" % (config.REDIS_HOST, config.REDIS_PORT) app = Celery('tasks', broker=config.BROKER_URL, backend=backend_url) redis_pool = redis.ConnectionPool(host=config.REDIS_HOST, port=config.REDIS_PORT, db=config.REDI...
Connect to Celery using config options
Connect to Celery using config options
Python
bsd-2-clause
shellphish/driller
import redis from celery import Celery from .driller import Driller app = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost') redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1) @app.task def drill(binary, input, fuzz_bitmap, qemu_dir): redis_inst = redis.Redis(connec...
import redis from celery import Celery from .driller import Driller import config backend_url = "redis://%s:%d" % (config.REDIS_HOST, config.REDIS_PORT) app = Celery('tasks', broker=config.BROKER_URL, backend=backend_url) redis_pool = redis.ConnectionPool(host=config.REDIS_HOST, port=config.REDIS_PORT, db=config.REDI...
<commit_before>import redis from celery import Celery from .driller import Driller app = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost') redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1) @app.task def drill(binary, input, fuzz_bitmap, qemu_dir): redis_inst = red...
import redis from celery import Celery from .driller import Driller import config backend_url = "redis://%s:%d" % (config.REDIS_HOST, config.REDIS_PORT) app = Celery('tasks', broker=config.BROKER_URL, backend=backend_url) redis_pool = redis.ConnectionPool(host=config.REDIS_HOST, port=config.REDIS_PORT, db=config.REDI...
import redis from celery import Celery from .driller import Driller app = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost') redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1) @app.task def drill(binary, input, fuzz_bitmap, qemu_dir): redis_inst = redis.Redis(connec...
<commit_before>import redis from celery import Celery from .driller import Driller app = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost') redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1) @app.task def drill(binary, input, fuzz_bitmap, qemu_dir): redis_inst = red...
a85d148eb00f83052a97d66da8ff9dd79b40f172
.ycm_extra_conf.py
.ycm_extra_conf.py
import os def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) proj_include = ''.join(['-I', proj_root, '/drudge']) flags.extend([libcanon...
import os import subprocess def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) python_include = subprocess.run( ["pkg-config", '--cf...
Add Python inclusion path to YCM config
Add Python inclusion path to YCM config In the script, the path is read from the result from pkg-config. So it should work in most places.
Python
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
import os def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) proj_include = ''.join(['-I', proj_root, '/drudge']) flags.extend([libcanon...
import os import subprocess def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) python_include = subprocess.run( ["pkg-config", '--cf...
<commit_before>import os def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) proj_include = ''.join(['-I', proj_root, '/drudge']) flags.e...
import os import subprocess def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) python_include = subprocess.run( ["pkg-config", '--cf...
import os def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) proj_include = ''.join(['-I', proj_root, '/drudge']) flags.extend([libcanon...
<commit_before>import os def FlagsForFile(filename, **kwargs): flags = ['-std=c++14', '-I/usr/local/include'] proj_root = os.path.dirname(os.path.abspath(__file__)) libcanon_include = ''.join(['-I', proj_root, '/deps/libcanon/include']) proj_include = ''.join(['-I', proj_root, '/drudge']) flags.e...
238da6f5cb5409409f54980f4ce018fda897a766
API/chat/models.py
API/chat/models.py
from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text', 'datetime_sta...
from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text', 'datetime_sta...
Add message_type field into message model
Add message_type field into message model
Python
mit
dionyziz/ting,gtklocker/ting,dionyziz/ting,gtklocker/ting,gtklocker/ting,dionyziz/ting,mbalamat/ting,mbalamat/ting,gtklocker/ting,dionyziz/ting,mbalamat/ting,mbalamat/ting
from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text', 'datetime_sta...
from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text', 'datetime_sta...
<commit_before>from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text'...
from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text', 'datetime_sta...
from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text', 'datetime_sta...
<commit_before>from django.db import models class Channel(models.Model): def __str__(self): return self.name name = models.CharField(max_length=20, unique=True) class Message(models.Model): def __str__(self): return self.text def to_dict(self): serializable_fields = ('text'...
7d898ec04733d25c1df33c8faf151f2b42a69ec9
base/components/people/constants.py
base/components/people/constants.py
from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Supergroup'), ('S...
from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Supergroup'), ('S...
Add Satoumi as a classification.
Add Satoumi as a classification.
Python
apache-2.0
hello-base/web,hello-base/web,hello-base/web,hello-base/web
from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Supergroup'), ('S...
from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Supergroup'), ('S...
<commit_before>from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Superg...
from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Supergroup'), ('S...
from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Supergroup'), ('S...
<commit_before>from model_utils import Choices from ohashi.constants import OTHER BLOOD_TYPE = Choices('A', 'B', 'O', 'AB') CLASSIFICATIONS = Choices( (1, 'major', 'Major Unit'), (2, 'minor', 'Minor Unit'), (4, 'temporary', 'Temporary Unit'), (5, 'subunit', 'Sub-Unit'), (7, 'supergroup', 'Superg...
f828ac9ee5082a9a0b5e215c4c814e7f35db11b6
planetstack/core/models/__init__.py
planetstack/core/models/__init__.py
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
Add credentials module to core list
Add credentials module to core list
Python
apache-2.0
wathsalav/xos,wathsalav/xos,wathsalav/xos,wathsalav/xos
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
<commit_before>from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole,...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
<commit_before>from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole,...
644660b6c41f029f271a0b8866387f358f8fdf54
frappe/patches/v4_0/enable_scheduler_in_system_settings.py
frappe/patches/v4_0/enable_scheduler_in_system_settings.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler def execute(): frappe.reload_doc("core", "doctype", "system_settings") if frappe.db.get_...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler from frappe.utils import cint def execute(): frappe.reload_doc("core", "doctype", "system...
Fix in enable scheduler patch
Fix in enable scheduler patch
Python
mit
BhupeshGupta/frappe,letzerp/framework,saurabh6790/frappe,rmehta/frappe,elba7r/builder,suyashphadtare/sajil-frappe,rohitw1991/frappe,saguas/frappe,indictranstech/tele-frappe,nerevu/frappe,indictranstech/omnitech-frappe,vCentre/vFRP-6233,gangadharkadam/saloon_frappe,aboganas/frappe,indictranstech/phr-frappe,gangadharkada...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler def execute(): frappe.reload_doc("core", "doctype", "system_settings") if frappe.db.get_...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler from frappe.utils import cint def execute(): frappe.reload_doc("core", "doctype", "system...
<commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler def execute(): frappe.reload_doc("core", "doctype", "system_settings") if...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler from frappe.utils import cint def execute(): frappe.reload_doc("core", "doctype", "system...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler def execute(): frappe.reload_doc("core", "doctype", "system_settings") if frappe.db.get_...
<commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.scheduler import disable_scheduler, enable_scheduler def execute(): frappe.reload_doc("core", "doctype", "system_settings") if...
fd79823893b9b83a184c2bcd0fbe32fbb51619c9
src/server/convert.py
src/server/convert.py
# midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Lice...
# midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Lice...
Remove comment containing incorrect conversion function.
Remove comment containing incorrect conversion function.
Python
agpl-3.0
TheUnderscores/midi-beeper-orchestra
# midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Lice...
# midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Lice...
<commit_before># midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either versio...
# midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Lice...
# midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Lice...
<commit_before># midi-beeper-orchestra - program to create an orchestra from PC speakers # Copyright (C) 2015 The Underscores # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either versio...
d81a1ba12add244cb246efeae5c292a6d995c9b8
deadlinks.py
deadlinks.py
from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = filter(None, ya...
from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = filter(None, ya...
Add timeout to dead links script
Add timeout to dead links script
Python
apache-2.0
Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai,Stockholm-AI/stockholm-ai
from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = filter(None, ya...
from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = filter(None, ya...
<commit_before>from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = ...
from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = filter(None, ya...
from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = filter(None, ya...
<commit_before>from operator import itemgetter from itertools import chain import os import yaml import requests yaml.load_all directory = "_companies" flat = chain.from_iterable def link_status_company(filename): (name, _) = filename.rsplit(".", 1); print("==== {name} ====".format(name=name)) docs = ...
64cbf90dbb8378752398d15d75ee5af9aa5b32ed
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter class.""" import o...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter class.""" import o...
Change 'language' to 'syntax', that is more precise terminology.
Change 'language' to 'syntax', that is more precise terminology.
Python
mit
SublimeLinter/SublimeLinter-pep257
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter class.""" import o...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter class.""" import o...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter clas...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter class.""" import o...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter class.""" import o...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-pep257 # License: MIT # """This module exports the PEP257 plugin linter clas...
96b9c25268e98e9464d8b068aa12de113ad1c66f
joby/spiders/data_science_jobs.py
joby/spiders/data_science_jobs.py
# -*- coding: utf-8 -*- import scrapy class DataScienceJobsSpider(scrapy.Spider): name = "data-science-jobs" allowed_domains = ["www.data-science-jobs.com"] start_urls = ( 'http://www.data-science-jobs.com/', ) def parse(self, response): pass
# -*- coding: utf-8 -*- from logging import getLogger from scrapy.spiders import Rule, CrawlSpider from scrapy.linkextractors import LinkExtractor class DataScienceJobsSpider(CrawlSpider): log = getLogger(__name__) name = 'data-science-jobs' allowed_domains = ['www.data-science-jobs.com', 'fonts.googleap...
Add more rules for test purposes.
Add more rules for test purposes.
Python
mit
cyberbikepunk/job-spiders
# -*- coding: utf-8 -*- import scrapy class DataScienceJobsSpider(scrapy.Spider): name = "data-science-jobs" allowed_domains = ["www.data-science-jobs.com"] start_urls = ( 'http://www.data-science-jobs.com/', ) def parse(self, response): pass Add more rules for test purposes.
# -*- coding: utf-8 -*- from logging import getLogger from scrapy.spiders import Rule, CrawlSpider from scrapy.linkextractors import LinkExtractor class DataScienceJobsSpider(CrawlSpider): log = getLogger(__name__) name = 'data-science-jobs' allowed_domains = ['www.data-science-jobs.com', 'fonts.googleap...
<commit_before># -*- coding: utf-8 -*- import scrapy class DataScienceJobsSpider(scrapy.Spider): name = "data-science-jobs" allowed_domains = ["www.data-science-jobs.com"] start_urls = ( 'http://www.data-science-jobs.com/', ) def parse(self, response): pass <commit_msg>Add more ru...
# -*- coding: utf-8 -*- from logging import getLogger from scrapy.spiders import Rule, CrawlSpider from scrapy.linkextractors import LinkExtractor class DataScienceJobsSpider(CrawlSpider): log = getLogger(__name__) name = 'data-science-jobs' allowed_domains = ['www.data-science-jobs.com', 'fonts.googleap...
# -*- coding: utf-8 -*- import scrapy class DataScienceJobsSpider(scrapy.Spider): name = "data-science-jobs" allowed_domains = ["www.data-science-jobs.com"] start_urls = ( 'http://www.data-science-jobs.com/', ) def parse(self, response): pass Add more rules for test purposes.# -*-...
<commit_before># -*- coding: utf-8 -*- import scrapy class DataScienceJobsSpider(scrapy.Spider): name = "data-science-jobs" allowed_domains = ["www.data-science-jobs.com"] start_urls = ( 'http://www.data-science-jobs.com/', ) def parse(self, response): pass <commit_msg>Add more ru...
8bfb43e6af19e6335a95768289036fb73caac559
pinax/testimonials/templatetags/pinax_testimonials_tags.py
pinax/testimonials/templatetags/pinax_testimonials_tags.py
from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.objects.filter(active...
from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.objects.filter(active...
Make number parameter optional to testimonials tag
Make number parameter optional to testimonials tag
Python
mit
pinax/pinax-testimonials
from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.objects.filter(active...
from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.objects.filter(active...
<commit_before>from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.object...
from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.objects.filter(active...
from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.objects.filter(active...
<commit_before>from django import template from ..models import Testimonial register = template.Library() @register.simple_tag def random_testimonials(number): return Testimonial.objects.filter(active=True).order_by("?")[:number] @register.simple_tag def random_testimonial(): queryset = Testimonial.object...
0692cc324d3759703ee52e117ac19e75d82df6a6
tests/config/tests.py
tests/config/tests.py
from raven.conf import load from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', 'SENTRY_SERVERS': ['https://sentry.local...
import logging import mock from raven.conf import load, setup_logging from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', ...
Add basic coverage for the setup_logging method
Add basic coverage for the setup_logging method
Python
bsd-3-clause
inspirehep/raven-python,jmagnusson/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,akalipetis/raven-python,inspirehep/raven-python,nikolas/raven-python,hzy/raven-python,smarkets/raven-python,beniwohli/apm-agent-python,icereval/raven-python,jmagnusson/raven-python,percipient/raven-python,dirtycoder/opbeat_pyth...
from raven.conf import load from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', 'SENTRY_SERVERS': ['https://sentry.local...
import logging import mock from raven.conf import load, setup_logging from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', ...
<commit_before>from raven.conf import load from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', 'SENTRY_SERVERS': ['https...
import logging import mock from raven.conf import load, setup_logging from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', ...
from raven.conf import load from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', 'SENTRY_SERVERS': ['https://sentry.local...
<commit_before>from raven.conf import load from unittest2 import TestCase class LoadTest(TestCase): def test_basic(self): dsn = 'https://foo:bar@sentry.local/1' res = {} load(dsn, res) self.assertEquals(res, { 'SENTRY_PROJECT': '1', 'SENTRY_SERVERS': ['https...
1ec2779f5e4470c6ed19b56d16185c6174ab520c
tests/test_readers.py
tests/test_readers.py
# coding: utf-8 try: import unittest2 except ImportError, e: import unittest as unittest2 import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args) class RstRe...
# coding: utf-8 try: import unittest2 as unittest except ImportError, e: import unittest import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args) class RstRe...
Make the readers tests a bit more verbose.
Make the readers tests a bit more verbose.
Python
agpl-3.0
11craft/pelican,51itclub/pelican,simonjj/pelican,sunzhongwei/pelican,goerz/pelican,51itclub/pelican,Rogdham/pelican,lucasplus/pelican,gymglish/pelican,sunzhongwei/pelican,sunzhongwei/pelican,koobs/pelican,UdeskDeveloper/pelican,ingwinlu/pelican,kennethlyn/pelican,karlcow/pelican,zackw/pelican,alexras/pelican,HyperGroup...
# coding: utf-8 try: import unittest2 except ImportError, e: import unittest as unittest2 import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args) class RstRe...
# coding: utf-8 try: import unittest2 as unittest except ImportError, e: import unittest import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args) class RstRe...
<commit_before># coding: utf-8 try: import unittest2 except ImportError, e: import unittest as unittest2 import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args...
# coding: utf-8 try: import unittest2 as unittest except ImportError, e: import unittest import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args) class RstRe...
# coding: utf-8 try: import unittest2 except ImportError, e: import unittest as unittest2 import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args) class RstRe...
<commit_before># coding: utf-8 try: import unittest2 except ImportError, e: import unittest as unittest2 import datetime import os from pelican import readers CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'content') def _filename(*args): return os.path.join(CONTENT_PATH, *args...
f3ea9820a96536e74e6f74f13387140c97ea9f2e
backgroundworker.py
backgroundworker.py
import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205...
import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-20...
Add engine connection, and close engine connection to worker dyno
Add engine connection, and close engine connection to worker dyno
Python
mit
caseymacphee/green_quote,caseymacphee/green_quote
import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205...
import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-20...
<commit_before>import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_...
import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-20...
import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205...
<commit_before>import sys import os sys.path.insert(0, "../financialScraper") import pandas as pd from financialScraper import getqf from sqlalchemy import create_engine running = True # engine = create_engine(os.environ.get('DATABASE_URL')) engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_...
8868cb556851d3caf227281873d619ec3ddc726a
matador/commands/deploy_ticket.py
matador/commands/deploy_ticket.py
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.add_argument( '-e', '--environment', type=str, required=True, help='Agresso environment name') def _execu...
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.prog = 'matador deploy-ticket' parser.add_argument( '-e', '--environment', type=str, required=True, he...
Add program name to parser
Add program name to parser
Python
mit
Empiria/matador
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.add_argument( '-e', '--environment', type=str, required=True, help='Agresso environment name') def _execu...
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.prog = 'matador deploy-ticket' parser.add_argument( '-e', '--environment', type=str, required=True, he...
<commit_before>#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.add_argument( '-e', '--environment', type=str, required=True, help='Agresso environment name') ...
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.prog = 'matador deploy-ticket' parser.add_argument( '-e', '--environment', type=str, required=True, he...
#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.add_argument( '-e', '--environment', type=str, required=True, help='Agresso environment name') def _execu...
<commit_before>#!/usr/bin/env python from .command import Command from matador import utils class DeployTicket(Command): def _add_arguments(self, parser): parser.add_argument( '-e', '--environment', type=str, required=True, help='Agresso environment name') ...
8f82336aed62a18b2c6f824fcf0e6b1a1d00b8d3
tests/test_astroid.py
tests/test_astroid.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import re import astroid from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = astroid.ALL_NODE_CLASSES context_classes = [ (astr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import astroid from astroid.node_classes import NodeNG from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = NodeNG context_classes = ...
Use NodeNG instead of astroid.ALL_NODE_CLASSES
Use NodeNG instead of astroid.ALL_NODE_CLASSES
Python
apache-2.0
gristlabs/asttokens
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import re import astroid from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = astroid.ALL_NODE_CLASSES context_classes = [ (astr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import astroid from astroid.node_classes import NodeNG from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = NodeNG context_classes = ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import re import astroid from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = astroid.ALL_NODE_CLASSES context_classe...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import astroid from astroid.node_classes import NodeNG from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = NodeNG context_classes = ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import re import astroid from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = astroid.ALL_NODE_CLASSES context_classes = [ (astr...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import re import astroid from . import tools, test_mark_tokens class TestAstroid(test_mark_tokens.TestMarkTokens): is_astroid_test = True module = astroid nodes_classes = astroid.ALL_NODE_CLASSES context_classe...
59a345f29d77026c9bd8b2ec27df71253dc3d1e6
tests/test_helpers.py
tests/test_helpers.py
from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_format_many_tags(se...
from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_format_many_tags(se...
Update test to use new name of helper for dois
Update test to use new name of helper for dois
Python
apache-2.0
fabianvf/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,icereval/scrapi,jeffreyliu3230/scrapi,ostwald/scrapi,felliott/scrapi,erinspace/scrapi,fabianvf/scrapi,felliott/scrapi,mehanig/scrapi,alexgarciac/scrapi,erinspace/scrapi
from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_format_many_tags(se...
from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_format_many_tags(se...
<commit_before>from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_form...
from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_format_many_tags(se...
from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_format_many_tags(se...
<commit_before>from scrapi.base import helpers class TestHelpers(object): def test_format_one_tag(self): single_tag = ' A single tag ' single_output = helpers.format_tags(single_tag) assert single_output == ['a single tag'] assert isinstance(single_output, list) def test_form...
71f007559ca2adf69d09f3c6f720383bfd784897
students/forms.py
students/forms.py
from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername User = get_user_model() class ExclusiveRegistrationF...
from django.contrib.auth import get_user_model from django.contrib.auth.forms import AuthenticationForm from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername...
Add custom authentication form to set the label 'username' label to 'student number' for the login form.
Add custom authentication form to set the label 'username' label to 'student number' for the login form.
Python
mit
muhummadPatel/raspied,muhummadPatel/raspied,muhummadPatel/raspied
from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername User = get_user_model() class ExclusiveRegistrationF...
from django.contrib.auth import get_user_model from django.contrib.auth.forms import AuthenticationForm from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername...
<commit_before>from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername User = get_user_model() class Exclusi...
from django.contrib.auth import get_user_model from django.contrib.auth.forms import AuthenticationForm from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername...
from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername User = get_user_model() class ExclusiveRegistrationF...
<commit_before>from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm from .models import WhitelistedUsername User = get_user_model() class Exclusi...
48075a16190bbcc3d260dfa242a5553b129de8a8
tests/test_see.py
tests/test_see.py
#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import see class TestSee(unittest.TestCase): def test_line_width(self): # Arrange default_wi...
#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import os import sys sys.path.insert(0, os.path.dirname(__file__)) import see class TestSee(unittest.TestCase):...
Update tests to import see
Update tests to import see
Python
bsd-3-clause
araile/see
#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import see class TestSee(unittest.TestCase): def test_line_width(self): # Arrange default_wi...
#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import os import sys sys.path.insert(0, os.path.dirname(__file__)) import see class TestSee(unittest.TestCase):...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import see class TestSee(unittest.TestCase): def test_line_width(self): # Arrange ...
#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import os import sys sys.path.insert(0, os.path.dirname(__file__)) import see class TestSee(unittest.TestCase):...
#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import see class TestSee(unittest.TestCase): def test_line_width(self): # Arrange default_wi...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ Unit tests for see.py """ from __future__ import print_function, unicode_literals try: import unittest2 as unittest except ImportError: import unittest import see class TestSee(unittest.TestCase): def test_line_width(self): # Arrange ...
053a8f9deb8bfc0bb93cddcd48c8a7817bfe8c48
loom/analysis.py
loom/analysis.py
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
Make text a list in the index.
Make text a list in the index.
Python
agpl-3.0
occrp/loom,occrp/datamapper
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
<commit_before>import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to lat...
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to latin. """ if ...
<commit_before>import six from datetime import datetime, date from collections import Mapping, Iterable from jsonmapping.transforms import transliterate IGNORE_FIELDS = ['$schema', '$sources', '$latin', '$text', '$attrcount', '$linkcount', 'id'] def latinize(text): """ Transliterate text to lat...
af79bd6dce28e8147994a8fe2afb4df742dcd3eb
client/test_server_proxy.py
client/test_server_proxy.py
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
Add display of client geoip info. And print description of what we are printing.
Add display of client geoip info. And print description of what we are printing.
Python
bsd-3-clause
lisa-lab/pings,lisa-lab/pings,lisa-lab/pings,lisa-lab/pings
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
<commit_before>"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonReques...
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonRequest('/get_pings',...
<commit_before>"""Code snippet to test the Java ServerProxy interface to the Pings server.""" import ServerProxy, ClientInfo sp = ServerProxy('localhost', 6543) if False: # Need to change permissions on ServerProxy Java class for this to work. print 'Calling doJsonRequest directly...' r = sp.doJsonReques...
fe5edfe737a774aa86cce578321fbb7fb4c8795e
tagcache/utils.py
tagcache/utils.py
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
Fix a bug in file_open (os.open does not take keyword argument).
Fix a bug in file_open (os.open does not take keyword argument).
Python
mit
huangjunwen/tagcache
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
<commit_before># -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(fil...
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
# -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(filename, flag, mo...
<commit_before># -*- encoding: utf-8 -*- import os import errno def ensure_intermediate_dir(path): """ Basiclly equivalent to command `mkdir -p` """ try: os.makedirs(os.path.dirname(path)) except OSError, e: if e.errno != errno.EEXIST: raise e def open_file(fil...
4ef8681f9dcd0f92be524925d3cacdae68c45616
tests/conftest.py
tests/conftest.py
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O' 'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f') def pytest_addoption(parser): parser.addoption('--imp-ke...
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ( 'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6b' 'kA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f' ) def pytest_addoption(parser): parser.addoption( '--imp-key', ...
Change %default to %(default)s for removing warning
Change %default to %(default)s for removing warning
Python
mit
iamport/iamport-rest-client-python
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O' 'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f') def pytest_addoption(parser): parser.addoption('--imp-ke...
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ( 'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6b' 'kA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f' ) def pytest_addoption(parser): parser.addoption( '--imp-key', ...
<commit_before># -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O' 'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f') def pytest_addoption(parser): parser.addo...
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ( 'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6b' 'kA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f' ) def pytest_addoption(parser): parser.addoption( '--imp-key', ...
# -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O' 'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f') def pytest_addoption(parser): parser.addoption('--imp-ke...
<commit_before># -*- coding: utf-8 -*- from pytest import fixture from iamport import Iamport DEFAULT_TEST_IMP_KEY = 'imp_apikey' DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O' 'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f') def pytest_addoption(parser): parser.addo...
3a1615238d4500f0fa7b9eea9ee2bfe460bc21f9
cax/tasks/purity.py
cax/tasks/purity.py
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
Convert lifetime to float instead of sympy type.
Convert lifetime to float instead of sympy type.
Python
isc
XENON1T/cax,XENON1T/cax
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
<commit_before>"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collecti...
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collection('purity') ...
<commit_before>"""Add electron lifetime """ from sympy.parsing.sympy_parser import parse_expr from pax import units from cax import config from cax.task import Task class AddElectronLifetime(Task): "Add electron lifetime to dataset" def __init__(self): self.collection_purity = config.mongo_collecti...
46511322dc8d738cc43561025bca3298946da2e6
server.py
server.py
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
Increase waitress setting max_request_body_size to 5GiB
Increase waitress setting max_request_body_size to 5GiB Python waitress limits the body size to 1GiB by default, thus uploading of larger objects will fail if this value is not increased. Please note that this value should be increased if your Swift cluster supports uploading of objects larger than 5GiB.
Python
apache-2.0
cschwede/swiftdav,cschwede/swiftdav
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
<commit_before>from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy(...
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy() config.updat...
<commit_before>from swiftdav.swiftdav import SwiftProvider, WsgiDAVDomainController from waitress import serve from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp proxy = 'http://127.0.0.1:8080/auth/v1.0' insecure = False # Set to True to disable SSL certificate validation config = DEFAULT_CONFIG.copy(...
5ef05f6c75e3dd0febffd527aebfdf8c2ed6bb51
server.py
server.py
import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NUM_RECORDS = 5 R...
import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NUM_RECORDS = 5 R...
Return Content-Type header with JSON size info
Return Content-Type header with JSON size info
Python
mit
blindstore/blindstore-old-scarab
import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NUM_RECORDS = 5 R...
import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NUM_RECORDS = 5 R...
<commit_before>import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NU...
import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NUM_RECORDS = 5 R...
import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NUM_RECORDS = 5 R...
<commit_before>import argparse import json from flask import Flask, request parser = argparse.ArgumentParser(description="Start a Blindstore server.") parser.add_argument('-d', '--debug', action='store_true', help="enable Flask debug mode. DO NOT use in production.") args = parser.parse_args() NU...
0f7ebf148ab3f88fc983e60f689a9c740ae64e47
outgoing_mail.py
outgoing_mail.py
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com' def send(to, template_name, values): path = os.path.join(os.path...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'EventBot <admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com>' def send(to, template_name, values): path = os.path.j...
Add display name for from address
Add display name for from address
Python
mit
eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com' def send(to, template_name, values): path = os.path.join(os.path...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'EventBot <admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com>' def send(to, template_name, values): path = os.path.j...
<commit_before>#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com' def send(to, template_name, values): path = os.pa...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'EventBot <admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com>' def send(to, template_name, values): path = os.path.j...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com' def send(to, template_name, values): path = os.path.join(os.path...
<commit_before>#!/usr/bin/env python # # Copyright 2010 Eric Entzel <eric@ubermac.net> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = 'admin@' + os.environ['APPLICATION_ID'] + '.appspotmail.com' def send(to, template_name, values): path = os.pa...
3822b5b142d54f83aadf7e366f2b5b925f557e1a
test/testUtils/__init__.py
test/testUtils/__init__.py
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") appOptions = {'auth-key': WIOTP_API_KEY, 'auth-token': WIOTP_API_TOKEN} setupAppClient = ibmiotf.applicatio...
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") if WIOTP_API_KEY is None: raise Exception("WIOTP_API_KEY environment variable is not set") if WIOTP...
Make tests throw better error if env vars are missing
Make tests throw better error if env vars are missing
Python
epl-1.0
ibm-watson-iot/iot-python,ibm-watson-iot/iot-python,ibm-messaging/iot-python
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") appOptions = {'auth-key': WIOTP_API_KEY, 'auth-token': WIOTP_API_TOKEN} setupAppClient = ibmiotf.applicatio...
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") if WIOTP_API_KEY is None: raise Exception("WIOTP_API_KEY environment variable is not set") if WIOTP...
<commit_before>import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") appOptions = {'auth-key': WIOTP_API_KEY, 'auth-token': WIOTP_API_TOKEN} setupAppClient = ibm...
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") if WIOTP_API_KEY is None: raise Exception("WIOTP_API_KEY environment variable is not set") if WIOTP...
import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") appOptions = {'auth-key': WIOTP_API_KEY, 'auth-token': WIOTP_API_TOKEN} setupAppClient = ibmiotf.applicatio...
<commit_before>import ibmiotf.application import os class AbstractTest(object): WIOTP_API_KEY=os.getenv("WIOTP_API_KEY") WIOTP_API_TOKEN=os.getenv("WIOTP_API_TOKEN") ORG_ID = os.getenv("WIOTP_ORG_ID") appOptions = {'auth-key': WIOTP_API_KEY, 'auth-token': WIOTP_API_TOKEN} setupAppClient = ibm...
b853abc579f5dfaab896cf57c39268a36c109a83
tests/test_address_book.py
tests/test_address_book.py
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): pass def test_add_group(self): pass def test_find_person_by_first_name(self): pass def test_find_person_by_last_name(self): pass def test_find_person_by_email(self): ...
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) self.address_book....
Test person adding to addressbook
Test person adding to addressbook
Python
mit
dizpers/python-address-book-assignment
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): pass def test_add_group(self): pass def test_find_person_by_first_name(self): pass def test_find_person_by_last_name(self): pass def test_find_person_by_email(self): ...
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) self.address_book....
<commit_before>from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): pass def test_add_group(self): pass def test_find_person_by_first_name(self): pass def test_find_person_by_last_name(self): pass def test_find_person_by...
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) self.address_book....
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): pass def test_add_group(self): pass def test_find_person_by_first_name(self): pass def test_find_person_by_last_name(self): pass def test_find_person_by_email(self): ...
<commit_before>from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): pass def test_add_group(self): pass def test_find_person_by_first_name(self): pass def test_find_person_by_last_name(self): pass def test_find_person_by...
097eae49564a8eefd66d903d8e8cd900054ef147
characters/views.py
characters/views.py
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
Order character listing by name
Order character listing by name
Python
mit
mpirnat/django-tutorial-v2
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
<commit_before>from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_name = 'all_cha...
<commit_before>from django.shortcuts import get_object_or_404, redirect, render from django.views import generic from characters.forms import CharacterForm from characters.models import Character, Class, Race class CharacterIndexView(generic.ListView): template_name = 'characters/index.html' context_object_...
fefde8aef88cbfb13cb1f0bfcd3ac476ad7a903c
spacy/download.py
spacy/download.py
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about def download(lang, force=False, fail_on_exist=True): if force: sputnik.purge(about.__titl...
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about from . import util def download(lang, force=False, fail_on_exist=True): if force: sputnik...
Make installation print data path.
Make installation print data path.
Python
mit
explosion/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,oroszgy/spaCy.hu,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,recognai/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,spacy-io/spaCy,spacy-io/spaCy,raphael0202/spaCy,banglakit/spaCy,ex...
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about def download(lang, force=False, fail_on_exist=True): if force: sputnik.purge(about.__titl...
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about from . import util def download(lang, force=False, fail_on_exist=True): if force: sputnik...
<commit_before>from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about def download(lang, force=False, fail_on_exist=True): if force: sputnik.pur...
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about from . import util def download(lang, force=False, fail_on_exist=True): if force: sputnik...
from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about def download(lang, force=False, fail_on_exist=True): if force: sputnik.purge(about.__titl...
<commit_before>from __future__ import print_function import sys import sputnik from sputnik.package_list import (PackageNotFoundException, CompatiblePackageNotFoundException) from . import about def download(lang, force=False, fail_on_exist=True): if force: sputnik.pur...
267a768bd1ccc87c3c1f54c4ac520a0e12e5fd5f
moksha/tests/test_clientsockets.py
moksha/tests/test_clientsockets.py
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
Rename test. Fix copy/pasta forgetfulness.
Rename test. Fix copy/pasta forgetfulness.
Python
apache-2.0
pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,mokshaproject/moksha,pombredanne/moksha
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
<commit_before>import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): ...
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): def a...
<commit_before>import webtest import moksha.tests.utils as testutils from moksha.api.widgets.live import get_moksha_socket from moksha.middleware import make_moksha_middleware from tw2.core import make_middleware as make_tw2_middleware class TestClientSocketDumb: def _setUp(self): def kernel(config): ...
68cec560ad108e0e6a081ed92aab2f06a7545821
tests/conftest.py
tests/conftest.py
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_marker and not ...
import pytest from docker import Client @pytest.fixture(scope="session") def docker_client(): client = Client(base_url='unix://var/run/docker.sock', timeout=180) return client @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.nod...
Increase docker-py timeout to 180
Increase docker-py timeout to 180
Python
mit
dincamihai/salt-toaster,dincamihai/salt-toaster
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_marker and not ...
import pytest from docker import Client @pytest.fixture(scope="session") def docker_client(): client = Client(base_url='unix://var/run/docker.sock', timeout=180) return client @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.nod...
<commit_before>import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_...
import pytest from docker import Client @pytest.fixture(scope="session") def docker_client(): client = Client(base_url='unix://var/run/docker.sock', timeout=180) return client @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.nod...
import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_marker and not ...
<commit_before>import pytest @pytest.fixture(autouse=True) def tagschecker(request): tags = set(request.config.getini('TAGS')) tags_marker = request.node.get_marker('tags') xfailtags_marker = request.node.get_marker('xfailtags') skiptags_marker = request.node.get_marker('skiptags') if xfailtags_...