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
49f3c5bf5b95a7d678e541d93e0999f37f8a2b26
students/admin.py
students/admin.py
from django.contrib import admin from .models import WhitelistedUsername class WhitelistedUsernameAdmin(admin.ModelAdmin): pass admin.site.register(WhitelistedUsername, WhitelistedUsernameAdmin)
from django.contrib import admin from .models import WhitelistedUsername @admin.register(WhitelistedUsername) class WhitelistedUsernameAdmin(admin.ModelAdmin): pass
Use class decorator instead of floating statement to register WhitelistedUsernameAdmin class.
Use class decorator instead of floating statement to register WhitelistedUsernameAdmin class.
Python
mit
muhummadPatel/raspied,muhummadPatel/raspied,muhummadPatel/raspied
from django.contrib import admin from .models import WhitelistedUsername class WhitelistedUsernameAdmin(admin.ModelAdmin): pass admin.site.register(WhitelistedUsername, WhitelistedUsernameAdmin) Use class decorator instead of floating statement to register WhitelistedUsernameAdmin class.
from django.contrib import admin from .models import WhitelistedUsername @admin.register(WhitelistedUsername) class WhitelistedUsernameAdmin(admin.ModelAdmin): pass
<commit_before>from django.contrib import admin from .models import WhitelistedUsername class WhitelistedUsernameAdmin(admin.ModelAdmin): pass admin.site.register(WhitelistedUsername, WhitelistedUsernameAdmin) <commit_msg>Use class decorator instead of floating statement to register WhitelistedUsernameAdmin cl...
from django.contrib import admin from .models import WhitelistedUsername @admin.register(WhitelistedUsername) class WhitelistedUsernameAdmin(admin.ModelAdmin): pass
from django.contrib import admin from .models import WhitelistedUsername class WhitelistedUsernameAdmin(admin.ModelAdmin): pass admin.site.register(WhitelistedUsername, WhitelistedUsernameAdmin) Use class decorator instead of floating statement to register WhitelistedUsernameAdmin class.from django.contrib imp...
<commit_before>from django.contrib import admin from .models import WhitelistedUsername class WhitelistedUsernameAdmin(admin.ModelAdmin): pass admin.site.register(WhitelistedUsername, WhitelistedUsernameAdmin) <commit_msg>Use class decorator instead of floating statement to register WhitelistedUsernameAdmin cl...
fde84efc866d2276eac5faed0af3df5a672664f5
fabfile.py
fabfile.py
from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('python sana_builder...
from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('python sana_builder...
Remove input from fab test
Remove input from fab test
Python
bsd-3-clause
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('python sana_builder...
from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('python sana_builder...
<commit_before>from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('pyth...
from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('python sana_builder...
from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('python sana_builder...
<commit_before>from fabric.api import * from fabric.colors import * env.colorize_errors = True env.hosts = ['sanaprotocolbuilder.me'] env.user = 'root' env.virtualenv = 'source /usr/local/bin/virtualenvwrapper.sh' env.project_root = '/opt/sana.protocol_builder' def test(): local('pyth...
3309fd5058294a9ee340fd3130d45711270b3062
daymetpy/__init__.py
daymetpy/__init__.py
__version__ = '0.0.2' from daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]
__version__ = '0.0.2' try: from daymetpy import daymet_timeseries except ImportError: from daymetpy.daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]
Change to imports for 2-3 compatibility
Change to imports for 2-3 compatibility
Python
agpl-3.0
khufkens/daymetpy
__version__ = '0.0.2' from daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]Change to imports for 2-3 compatibility
__version__ = '0.0.2' try: from daymetpy import daymet_timeseries except ImportError: from daymetpy.daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]
<commit_before>__version__ = '0.0.2' from daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]<commit_msg>Change to imports for 2-3 compatibility<commit_after>
__version__ = '0.0.2' try: from daymetpy import daymet_timeseries except ImportError: from daymetpy.daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]
__version__ = '0.0.2' from daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]Change to imports for 2-3 compatibility__version__ = '0.0.2' try: from daymetpy import daymet_timeseries except ImportError: from daymetpy.daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]
<commit_before>__version__ = '0.0.2' from daymetpy import daymet_timeseries __all__ = ["daymet_timeseries"]<commit_msg>Change to imports for 2-3 compatibility<commit_after>__version__ = '0.0.2' try: from daymetpy import daymet_timeseries except ImportError: from daymetpy.daymetpy import daymet_times...
1001a61d345e1b3018eccfbd1cdb4a2111e23cca
example.py
example.py
import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def bling(self, target, sender): "will print yo" if target.startswith("#"): self.message(target, "%s: yo" % sender) else: self.message(target, "yo") @hooks.command("^repeat\s+(?P<msg>.+)$") def re...
import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def info(self, target, sender): "will print the target and sender to the console" print("target: %s, sender: %s" % (target, sender)) @hooks.command() def bling(self, target, sender): "will print yo" if ta...
Fix bling() and add in info function to report target & sender.
Fix bling() and add in info function to report target & sender.
Python
mit
sarenji/pyrc
import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def bling(self, target, sender): "will print yo" if target.startswith("#"): self.message(target, "%s: yo" % sender) else: self.message(target, "yo") @hooks.command("^repeat\s+(?P<msg>.+)$") def re...
import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def info(self, target, sender): "will print the target and sender to the console" print("target: %s, sender: %s" % (target, sender)) @hooks.command() def bling(self, target, sender): "will print yo" if ta...
<commit_before>import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def bling(self, target, sender): "will print yo" if target.startswith("#"): self.message(target, "%s: yo" % sender) else: self.message(target, "yo") @hooks.command("^repeat\s+(?P<msg>...
import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def info(self, target, sender): "will print the target and sender to the console" print("target: %s, sender: %s" % (target, sender)) @hooks.command() def bling(self, target, sender): "will print yo" if ta...
import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def bling(self, target, sender): "will print yo" if target.startswith("#"): self.message(target, "%s: yo" % sender) else: self.message(target, "yo") @hooks.command("^repeat\s+(?P<msg>.+)$") def re...
<commit_before>import pyrc import pyrc.utils.hooks as hooks class GangstaBot(pyrc.Bot): @hooks.command() def bling(self, target, sender): "will print yo" if target.startswith("#"): self.message(target, "%s: yo" % sender) else: self.message(target, "yo") @hooks.command("^repeat\s+(?P<msg>...
0607ff6a3a787286b174af1cb441eb1d1447b634
fabfile.py
fabfile.py
import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): local('....
import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): local('....
Enable quick deploys in fabric
Enable quick deploys in fabric
Python
agpl-3.0
matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo
import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): local('....
import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): local('....
<commit_before>import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): ...
import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): local('....
import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): local('....
<commit_before>import os from fabric.api import * LOCAL_ROOT = os.path.dirname(os.path.realpath(__file__)) LOCAL_VIRTUALENV = '~/.virtualenv/tomo' TOMO_HOST = 'www.projekt-tomo.si' env.hosts = [TOMO_HOST] # MAIN TASKS @task def test(): with lcd(LOCAL_ROOT), activate_virtualenv(): with lcd('web'): ...
2f3ffa846c67f9b746855f1f9ec39d861a3e95b9
libraries/vytree/__init__.py
libraries/vytree/__init__.py
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
Add reference tree loader to imports.
Add reference tree loader to imports.
Python
lgpl-2.1
vyos-legacy/vyconfd,vyos-legacy/vyconfd
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
<commit_before># vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; ...
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
<commit_before># vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; ...
709252b84cd4b7f1f00e26980c2998db9b1495e5
llvmlite/tests/test_dylib.py
llvmlite/tests/test_dylib.py
from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in {"Linux", "Darwin"}, "Unsupport test for current OS") class TestDylib(TestCase): def setUp(self): ll...
from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in ["Linux", "Darwin"], "Unsupport test for current OS") class TestDylib(TestCase): def setUp(self): ll...
Fix syntax for python 2.6
Fix syntax for python 2.6
Python
bsd-2-clause
markdewing/llvmlite,markdewing/llvmlite,numba/llvmlite,sklam/llvmlite,sklam/llvmlite,m-labs/llvmlite,pitrou/llvmlite,markdewing/llvmlite,pitrou/llvmlite,sklam/llvmlite,m-labs/llvmlite,squisher/llvmlite,sklam/llvmlite,ssarangi/llvmlite,numba/llvmlite,ssarangi/llvmlite,ssarangi/llvmlite,pitrou/llvmlite,squisher/llvmlite,...
from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in {"Linux", "Darwin"}, "Unsupport test for current OS") class TestDylib(TestCase): def setUp(self): ll...
from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in ["Linux", "Darwin"], "Unsupport test for current OS") class TestDylib(TestCase): def setUp(self): ll...
<commit_before>from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in {"Linux", "Darwin"}, "Unsupport test for current OS") class TestDylib(TestCase): def setUp(se...
from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in ["Linux", "Darwin"], "Unsupport test for current OS") class TestDylib(TestCase): def setUp(self): ll...
from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in {"Linux", "Darwin"}, "Unsupport test for current OS") class TestDylib(TestCase): def setUp(self): ll...
<commit_before>from . import TestCase from llvmlite import binding as llvm from llvmlite.binding import dylib import platform from ctypes.util import find_library import unittest @unittest.skipUnless(platform.system() in {"Linux", "Darwin"}, "Unsupport test for current OS") class TestDylib(TestCase): def setUp(se...
3ccfed2e70e6da68452d466353c7b0df1ff9811c
cricinfo/my_bot.py
cricinfo/my_bot.py
import requests from bs4 import BeautifulSoup CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' # Fetching matches def get_matches(): r = requests.get(CRICINFO_RSS_URL) soup = BeautifulSoup(r.text) return soup.find_all('item') matches = get_matches() for match in matches: print match.contents...
import requests from bs4 import BeautifulSoup import xmltodict import click CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' class Match(object): def __init__(self, title, link, description, guid): self.title = title self.link = link self.description = description self.guid = guid @st...
Add fetching live scores feature
Add fetching live scores feature
Python
mit
voidabhi/cricinfo,voidabhi/cricinfo
import requests from bs4 import BeautifulSoup CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' # Fetching matches def get_matches(): r = requests.get(CRICINFO_RSS_URL) soup = BeautifulSoup(r.text) return soup.find_all('item') matches = get_matches() for match in matches: print match.contents...
import requests from bs4 import BeautifulSoup import xmltodict import click CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' class Match(object): def __init__(self, title, link, description, guid): self.title = title self.link = link self.description = description self.guid = guid @st...
<commit_before> import requests from bs4 import BeautifulSoup CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' # Fetching matches def get_matches(): r = requests.get(CRICINFO_RSS_URL) soup = BeautifulSoup(r.text) return soup.find_all('item') matches = get_matches() for match in matches: print...
import requests from bs4 import BeautifulSoup import xmltodict import click CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' class Match(object): def __init__(self, title, link, description, guid): self.title = title self.link = link self.description = description self.guid = guid @st...
import requests from bs4 import BeautifulSoup CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' # Fetching matches def get_matches(): r = requests.get(CRICINFO_RSS_URL) soup = BeautifulSoup(r.text) return soup.find_all('item') matches = get_matches() for match in matches: print match.contents...
<commit_before> import requests from bs4 import BeautifulSoup CRICINFO_RSS_URL = 'http://static.cricinfo.com/rss/livescores.xml' # Fetching matches def get_matches(): r = requests.get(CRICINFO_RSS_URL) soup = BeautifulSoup(r.text) return soup.find_all('item') matches = get_matches() for match in matches: print...
8128107f10971a61f3d0057bcb9e9ea8413b8cef
python/render/render_tracks.py
python/render/render_tracks.py
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
Add missing close parenthesis on track dict
Add missing close parenthesis on track dict
Python
mit
Duke-GCB/TrackHubGenerator,Duke-GCB/TrackHubGenerator
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
<commit_before>__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] ...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
<commit_before>__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] ...
0b82789823dbfa1fc74af0eee7b8911783519f91
scripts/starting_py_program.py
scripts/starting_py_program.py
#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS or as normal fun...
#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys import os def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS or as ...
Add the program name to starting py
Add the program name to starting py
Python
unlicense
paolobolzoni/useful-conf,paolobolzoni/useful-conf,paolobolzoni/useful-conf
#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS or as normal fun...
#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys import os def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS or as ...
<commit_before>#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS o...
#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys import os def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS or as ...
#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS or as normal fun...
<commit_before>#!/usr/bin/env python3 # from __future__ import print_function #(if python2) import sys def eprint(*args, **kwargs): """ Just like the print function, but on stderr """ print(*args, file=sys.stderr, **kwargs) def main(argv=None): """ Program starting point, it can started by the OS o...
edd6368f4b21372e268adef04b9beb85d5603f40
txircd/modules/cmd_names.py
txircd/modules/cmd_names.py
from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED, "NAMES", ":Yo...
from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED, "NAMES", ":Yo...
Send "no such channel" message on NAMES with a nonexistent channel
Send "no such channel" message on NAMES with a nonexistent channel
Python
bsd-3-clause
ElementalAlchemist/txircd,Heufneutje/txircd,DesertBus/txircd
from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED, "NAMES", ":Yo...
from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED, "NAMES", ":Yo...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED...
from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED, "NAMES", ":Yo...
from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED, "NAMES", ":Yo...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command class NamesCommand(Command): def onUse(self, user, data): for chan in data["targetchan"]: user.report_names(chan) def processParams(self, user, params): if user.registered > 0: user.sendMessage(irc.ERR_NOTREGISTERED...
0adf184e841bedffa118e85eda94ff099862cb6f
examsys/urls.py
examsys/urls.py
from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r'^register/', v...
from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r'^register/', v...
Add the choose test and take test to URLs
Add the choose test and take test to URLs
Python
mit
icyflame/test-taking-platform,icyflame/test-taking-platform
from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r'^register/', v...
from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r'^register/', v...
<commit_before>from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r...
from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r'^register/', v...
from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r'^register/', v...
<commit_before>from django.conf.urls import patterns, url from examsys import views urlpatterns = patterns('', # (r'^$', lambda r: HttpResponseRedirect('examsys/')) url(r'^$', views.index, name='index'), url(r'^login/', views.login, name='login'), url(r'^logout/', views.logout, name='logout'), url(r...
10e4efb1b28eb6b32f0cef3eee510f9a6e0b6909
src/foremast/plugin_manager.py
src/foremast/plugin_manager.py
"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud provider. ...
"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud provider. ...
Rename parameter to more appropriate name
fix: Rename parameter to more appropriate name
Python
apache-2.0
gogoair/foremast,gogoair/foremast
"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud provider. ...
"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud provider. ...
<commit_before>"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud...
"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud provider. ...
"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud provider. ...
<commit_before>"""Manager to handle plugins""" import pathlib from pluginbase import PluginBase from .exceptions import PluginNotFound class PluginManager: """Class to manage and create Spinnaker applications Args: paths (str): Path of plugin directory. provider (str): The name of the cloud...
fdcb0bc502ea3976f7edd613f0bdb0857104fc82
examples/ags_rockstar.py
examples/ags_rockstar.py
from rockstar import RockStar ags_code = "Display("Hello, world!");" rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar()
from rockstar import RockStar ags_code = 'Display("Hello, world!");' rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar()
Fix AGS (Adventure Game Studio) example
Fix AGS (Adventure Game Studio) example
Python
mit
jehb/rockstar,monsterwater/rockstar,avinassh/rockstar,Endika/rockstar,yask123/rockstar,ActuallyACat/rockstar,varunparkhe/rockstar,jrajath94/RockStar,haosdent/rockstar,gokaygurcan/rockstar
from rockstar import RockStar ags_code = "Display("Hello, world!");" rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar() Fix AGS (Adventure Game Studio) example
from rockstar import RockStar ags_code = 'Display("Hello, world!");' rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar()
<commit_before>from rockstar import RockStar ags_code = "Display("Hello, world!");" rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar() <commit_msg>Fix AGS (Adventure Game Studio) example<commit_after>
from rockstar import RockStar ags_code = 'Display("Hello, world!");' rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar()
from rockstar import RockStar ags_code = "Display("Hello, world!");" rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar() Fix AGS (Adventure Game Studio) examplefrom rockstar import RockStar ags_code = 'Display("Hello, world!");' rock_it_bro = RockStar(days=777,...
<commit_before>from rockstar import RockStar ags_code = "Display("Hello, world!");" rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar() <commit_msg>Fix AGS (Adventure Game Studio) example<commit_after>from rockstar import RockStar ags_code = 'Display("Hello, wo...
98acdc9262cfa8c5da092e0c3b1264afdcbde66a
locations/spiders/speedway.py
locations/spiders/speedway.py
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "superamerica" allowed_domains = ["superamerica.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, response): ...
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "speedway" allowed_domains = ["www.speedway.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, response): ...
Correct the name of the spider
Correct the name of the spider
Python
mit
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "superamerica" allowed_domains = ["superamerica.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, response): ...
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "speedway" allowed_domains = ["www.speedway.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, response): ...
<commit_before># -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "superamerica" allowed_domains = ["superamerica.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, ...
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "speedway" allowed_domains = ["www.speedway.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, response): ...
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "superamerica" allowed_domains = ["superamerica.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, response): ...
<commit_before># -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem class SuperAmericaSpider(scrapy.Spider): name = "superamerica" allowed_domains = ["superamerica.com"] start_urls = ( 'https://www.speedway.com/GasPriceSearch', ) def parse(self, ...
19e26d09659dc4db6bcd27565dacd458b7e3e4cd
symposion/proposals/management/commands/ensure_proposal_records.py
symposion/proposals/management/commands/ensure_proposal_records.py
""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): def handle_noargs(self, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_proposal_records(...
""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import BaseCommand class Command(BaseCommand): def handle(self, *args, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_proposal_records()
Use BaseCommand instead of NoArgsCommand
Use BaseCommand instead of NoArgsCommand
Python
bsd-3-clause
PyCon/pycon,njl/pycon,njl/pycon,njl/pycon,PyCon/pycon,njl/pycon,PyCon/pycon,PyCon/pycon
""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): def handle_noargs(self, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_proposal_records(...
""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import BaseCommand class Command(BaseCommand): def handle(self, *args, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_proposal_records()
<commit_before>""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): def handle_noargs(self, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_pr...
""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import BaseCommand class Command(BaseCommand): def handle(self, *args, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_proposal_records()
""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): def handle_noargs(self, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_proposal_records(...
<commit_before>""" Management command to make sure the permissions exist for all kinds of proposals. """ from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): def handle_noargs(self, **options): from symposion.proposals.kinds import ensure_proposal_records ensure_pr...
dcda634f00d2e04e1c77bca14059a9df1a1fdc5c
ghtools/command/login.py
ghtools/command/login.py
from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): if gh.logged_...
from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): if gh.logged_...
Fix broken GithubAPIClient constructor args
Fix broken GithubAPIClient constructor args
Python
mit
alphagov/ghtools
from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): if gh.logged_...
from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): if gh.logged_...
<commit_before>from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): ...
from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): if gh.logged_...
from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): if gh.logged_...
<commit_before>from __future__ import print_function from getpass import getpass, _raw_input import logging import sys from argh import ArghParser, arg from ghtools import cli from ghtools.api import envkey, GithubAPIClient log = logging.getLogger(__name__) parser = ArghParser() def login_if_needed(gh, scopes): ...
298a90c942bd44f920e1b12ea0af384b7f06c6f1
gitless/cli/gl_switch.py
gitless/cli/gl_switch.py
# -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" desc = 'switch ...
# -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" desc = 'switch ...
Make `switch` command a bit more helpful
Make `switch` command a bit more helpful
Python
mit
sdg-mit/gitless,sdg-mit/gitless
# -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" desc = 'switch ...
# -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" desc = 'switch ...
<commit_before># -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" ...
# -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" desc = 'switch ...
# -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" desc = 'switch ...
<commit_before># -*- coding: utf-8 -*- # Gitless - a version control system built on top of Git. # Licensed under GNU GPL v2. """gl switch - Switch branches.""" from __future__ import unicode_literals from . import pprint def parser(subparsers, _): """Adds the switch parser to the given subparsers object.""" ...
6bf1bceebc9acc724dd9831554ea582eabf82d08
tools/telemetry/telemetry/core/chrome/inspector_memory_unittest.py
tools/telemetry/telemetry/core/chrome/inspector_memory_unittest.py
# Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): unittest_data_...
# Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): unittest_data_...
Fix InspectorMemoryTest.testGetDOMStats to have consistent behaviour on CrOS and desktop versions of Chrome. Starting the browser in CrOS requires navigating through an initial setup that does not leave us with a tab at "chrome://newtab". This workaround runs the test in a new tab on all platforms for consistency.
Fix InspectorMemoryTest.testGetDOMStats to have consistent behaviour on CrOS and desktop versions of Chrome. Starting the browser in CrOS requires navigating through an initial setup that does not leave us with a tab at "chrome://newtab". This workaround runs the test in a new tab on all platforms for consistency. BUG...
Python
bsd-3-clause
pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,anirudhSK/chromium,Just-D/chromium-1,hgl888...
# Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): unittest_data_...
# Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): unittest_data_...
<commit_before># Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): ...
# Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): unittest_data_...
# Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): unittest_data_...
<commit_before># Copyright (c) 2013 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 from telemetry.test import tab_test_case class InspectorMemoryTest(tab_test_case.TabTestCase): def testGetDOMStats(self): ...
243523ee5e70a94914de23d8444478425b7bb782
alg_topological_sort.py
alg_topological_sort.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG).""" pass def main(): # DAG. dag_adjacency_dict = { 'A': ['D'], 'B': ['D'], 'C': ['D'], ...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def _previsit(): pass def _postvisit(): pass def _dfs_explore(): pass def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG). To topologically sort a DAG, we si...
Add helper methods and revise doc string
Add helper methods and revise doc string
Python
bsd-2-clause
bowen0701/algorithms_data_structures
from __future__ import absolute_import from __future__ import print_function from __future__ import division def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG).""" pass def main(): # DAG. dag_adjacency_dict = { 'A': ['D'], 'B': ['D'], 'C': ['D'], ...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def _previsit(): pass def _postvisit(): pass def _dfs_explore(): pass def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG). To topologically sort a DAG, we si...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG).""" pass def main(): # DAG. dag_adjacency_dict = { 'A': ['D'], 'B': ['D'], ...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def _previsit(): pass def _postvisit(): pass def _dfs_explore(): pass def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG). To topologically sort a DAG, we si...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG).""" pass def main(): # DAG. dag_adjacency_dict = { 'A': ['D'], 'B': ['D'], 'C': ['D'], ...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def topological_sort(): """Topological Sorting for Directed Acyclic Graph (DAG).""" pass def main(): # DAG. dag_adjacency_dict = { 'A': ['D'], 'B': ['D'], ...
10f48dda3337cdb2778d76dee0df1ed4e5601439
apps/storybase/utils.py
apps/storybase/utils.py
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(setti...
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(setti...
Fix parsing of fragments without HTML elements.
Fix parsing of fragments without HTML elements.
Python
mit
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(setti...
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(setti...
<commit_before>"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languag...
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(setti...
"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languages = dict(setti...
<commit_before>"""Shared utility functions""" from django.conf import settings from django.template.defaultfilters import slugify as django_slugify from django.utils.translation import ugettext_lazy as _ def get_language_name(language_code): """Convert a language code into its full (localized) name""" languag...
cdd3989536e123877755fef621b95d0121e4c665
search/kws_dataset.py
search/kws_dataset.py
from search.html import HTMLVisualization from utils.transcription import WordCoord def search_word(word, save=False): """ Finds all locations of a word. Optionally the locations can be saved in an HTML file with the same name as the word. """ # TODO: Find the word. Currently just dummy data for te...
Add visualization for search results
Add visualization for search results
Python
mit
dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016,dwettstein/pattern-recognition-2016
Add visualization for search results
from search.html import HTMLVisualization from utils.transcription import WordCoord def search_word(word, save=False): """ Finds all locations of a word. Optionally the locations can be saved in an HTML file with the same name as the word. """ # TODO: Find the word. Currently just dummy data for te...
<commit_before> <commit_msg>Add visualization for search results<commit_after>
from search.html import HTMLVisualization from utils.transcription import WordCoord def search_word(word, save=False): """ Finds all locations of a word. Optionally the locations can be saved in an HTML file with the same name as the word. """ # TODO: Find the word. Currently just dummy data for te...
Add visualization for search resultsfrom search.html import HTMLVisualization from utils.transcription import WordCoord def search_word(word, save=False): """ Finds all locations of a word. Optionally the locations can be saved in an HTML file with the same name as the word. """ # TODO: Find the w...
<commit_before> <commit_msg>Add visualization for search results<commit_after>from search.html import HTMLVisualization from utils.transcription import WordCoord def search_word(word, save=False): """ Finds all locations of a word. Optionally the locations can be saved in an HTML file with the same name as...
36593f21c93a16beb5d2ab77ba803a9059099615
phillydata/waterdept/load.py
phillydata/waterdept/load.py
import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. """ # Us...
import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterAccount, WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. ...
Fix WaterAccount instances pointing to old WaterParcels
Fix WaterAccount instances pointing to old WaterParcels Start to make older WaterParcels obsolete
Python
bsd-3-clause
ebrelsford/django-phillydata
import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. """ # Us...
import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterAccount, WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. ...
<commit_before>import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. ...
import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterAccount, WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. ...
import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. """ # Us...
<commit_before>import os from django.contrib.gis.utils import LayerMapping from ..load import get_processed_data_file from .models import WaterParcel, waterparcel_mapping def from_shapefile(transaction_mode='autocommit', **kwargs): """ Load water parcel data into the database from the processed shapefile. ...
342d3791aa80084309ffc00a9e5e936fa8277401
AFQ/viz.py
AFQ/viz.py
import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundles in 3D using fvtk """ if isinst...
import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from dipy.viz.colormap import line_colors from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundl...
Enable visualizing trk files without bundle designations.
Enable visualizing trk files without bundle designations.
Python
bsd-2-clause
yeatmanlab/pyAFQ,arokem/pyAFQ,yeatmanlab/pyAFQ,arokem/pyAFQ
import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundles in 3D using fvtk """ if isinst...
import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from dipy.viz.colormap import line_colors from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundl...
<commit_before>import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundles in 3D using fvtk ""...
import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from dipy.viz.colormap import line_colors from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundl...
import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundles in 3D using fvtk """ if isinst...
<commit_before>import tempfile import os.path as op import numpy as np import IPython.display as display import nibabel as nib from dipy.viz import fvtk from palettable.tableau import Tableau_20 def visualize_bundles(trk, ren=None, inline=True, interact=False): """ Visualize bundles in 3D using fvtk ""...
7ad1d9afdbf8db2960ac6b402f4da3f1675cc86f
fileupload/models.py
fileupload/models.py
from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ picture_file = m...
from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ file = models.Im...
Use the same name for the field in frontend and backend
Use the same name for the field in frontend and backend
Python
mit
sigurdga/django-dropzone-upload,sigurdga/django-dropzone-upload
from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ picture_file = m...
from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ file = models.Im...
<commit_before>from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ p...
from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ file = models.Im...
from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ picture_file = m...
<commit_before>from django.db import models class Picture(models.Model): """ This is a small demo using just two fields. ImageField depends on PIL or pillow (where Pillow is easily installable in a virtualenv. If you have problems installing pillow, use a more generic FileField instead. """ p...
eaa75a86a3ea64e2c98dbcdd0a0b9731c9505abf
sts/contextmanagers.py
sts/contextmanagers.py
from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True): self.system = System.get(obj) self.transition = self.system.start_transition(event=event, ...
from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True, fail_state='Fail'): self.system = System.get(obj) self.transition = self.system.start_transition(event=...
Add back fail_state to context manager
Add back fail_state to context manager
Python
bsd-3-clause
chop-dbhi/django-sts,chop-dbhi/django-sts
from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True): self.system = System.get(obj) self.transition = self.system.start_transition(event=event, ...
from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True, fail_state='Fail'): self.system = System.get(obj) self.transition = self.system.start_transition(event=...
<commit_before>from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True): self.system = System.get(obj) self.transition = self.system.start_transition(event=even...
from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True, fail_state='Fail'): self.system = System.get(obj) self.transition = self.system.start_transition(event=...
from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True): self.system = System.get(obj) self.transition = self.system.start_transition(event=event, ...
<commit_before>from .models import System class transition(object): "Transition context manager." def __init__(self, obj, state, event=None, start_time=None, message=None, exception_fail=True): self.system = System.get(obj) self.transition = self.system.start_transition(event=even...
35f2838d1451681f1cc49fba3b4466389bf2cf68
test/test_allocator.py
test/test_allocator.py
from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17))
from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17)) def test_init_values(self): self.assertNotEq...
Add testcase for allocator initialization
Add testcase for allocator initialization
Python
mit
ntruessel/qcgc,ntruessel/qcgc,ntruessel/qcgc
from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17)) Add testcase for allocator initialization
from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17)) def test_init_values(self): self.assertNotEq...
<commit_before>from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17)) <commit_msg>Add testcase for allocator ini...
from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17)) def test_init_values(self): self.assertNotEq...
from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17)) Add testcase for allocator initializationfrom support imp...
<commit_before>from support import lib,ffi from qcgc_test import QCGCTest class AllocatorTest(QCGCTest): def test_cells_to_bytes(self): for i in range(1,17): self.assertEqual(1, lib.bytes_to_cells(i)) self.assertEqual(2, lib.bytes_to_cells(17)) <commit_msg>Add testcase for allocator ini...
928d1d8aab846e9393f925690bd1f51f327fb5ad
test_arrange_schedule.py
test_arrange_schedule.py
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
Add test case for forum crawler
Add test case for forum crawler The forum include: 'inside', 'techorange', 'media'
Python
apache-2.0
stvreumi/electronic-blackboard,chenyang14/electronic-blackboard,SWLBot/electronic-blackboard,SWLBot/electronic-blackboard,Billy4195/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,stvreumi/electronic-blackboard,SWLBot/electronic-blackboard,stvreumi/electronic-blackboard,chenyang14/elec...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
<commit_before>from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = [...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = ['arrange_sn','a...
<commit_before>from arrange_schedule import * def test_read_system_setting(): keys = ['board_py_dir','shutdown','max_db_log','min_db_activity'] system_setting = read_system_setting() for key in keys: assert key in system_setting return system_setting def test_read_arrange_mode(): keys = [...
d855e5626ee639a237467af7f6f57947cd17f9c4
user_messages/views.py
user_messages/views.py
from django.contrib.auth.decorators import login_required from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.models import Thread, Message @login_required def inbox(request, template_name='user_messages/inbox.html'): threads ...
from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.forms import MessageReplyForm f...
Add reply support to threads
Add reply support to threads
Python
mit
pinax/pinax-messages,arthur-wsw/pinax-messages,arthur-wsw/pinax-messages,eldarion/user_messages,pinax/pinax-messages,eldarion/user_messages
from django.contrib.auth.decorators import login_required from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.models import Thread, Message @login_required def inbox(request, template_name='user_messages/inbox.html'): threads ...
from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.forms import MessageReplyForm f...
<commit_before>from django.contrib.auth.decorators import login_required from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.models import Thread, Message @login_required def inbox(request, template_name='user_messages/inbox.html'...
from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.forms import MessageReplyForm f...
from django.contrib.auth.decorators import login_required from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.models import Thread, Message @login_required def inbox(request, template_name='user_messages/inbox.html'): threads ...
<commit_before>from django.contrib.auth.decorators import login_required from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template import RequestContext from user_messages.models import Thread, Message @login_required def inbox(request, template_name='user_messages/inbox.html'...
cc7a5fd3bdf7197f99bd45e4bbcb0b8fe6e5ccd6
md5_checksum.py
md5_checksum.py
# VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=163840): """Return the MD5 checksum (hex digest) of the file""" with open(file_path, "rb") as ...
# VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=4194304): """Return the MD5 checksum (hex digest) of the file""" with open(file_path, "rb") as...
Switch default read size to 4 MiB
Switch default read size to 4 MiB
Python
mit
bbayles/vod_metadata
# VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=163840): """Return the MD5 checksum (hex digest) of the file""" with open(file_path, "rb") as ...
# VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=4194304): """Return the MD5 checksum (hex digest) of the file""" with open(file_path, "rb") as...
<commit_before># VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=163840): """Return the MD5 checksum (hex digest) of the file""" with open(file_...
# VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=4194304): """Return the MD5 checksum (hex digest) of the file""" with open(file_path, "rb") as...
# VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=163840): """Return the MD5 checksum (hex digest) of the file""" with open(file_path, "rb") as ...
<commit_before># VOD metadata file generator - md5_checksum sub-module # Copyright 2013 Bo Bayles (bbayles@gmail.com) # See README for more information # See LICENSE for license import hashlib def md5_checksum(file_path, chunk_bytes=163840): """Return the MD5 checksum (hex digest) of the file""" with open(file_...
c2dbfc7f18dc44747fbb8b14e212cbb4151e8f85
analyze.py
analyze.py
import fore.database analysis = fore.database.get_analysis(2) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis)
import sys import fore.database if len(sys.argv) > 1: track_no = sys.argv[1] else: track_no = 2 analysis = fore.database.get_analysis(track_no) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis)
Send track number as CLI argument.
Send track number as CLI argument.
Python
artistic-2.0
MikeiLL/appension,Rosuav/appension,MikeiLL/appension,MikeiLL/appension,Rosuav/appension,Rosuav/appension,MikeiLL/appension,Rosuav/appension
import fore.database analysis = fore.database.get_analysis(2) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis) Send track number as CLI argument.
import sys import fore.database if len(sys.argv) > 1: track_no = sys.argv[1] else: track_no = 2 analysis = fore.database.get_analysis(track_no) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis)
<commit_before>import fore.database analysis = fore.database.get_analysis(2) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis) <commit_msg>Send track number as CLI argument.<commit_after>
import sys import fore.database if len(sys.argv) > 1: track_no = sys.argv[1] else: track_no = 2 analysis = fore.database.get_analysis(track_no) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis)
import fore.database analysis = fore.database.get_analysis(2) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis) Send track number as CLI argument.import sys import fore.database if len(sys.argv) > 1: track_no = sys.argv[1] else: track_no = 2 analysis = fore.database.get_...
<commit_before>import fore.database analysis = fore.database.get_analysis(2) import pickle, base64 analysis = pickle.loads(base64.b64decode(analysis)) print(analysis) <commit_msg>Send track number as CLI argument.<commit_after>import sys import fore.database if len(sys.argv) > 1: track_no = sys.argv[1] else: t...
a3dd1f1c358ab8be7987f9e93ff4f2c0351ae43e
porick/views.py
porick/views.py
from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): raise NotImplementedError() @app.route(...
from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<int:quote_id>') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): rai...
Add route for individual quote
Add route for individual quote
Python
apache-2.0
stesh/porick-flask,stesh/porick-flask,stesh/porick-flask
from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): raise NotImplementedError() @app.route(...
from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<int:quote_id>') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): rai...
<commit_before>from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): raise NotImplementedError(...
from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<int:quote_id>') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): rai...
from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): raise NotImplementedError() @app.route(...
<commit_before>from flask import render_template, g from porick import app, model @app.route('/') def landing_page(): return render_template('/index.html') @app.route('/browse') @app.route('/browse/<area>') @app.route('/browse/<area>/page/<page>') def browse(area=None, page=None): raise NotImplementedError(...
2046d82addab9ec83dbb85a2d08c727a52065d8b
deckglue/models.py
deckglue/models.py
from django.db import models # Create your models here.
from django.contrib.auth.models import Permission from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from cardbox.card_model import Card from cardbox.deck_model import Deck from guardian.shortcuts import assign_perm, get_users_with_perms from guardian.models import UserOb...
Add signal hooks to create practice objects
Add signal hooks to create practice objects
Python
mit
DummyDivision/Tsune,DummyDivision/Tsune,DummyDivision/Tsune
from django.db import models # Create your models here. Add signal hooks to create practice objects
from django.contrib.auth.models import Permission from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from cardbox.card_model import Card from cardbox.deck_model import Deck from guardian.shortcuts import assign_perm, get_users_with_perms from guardian.models import UserOb...
<commit_before>from django.db import models # Create your models here. <commit_msg>Add signal hooks to create practice objects<commit_after>
from django.contrib.auth.models import Permission from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from cardbox.card_model import Card from cardbox.deck_model import Deck from guardian.shortcuts import assign_perm, get_users_with_perms from guardian.models import UserOb...
from django.db import models # Create your models here. Add signal hooks to create practice objectsfrom django.contrib.auth.models import Permission from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from cardbox.card_model import Card from cardbox.deck_model import Deck fr...
<commit_before>from django.db import models # Create your models here. <commit_msg>Add signal hooks to create practice objects<commit_after>from django.contrib.auth.models import Permission from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from cardbox.card_model import Ca...
76c193f457bb45e8e821594de67da8e15c4352d4
product.py
product.py
from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date def days_left(self): return datetime.now() - self.date
from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date self.passed_phases = set() def days_left(self): return datetime.now() - self.date if __name__ == '__main__': main() def main()...
Add passed_phases to Product and create main function
Add passed_phases to Product and create main function
Python
mit
AliGhahraei/phar-ant-colony
from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date def days_left(self): return datetime.now() - self.date Add passed_phases to Product and create main function
from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date self.passed_phases = set() def days_left(self): return datetime.now() - self.date if __name__ == '__main__': main() def main()...
<commit_before>from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date def days_left(self): return datetime.now() - self.date <commit_msg>Add passed_phases to Product and create main function<commit...
from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date self.passed_phases = set() def days_left(self): return datetime.now() - self.date if __name__ == '__main__': main() def main()...
from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date def days_left(self): return datetime.now() - self.date Add passed_phases to Product and create main functionfrom datetime import datetime cla...
<commit_before>from datetime import datetime class Product(): def __init__(self, cost, name, date): self.cost = cost self.name = name self.date = date def days_left(self): return datetime.now() - self.date <commit_msg>Add passed_phases to Product and create main function<commit...
b6dea08a0a9908d2303693cf4534c7b0beec4154
analyticpi/db.py
analyticpi/db.py
import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], user=ur...
import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], user=ur...
Change from MySQL to SQLite3
Change from MySQL to SQLite3
Python
mit
analyticpi/analyticpi,analyticpi/analyticpi,analyticpi/analyticpi
import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], user=ur...
import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], user=ur...
<commit_before>import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], ...
import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], user=ur...
import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], user=ur...
<commit_before>import os import peewee APP_DIR = os.path.dirname(__file__) try: import urlparse import psycopg2 urlparse.uses_netloc.append('postgres') url = urlparse.urlparse(os.environ["DATABASE_URL"]) database = peewee.PostgresqlDatabase(database=url.path[1:], ...
6a1c699f92f43cbe65bf729352695473474a91ae
astm/__init__.py
astm/__init__.py
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError, NotAccepted, ...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError, NotAccepted, ...
Fix compatibility issue with Python 2.6
Fix compatibility issue with Python 2.6
Python
bsd-3-clause
asingla87/python-astm,kxepal/python-astm,123412345/python-astm,andrexmd/python-astm,MarcosHaenisch/python-astm,eddiep1101/python-astm,briankip/python-astm,pombreda/python-astm,Iskander1b/python-astm,tinoshot/python-astm,mhaulo/python-astm,LogicalKnight/python-astm,AlanZatarain/python-astm,kxepal/python-astm,tectronics/...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError, NotAccepted, ...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError, NotAccepted, ...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError, NotAccepted, ...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError, NotAccepted, ...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from .version import __version__, __version_info__ from .exceptions import BaseASTMError...
a033fdde5a7f8a250865fbeed6f2ff6ce6908420
util/git.py
util/git.py
# -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar-test/' TASK_MOOSTER_PATH = 'task-mooster/'
# -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar/' TASK_MOOSTER_PATH = 'task-mooster/'
Fix path to seminar repository.
Fix path to seminar repository.
Python
mit
fi-ksi/web-backend,fi-ksi/web-backend
# -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar-test/' TASK_MOOSTER_PATH = 'task-mooster/' Fix path to seminar repository.
# -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar/' TASK_MOOSTER_PATH = 'task-mooster/'
<commit_before># -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar-test/' TASK_MOOSTER_PATH = 'task-mooster/' <commit_msg>Fix path to seminar repository.<commit_after>
# -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar/' TASK_MOOSTER_PATH = 'task-mooster/'
# -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar-test/' TASK_MOOSTER_PATH = 'task-mooster/' Fix path to seminar repository.# -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar/' TASK_MOOSTER_PATH = 'task-mooster/'
<commit_before># -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar-test/' TASK_MOOSTER_PATH = 'task-mooster/' <commit_msg>Fix path to seminar repository.<commit_after># -*- coding: utf-8 -*- GIT_SEMINAR_PATH = 'data/seminar/' TASK_MOOSTER_PATH = 'task-mooster/'
aa143e28b61118c0fc3e5d28f2330572213b501c
halaqat/urls.py
halaqat/urls.py
"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
Add students app url configuration
Add students app url configuration
Python
mit
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
<commit_before>"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='h...
"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
<commit_before>"""halaqat URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='h...
b5fb888c5b74cc99008cdc7e226f354d20b71b8c
select_exact.py
select_exact.py
import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() if selections[0].empty(): selections.add(self.view.word(selections[0])) return word = self.view.substr(self....
import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() words_selection = False for selection in selections: if selection.empty(): words_selection = True ...
Fix the issue when use with multiple cursors and scroll the view when selected
Fix the issue when use with multiple cursors and scroll the view when selected
Python
mit
spywhere/SelectExact,spywhere/SelectExact
import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() if selections[0].empty(): selections.add(self.view.word(selections[0])) return word = self.view.substr(self....
import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() words_selection = False for selection in selections: if selection.empty(): words_selection = True ...
<commit_before>import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() if selections[0].empty(): selections.add(self.view.word(selections[0])) return word = self.vi...
import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() words_selection = False for selection in selections: if selection.empty(): words_selection = True ...
import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() if selections[0].empty(): selections.add(self.view.word(selections[0])) return word = self.view.substr(self....
<commit_before>import sublime_plugin class SelectExactMatchCommand(sublime_plugin.TextCommand): last_selection = None def run(self, edit): selections = self.view.sel() if selections[0].empty(): selections.add(self.view.word(selections[0])) return word = self.vi...
082897d8216f3ec2feca8af4afbc0be7401956d5
systemofrecord/__init__.py
systemofrecord/__init__.py
import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__name__) logg...
import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__name__) logg...
Set config logging in init to debug
Set config logging in init to debug
Python
mit
LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha,LandRegistry/system-of-record-alpha
import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__name__) logg...
import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__name__) logg...
<commit_before>import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__n...
import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__name__) logg...
import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__name__) logg...
<commit_before>import os import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry app = Flask(__name__) app.config.from_object(os.environ.get('SETTINGS')) db = SQLAlchemy(app) def configure_logging(obj): logger = logging.getLogger(obj.__class__.__n...
8e45eb77394ad47579f5726e8f2e63794b8e10c5
farnsworth/wsgi.py
farnsworth/wsgi.py
""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
Fix python-path when WSGIPythonPath is not defined
Fix python-path when WSGIPythonPath is not defined
Python
bsd-2-clause
knagra/farnsworth,knagra/farnsworth,knagra/farnsworth,knagra/farnsworth
""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
<commit_before>""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``W...
""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
<commit_before>""" WSGI config for farnsworth project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``W...
b33222fd9d16efa88864d0c1f28cce9d0a8c3f68
fastentrypoints.py
fastentrypoints.py
''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distrib...
''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distrib...
Make sure that .py file is used, even if .pyc got executed
Make sure that .py file is used, even if .pyc got executed If python already byte-compiled the source code to .pyc file, the __file__ points to .pyc, rather than to .py, which breaks the copying mechanism. Use regex substitution to make sure we're always copying the original source file.
Python
bsd-2-clause
ninjaaron/fast-entry_points
''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distrib...
''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distrib...
<commit_before>''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuple...
''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distrib...
''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuples for a distrib...
<commit_before>''' Monkey patch setuptools to write faster console_scripts with this format: from mymodule import entry_function entry_function() This is better. ''' from setuptools.command import easy_install @classmethod def get_args(cls, dist, header=None): """ Yield write_script() argument tuple...
a116c3eae892a73b11372225a9bdf0194db75598
glanerbeard/web.py
glanerbeard/web.py
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None) if not isinst...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None) if not isinst...
Use a template to render json.
Use a template to render json.
Python
apache-2.0
daenney/glanerbeard
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None) if not isinst...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None) if not isinst...
<commit_before>import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None) if not isinst...
import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None) if not isinst...
<commit_before>import logging from flask import ( Flask, render_template, abort ) from glanerbeard.server import Server app = Flask(__name__) app.config.from_object('glanerbeard.default_settings') app.config.from_envvar('GLANERBEARD_SETTINGS') numeric_level = getattr(logging, app.config['LOGLEVEL'].upper(), None...
3551020db091380e24fd64b9553e00c1f92600e7
glitch/__main__.py
glitch/__main__.py
from . import utils # TODO: Override with port=NNNN if specified by environment # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*, gain:"g"=0.0): """Invoke the infinite renderer gain: dB gain (positiv...
from . import utils # TODO: Override with port=NNNN if specified by environment from . import database # Let the database functions register themselves # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*,...
Load up database functions into clize
Load up database functions into clize
Python
artistic-2.0
MikeiLL/appension,MikeiLL/appension,MikeiLL/appension,MikeiLL/appension
from . import utils # TODO: Override with port=NNNN if specified by environment # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*, gain:"g"=0.0): """Invoke the infinite renderer gain: dB gain (positiv...
from . import utils # TODO: Override with port=NNNN if specified by environment from . import database # Let the database functions register themselves # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*,...
<commit_before>from . import utils # TODO: Override with port=NNNN if specified by environment # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*, gain:"g"=0.0): """Invoke the infinite renderer gain: d...
from . import utils # TODO: Override with port=NNNN if specified by environment from . import database # Let the database functions register themselves # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*,...
from . import utils # TODO: Override with port=NNNN if specified by environment # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*, gain:"g"=0.0): """Invoke the infinite renderer gain: dB gain (positiv...
<commit_before>from . import utils # TODO: Override with port=NNNN if specified by environment # Note that these functions lazily import their corresponding modules, # otherwise package startup would take three parts of forever. @utils.cmdline def renderer(*, gain:"g"=0.0): """Invoke the infinite renderer gain: d...
ad0859f2e7b6f659fe964f786277ea2ad3fdf787
src/listener.py
src/listener.py
# -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port self.f...
# -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port self.f...
Add SO_REUSEADDR to socket options
Add SO_REUSEADDR to socket options
Python
mit
TheKysek/MiNode,TheKysek/MiNode
# -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port self.f...
# -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port self.f...
<commit_before># -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port...
# -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port self.f...
# -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port self.f...
<commit_before># -*- coding: utf-8 -*- import logging import socket import threading from connection import Connection import shared class Listener(threading.Thread): def __init__(self, host, port, family=socket.AF_INET): super().__init__(name='Listener') self.host = host self.port = port...
03b07ca359c218b10837c2f1cdf4027474fdd856
windberg_register/admin.py
windberg_register/admin.py
from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") list_per_page = 1000 def club_name(self, obj): return obj.club.name club_name.short_desc...
import codecs from collections import defaultdict from django.http import HttpResponse import unicodecsv from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") ...
Add csv export feature for appointments
Add csv export feature for appointments
Python
bsd-3-clause
janLo/Windberg-web,janLo/Windberg-web
from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") list_per_page = 1000 def club_name(self, obj): return obj.club.name club_name.short_desc...
import codecs from collections import defaultdict from django.http import HttpResponse import unicodecsv from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") ...
<commit_before>from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") list_per_page = 1000 def club_name(self, obj): return obj.club.name club_...
import codecs from collections import defaultdict from django.http import HttpResponse import unicodecsv from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") ...
from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") list_per_page = 1000 def club_name(self, obj): return obj.club.name club_name.short_desc...
<commit_before>from windberg_register import models from django.contrib import admin class StarterAdmin(admin.ModelAdmin): list_display = ("name", "given", "age_group_short", "club_name", "email", "run_list", "comment") list_per_page = 1000 def club_name(self, obj): return obj.club.name club_...
f050d47ae8f835c4da7cdb45e217be77f42f01f5
fabfile.py
fabfile.py
from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task def autotest(): ...
from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task def autotest(): ...
Watch the docs/ dir for changes
fab: Watch the docs/ dir for changes
Python
apache-2.0
felix1m/pyspotify,jodal/pyspotify,kotamat/pyspotify,kotamat/pyspotify,jodal/pyspotify,felix1m/pyspotify,kotamat/pyspotify,mopidy/pyspotify,jodal/pyspotify,mopidy/pyspotify,felix1m/pyspotify
from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task def autotest(): ...
from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task def autotest(): ...
<commit_before>from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task d...
from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task def autotest(): ...
from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task def autotest(): ...
<commit_before>from fabric.api import execute, local, settings, task @task def preprocess_header(): local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true') @task def docs(): local('make -C docs/ html') @task def autodocs(): auto(docs) @task def test(): local('nosetests') @task d...
75dfc329430732159c6fd8735898922ee4d86a86
basic/events/urls.py
basic/events/urls.py
from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/$', vie...
from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d+)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/$', vi...
Support more than one digit for EventTime IDs.
Support more than one digit for EventTime IDs.
Python
bsd-3-clause
sedden/django-basic-apps,sedden/django-basic-apps
from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/$', vie...
from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d+)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/$', vi...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/...
from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d+)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/$', vi...
from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/$', vie...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('basic.events.views', url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/(?P<id>\d)/$', view='event_detail', name='event_detail' ), url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/...
6f770e3da8dda9bc91300e323d386f6a6863c86e
testing/test-cases/selenium-tests/pointClustering/testPointCluster.py
testing/test-cases/selenium-tests/pointClustering/testPointCluster.py
#!/usr/bin/env python from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/index.html') self.w...
#!/usr/bin/env python from time import sleep from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/inde...
Add an explicit sleep in pointClustering test
Add an explicit sleep in pointClustering test
Python
apache-2.0
OpenGeoscience/geojs,OpenGeoscience/geojs,Kitware/geojs,OpenGeoscience/geojs,Kitware/geojs,Kitware/geojs
#!/usr/bin/env python from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/index.html') self.w...
#!/usr/bin/env python from time import sleep from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/inde...
<commit_before>#!/usr/bin/env python from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/index.html')...
#!/usr/bin/env python from time import sleep from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/inde...
#!/usr/bin/env python from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/index.html') self.w...
<commit_before>#!/usr/bin/env python from selenium_test import FirefoxTest, ChromeTest,\ setUpModule, tearDownModule class glPointsBase(object): testCase = ('pointClustering',) testRevision = 4 def loadPage(self): self.resizeWindow(640, 480) self.loadURL('pointClustering/index.html')...
7fbc356ec6896e441f2423bd3168ff231b4a8bb2
roles/openshift_hosted/filter_plugins/filters.py
roles/openshift_hosted/filter_plugins/filters.py
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will return the number...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will return the number...
Fix get_router_replicas infrastructure node count.
Fix get_router_replicas infrastructure node count.
Python
apache-2.0
detiber/openshift-ansible,openshift/openshift-ansible,miminar/openshift-ansible,ttindell2/openshift-ansible,aveshagarwal/openshift-ansible,gburges/openshift-ansible,tagliateller/openshift-ansible,abutcher/openshift-ansible,mmahut/openshift-ansible,zhiwliu/openshift-ansible,zhiwliu/openshift-ansible,EricMountain-1A/open...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will return the number...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will return the number...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will re...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will return the number...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will return the number...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- ''' Custom filters for use in openshift_hosted ''' class FilterModule(object): ''' Custom ansible filters for use by openshift_hosted role''' @staticmethod def get_router_replicas(replicas=None, router_nodes=None): ''' This function will re...
4733055d8eee5e0e3ca3bd47eaa5c776bb62c9a8
tests/test_geodataframe.py
tests/test_geodataframe.py
import unittest import json from geopandas import GeoDataFrame class TestSeries(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( '/nybb_13a/nyb...
import unittest import json import numpy as np from geopandas import GeoDataFrame class TestDataFrame(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( ...
Add test for values of text columns in GeoDataFrame from file
Add test for values of text columns in GeoDataFrame from file
Python
bsd-3-clause
maxalbert/geopandas,fonnesbeck/geopandas,geopandas/geopandas,geopandas/geopandas,scw/geopandas,micahcochran/geopandas,jdmcbr/geopandas,koldunovn/geopandas,jwass/geopandas,snario/geopandas,IamJeffG/geopandas,ozak/geopandas,perrygeo/geopandas,jdmcbr/geopandas,ozak/geopandas,urschrei/geopandas,geopandas/geopandas,jorisvan...
import unittest import json from geopandas import GeoDataFrame class TestSeries(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( '/nybb_13a/nyb...
import unittest import json import numpy as np from geopandas import GeoDataFrame class TestDataFrame(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( ...
<commit_before>import unittest import json from geopandas import GeoDataFrame class TestSeries(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( ...
import unittest import json import numpy as np from geopandas import GeoDataFrame class TestDataFrame(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( ...
import unittest import json from geopandas import GeoDataFrame class TestSeries(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( '/nybb_13a/nyb...
<commit_before>import unittest import json from geopandas import GeoDataFrame class TestSeries(unittest.TestCase): def setUp(self): # Data from http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip # saved as geopandas/examples/nybb_13a.zip. self.df = GeoDataFrame.from_file( ...
a581d057366d8b4ae94754e18ef02e4ec59e3c05
gensysinfo.py
gensysinfo.py
#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "green" elif fi...
#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "green" elif fi...
Use cpu_percent instead of getloadavg
Use cpu_percent instead of getloadavg This is functionally similar and available in older versions of psutil
Python
mit
wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar
#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "green" elif fi...
#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "green" elif fi...
<commit_before>#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "gre...
#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "green" elif fi...
#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "green" elif fi...
<commit_before>#!/usr/bin/env python import psutil import os import time def create_bar(filled): low = '.' high = '|' if filled > 1: low = str(int(filled)) high = str(int(filled + 1)) filled = filled - int(filled) filled = int(filled * 10) if filled < 5: color = "gre...
97d1dd6b14cff5196ccd2e2efad8a0aba5bf240b
tests/test_money.py
tests/test_money.py
from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) class MoneyMakerTest(TestCase): def test_create_new_mone...
# -*- coding: utf-8 from __future__ import unicode_literals from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) ...
Add a test for AbstractMoney.__unicode__
Add a test for AbstractMoney.__unicode__
Python
bsd-3-clause
nimbis/django-shop,jrief/django-shop,awesto/django-shop,rfleschenberg/django-shop,jrief/django-shop,nimbis/django-shop,jrief/django-shop,awesto/django-shop,khchine5/django-shop,rfleschenberg/django-shop,jrief/django-shop,divio/django-shop,divio/django-shop,rfleschenberg/django-shop,nimbis/django-shop,khchine5/django-sh...
from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) class MoneyMakerTest(TestCase): def test_create_new_mone...
# -*- coding: utf-8 from __future__ import unicode_literals from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) ...
<commit_before>from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) class MoneyMakerTest(TestCase): def test_...
# -*- coding: utf-8 from __future__ import unicode_literals from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) ...
from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) class MoneyMakerTest(TestCase): def test_create_new_mone...
<commit_before>from decimal import Decimal from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(TypeError, lambda: AbstractMoney(1)) class MoneyMakerTest(TestCase): def test_...
913d06c323f188d7647d342257ab2c0eb153d879
tests/test_scale.py
tests/test_scale.py
from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """Test that Vecto...
from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """Test that Vecto...
Simplify length & alignment tests
tests/scale: Simplify length & alignment tests
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """Test that Vecto...
from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """Test that Vecto...
<commit_before>from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """...
from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """Test that Vecto...
from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """Test that Vecto...
<commit_before>from hypothesis import assume, given, strategies as st from pytest import raises # type: ignore from ppb_vector import Vector from utils import angle_isclose, isclose, lengths, vectors @given(v=vectors(), length=st.floats(max_value=0)) def test_scale_negative_length(v: Vector, length: float): """...
b19568c85458ac04b902dc03010e2d50177477e1
tests/test_utils.py
tests/test_utils.py
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
Add a start and end method to MockRequest
Add a start and end method to MockRequest
Python
apache-2.0
MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging,MatthewWilkes/mw4068-packaging
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
<commit_before>#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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 require...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
<commit_before>#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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 require...
2ed0f0e9f875722d2ae21d595701d37646b74885
tingbot/__init__.py
tingbot/__init__.py
from . import platform_specific, input from .graphics import screen, Surface, Image from .run_loop import main_run_loop, every from .input import touch from .button import press from .web import webhook platform_specific.fixup_env() def run(loop=None): if loop is not None: every(seconds=1.0/30)(loop) ...
try: import pygame except ImportError: print 'Failed to import pygame' print '-----------------------' print '' print 'tingbot-python requires pygame. Please download and install pygame 1.9.1' print 'or later from http://www.pygame.org/download.shtml' print '' print "If you're using a vi...
Add import-time check for pygame (since we can't install automatically)
Add import-time check for pygame (since we can't install automatically)
Python
bsd-2-clause
furbrain/tingbot-python
from . import platform_specific, input from .graphics import screen, Surface, Image from .run_loop import main_run_loop, every from .input import touch from .button import press from .web import webhook platform_specific.fixup_env() def run(loop=None): if loop is not None: every(seconds=1.0/30)(loop) ...
try: import pygame except ImportError: print 'Failed to import pygame' print '-----------------------' print '' print 'tingbot-python requires pygame. Please download and install pygame 1.9.1' print 'or later from http://www.pygame.org/download.shtml' print '' print "If you're using a vi...
<commit_before>from . import platform_specific, input from .graphics import screen, Surface, Image from .run_loop import main_run_loop, every from .input import touch from .button import press from .web import webhook platform_specific.fixup_env() def run(loop=None): if loop is not None: every(seconds=1...
try: import pygame except ImportError: print 'Failed to import pygame' print '-----------------------' print '' print 'tingbot-python requires pygame. Please download and install pygame 1.9.1' print 'or later from http://www.pygame.org/download.shtml' print '' print "If you're using a vi...
from . import platform_specific, input from .graphics import screen, Surface, Image from .run_loop import main_run_loop, every from .input import touch from .button import press from .web import webhook platform_specific.fixup_env() def run(loop=None): if loop is not None: every(seconds=1.0/30)(loop) ...
<commit_before>from . import platform_specific, input from .graphics import screen, Surface, Image from .run_loop import main_run_loop, every from .input import touch from .button import press from .web import webhook platform_specific.fixup_env() def run(loop=None): if loop is not None: every(seconds=1...
8f96a89e14bfcb8ed66e0e276966df609b7651c1
barsystem/setup.py
barsystem/setup.py
from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ] }, ...
from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ] }, ...
Move some requirements to extras.
Move some requirements to extras.
Python
mit
TkkrLab/barsystem,TkkrLab/barsystem,TkkrLab/barsystem
from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ] }, ...
from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ] }, ...
<commit_before>from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ...
from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ] }, ...
from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ] }, ...
<commit_before>from setuptools import setup, find_packages setup( name='barsystem', version='1.0.0', packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, entry_points={ 'console_scripts': [ 'barsystem-installer = barsystem.install:main' ...
91c6c7b8e8077a185e8a62af0c3bcb74d4026e7c
tests/search.py
tests/search.py
import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) self.assertIsInstance(sear...
import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) for v in search: ...
Check every result in Search test
Check every result in Search test
Python
mit
authmillenon/pycomicvine
import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) self.assertIsInstance(sear...
import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) for v in search: ...
<commit_before>import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) self.assert...
import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) for v in search: ...
import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) self.assertIsInstance(sear...
<commit_before>import pycomicvine import unittest api_key = "476302e62d7e8f8f140182e36aebff2fe935514b" class TestSearch(unittest.TestCase): def test_search_resource_type(self): search = pycomicvine.Search( resources="volume", query="Angel" ) self.assert...
709d6c530296fe9e0b03ad5ed28facd7c69b93fa
importjson.py
importjson.py
import json import pprint import os with open('json/test.json') as json_data: d = json.load(json_data) # print(d) # pprint.pprint(d) for stat_categories in d["divisionteamstandings"]["division"][0]["teamentry"][0]["stats"]: pprint.pprint(stat_categories)
import json import pprint import os #Open the JSON file that includes headers with open('json/20160927-division-team-standings.json') as file: alltext = file.readlines() #Put each line into a list for lines in alltext: if lines.startswith('{'): rawdata = lines data = json.loads(rawdata) ...
Create JSON importer from raw JSON file including web headers and pretty print all of the stat categories for one file
Create JSON importer from raw JSON file including web headers and pretty print all of the stat categories for one file
Python
mit
prcutler/nflpool,prcutler/nflpool
import json import pprint import os with open('json/test.json') as json_data: d = json.load(json_data) # print(d) # pprint.pprint(d) for stat_categories in d["divisionteamstandings"]["division"][0]["teamentry"][0]["stats"]: pprint.pprint(stat_categories) Create JSON importer from raw JSON file i...
import json import pprint import os #Open the JSON file that includes headers with open('json/20160927-division-team-standings.json') as file: alltext = file.readlines() #Put each line into a list for lines in alltext: if lines.startswith('{'): rawdata = lines data = json.loads(rawdata) ...
<commit_before>import json import pprint import os with open('json/test.json') as json_data: d = json.load(json_data) # print(d) # pprint.pprint(d) for stat_categories in d["divisionteamstandings"]["division"][0]["teamentry"][0]["stats"]: pprint.pprint(stat_categories) <commit_msg>Create JSON im...
import json import pprint import os #Open the JSON file that includes headers with open('json/20160927-division-team-standings.json') as file: alltext = file.readlines() #Put each line into a list for lines in alltext: if lines.startswith('{'): rawdata = lines data = json.loads(rawdata) ...
import json import pprint import os with open('json/test.json') as json_data: d = json.load(json_data) # print(d) # pprint.pprint(d) for stat_categories in d["divisionteamstandings"]["division"][0]["teamentry"][0]["stats"]: pprint.pprint(stat_categories) Create JSON importer from raw JSON file i...
<commit_before>import json import pprint import os with open('json/test.json') as json_data: d = json.load(json_data) # print(d) # pprint.pprint(d) for stat_categories in d["divisionteamstandings"]["division"][0]["teamentry"][0]["stats"]: pprint.pprint(stat_categories) <commit_msg>Create JSON im...
7faa73b5046fb87099d955705c4f00c5240f3544
running.py
running.py
import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') pri...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
Call Darksky API with TCX run time Use simpler GET request to Darksky API rather than a third party Python wrapper
Call Darksky API with TCX run time Use simpler GET request to Darksky API rather than a third party Python wrapper
Python
mit
briansuhr/slowburn
import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') pri...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
<commit_before>import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Run...
import tcxparser from configparser import ConfigParser from datetime import datetime import urllib.request import dateutil.parser t = '1984-06-02T19:05:00.000Z' # Darksky weather API # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky...
import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') pri...
<commit_before>import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Run...
19fb86f8b3a2307489f926d9d5d78bd84c6b05a1
Sketches/MH/TimerMixIn.py
Sketches/MH/TimerMixIn.py
#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self, secs): ...
#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self, secs): ...
Handle situation if timer is already running.
Handle situation if timer is already running.
Python
apache-2.0
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self, secs): ...
#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self, secs): ...
<commit_before>#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self,...
#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self, secs): ...
#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self, secs): ...
<commit_before>#!/usr/bin/env python from Axon.Component import component from threading import Timer class TimerMixIn(object): def __init__(self, *argl, **argd): super(TimerMixIn,self).__init__(*argl,**argd) self.timer = None self.timerSuccess = True def startTimer(self,...
2df886059a9edd8d75fdb255fc185c2f96a02c29
user/signals.py
user/signals.py
import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) # MAke user organizer if fits regex @receiver(post_save, sen...
import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) DEV_EMAILS = getattr(settings, 'HACKATHON_DEV_EMAILS', None) ...
Make developers an admin on registration
Make developers an admin on registration
Python
mit
hackupc/backend,hackupc/backend,hackupc/backend,hackupc/backend
import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) # MAke user organizer if fits regex @receiver(post_save, sen...
import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) DEV_EMAILS = getattr(settings, 'HACKATHON_DEV_EMAILS', None) ...
<commit_before>import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) # MAke user organizer if fits regex @receiver...
import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) DEV_EMAILS = getattr(settings, 'HACKATHON_DEV_EMAILS', None) ...
import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) # MAke user organizer if fits regex @receiver(post_save, sen...
<commit_before>import re from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from user import tokens from user.models import User REGEX_PATTERN = getattr(settings, 'REGEX_HACKATHON_ORGANIZER_EMAIL', None) # MAke user organizer if fits regex @receiver...
87b3d17bcee42630ec502475e67d5f58cee4f577
cafe/utilities.py
cafe/utilities.py
from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(arg, list): retu...
from os import getenv from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(ar...
Add function to resolve settings from multiple sources
Add function to resolve settings from multiple sources utilities.resolve_setting() takes values for a setting from multiple sources and picks the appropriate value in order of source priority.
Python
apache-2.0
abn/python-cafe
from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(arg, list): retu...
from os import getenv from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(ar...
<commit_before>from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(arg, list...
from os import getenv from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(ar...
from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(arg, list): retu...
<commit_before>from six import string_types def listify(arg): """ Simple utility method to ensure an argument provided is a list. If the provider argument is not an instance of `list`, then we return [arg], else arg is returned. :type arg: list :rtype: list """ if not isinstance(arg, list...
c11152dc83416efb33bd4c8286633a311430c0f6
mpsort/__init__.py
mpsort/__init__.py
from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must be Python 2 ...
from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must be Python 2 ...
Fix out place mismatched out array size.
Fix out place mismatched out array size.
Python
bsd-2-clause
rainwoodman/MP-sort,rainwoodman/MP-sort,rainwoodman/MP-sort
from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must be Python 2 ...
from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must be Python 2 ...
<commit_before>from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must ...
from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must be Python 2 ...
from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must be Python 2 ...
<commit_before>from .binding import sort as _sort import numpy from numpy.lib.recfunctions import append_fields try: unicode = unicode except NameError: # 'unicode' is undefined, must be Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' exists, must ...
95186f684328d5b84611f405d47d474c53cad619
cat.py
cat.py
import io import aiohttp from discord.ext import commands import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') self.url = 'http://thecatapi.com/api/images...
import io import aiohttp import discord from discord.ext import commands from lxml import etree import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') sel...
Send image in embed because aiohttp doesn't know how to parse links
Send image in embed because aiohttp doesn't know how to parse links
Python
mit
BeatButton/beattie,BeatButton/beattie-bot
import io import aiohttp from discord.ext import commands import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') self.url = 'http://thecatapi.com/api/images...
import io import aiohttp import discord from discord.ext import commands from lxml import etree import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') sel...
<commit_before>import io import aiohttp from discord.ext import commands import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') self.url = 'http://thecatapi...
import io import aiohttp import discord from discord.ext import commands from lxml import etree import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') sel...
import io import aiohttp from discord.ext import commands import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') self.url = 'http://thecatapi.com/api/images...
<commit_before>import io import aiohttp from discord.ext import commands import yaml class Cat: def __init__(self, bot): self.bot = bot with open('config.yaml') as file: data = yaml.load(file) self.key = data.get('cat_key', '') self.url = 'http://thecatapi...
2ec1975da12cb9d95b1e1db7820f30850e075e4e
running.py
running.py
import tcxparser tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') print(tcx.duration)
import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') pri...
Add sample Darksky API call
Add sample Darksky API call
Python
mit
briansuhr/slowburn
import tcxparser tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') print(tcx.duration) Add sample Darksky API call
import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') pri...
<commit_before>import tcxparser tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') print(tcx.duration) <commit_msg>Add sample Darksky API call<commit_after>
import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', encoding='utf-8') darksky_key = parser.get('darksky', 'key') tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') pri...
import tcxparser tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') print(tcx.duration) Add sample Darksky API callimport tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigParser() parser.read('slowburn.config', en...
<commit_before>import tcxparser tcx = tcxparser.TCXParser('gps_logs/2017-06-15_Running.tcx') print(tcx.duration) <commit_msg>Add sample Darksky API call<commit_after>import tcxparser from darksky import forecast from configparser import ConfigParser # Darksky weather API. # Create config file manually parser = ConfigP...
4d1444e2f2a455e691342a82f0e116e210593411
s01/c01.py
s01/c01.py
"""Set 01 - Challenge 01.""" import base64 hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = b'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex string into a bas...
"""Set 01 - Challenge 01.""" import binascii hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = 'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex string into a b...
Revert "Updated function to work on bytes rather than binascii functions."
Revert "Updated function to work on bytes rather than binascii functions." This reverts commit 25176b64aed599059e4b552fbd76c5f4bc28434e.
Python
mit
sornars/matasano-challenges-py
"""Set 01 - Challenge 01.""" import base64 hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = b'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex string into a bas...
"""Set 01 - Challenge 01.""" import binascii hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = 'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex string into a b...
<commit_before>"""Set 01 - Challenge 01.""" import base64 hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = b'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex st...
"""Set 01 - Challenge 01.""" import binascii hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = 'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex string into a b...
"""Set 01 - Challenge 01.""" import base64 hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = b'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex string into a bas...
<commit_before>"""Set 01 - Challenge 01.""" import base64 hex_string = ('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f' '69736f6e6f7573206d757368726f6f6d') b64_string = b'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t' def hex2b64(hex_string): """Convert a hex st...
3d414a7bc4b5e6c6c2b1ec8f44b69bab537fd50d
wsgi_general.py
wsgi_general.py
import DQXUtils def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return DQXUtils.LogServer('404:' + environ['PATH_I...
import DQXUtils import DQXDbTools def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return with DQXDbTools.DBCursor()...
Allow URLS to have dataset names in
Allow URLS to have dataset names in
Python
agpl-3.0
cggh/DQXServer
import DQXUtils def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return DQXUtils.LogServer('404:' + environ['PATH_I...
import DQXUtils import DQXDbTools def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return with DQXDbTools.DBCursor()...
<commit_before>import DQXUtils def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return DQXUtils.LogServer('404:' + ...
import DQXUtils import DQXDbTools def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return with DQXDbTools.DBCursor()...
import DQXUtils def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return DQXUtils.LogServer('404:' + environ['PATH_I...
<commit_before>import DQXUtils def application(environ, start_response): #For the root we do a relative redirect to index.html, hoping the app has one if environ['PATH_INFO'] == '/': start_response('301 Moved Permanently', [('Location', 'index.html'),]) return DQXUtils.LogServer('404:' + ...
acdcb3d01dea2af0dc94c22ee5f40304da8d462a
src/pycrunchbase/resource/investment.py
src/pycrunchbase/resource/investment.py
import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_invested_usd', ...
import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_invested_usd', ...
Add new relationship to Investment resource
Add new relationship to Investment resource
Python
mit
ngzhian/pycrunchbase,SidSachdev/pycrunchbase,alabid/pycrunchbase
import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_invested_usd', ...
import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_invested_usd', ...
<commit_before>import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_in...
import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_invested_usd', ...
import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_invested_usd', ...
<commit_before>import six from .node import Node @six.python_2_unicode_compatible class Investment(Node): """Represents a Investment (investor-investment) on CrunchBase""" KNOWN_PROPERTIES = [ 'type', 'uuid', 'money_invested', 'money_invested_currency_code', 'money_in...
ef495fe29566f575dcb18d5edf0e0301af095aee
survey/tests/views/test_confirm_view.py
survey/tests/views/test_confirm_view.py
# -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses = Response.objec...
# -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses = Response.objec...
Fix W1505: Using deprecated method assertEquals()
Fix W1505: Using deprecated method assertEquals()
Python
agpl-3.0
Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey
# -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses = Response.objec...
# -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses = Response.objec...
<commit_before># -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses =...
# -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses = Response.objec...
# -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses = Response.objec...
<commit_before># -*- coding: utf-8 -*- from django.urls.base import reverse from survey.models import Response, Survey from survey.tests.base_test import BaseTest class TestConfirmView(BaseTest): def get_first_response(self, survey_name): survey = Survey.objects.get(name=survey_name) responses =...
ed0551007c2f7bac2639aad8ced0b084d26efcb4
src/utils.py
src/utils.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta('WithABCMeta', (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _disposed = False ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta(str('WithABCMeta'), (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _disposed = Fa...
Fix minor bug for Python 2.x
Fix minor bug for Python 2.x
Python
mit
jstasiak/python-cg,jstasiak/python-cg
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta('WithABCMeta', (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _disposed = False ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta(str('WithABCMeta'), (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _disposed = Fa...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta('WithABCMeta', (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _dis...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta(str('WithABCMeta'), (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _disposed = Fa...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta('WithABCMeta', (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _disposed = False ...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod WithABCMeta = ABCMeta('WithABCMeta', (object,), {}) class Disposable(WithABCMeta): ''' Exposes method to release resources held by the class. ''' _dis...
1072e6225a49f409b2b20b000ccdc6f70f0c45e8
spotify.py
spotify.py
import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central') now = datetim...
import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central') now = datetim...
Debug song of the week
Debug song of the week
Python
mit
Boijangle/GroupMe-Message-Bot
import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central') now = datetim...
import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central') now = datetim...
<commit_before>import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central'...
import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central') now = datetim...
import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central') now = datetim...
<commit_before>import sys import random from pytz import timezone from datetime import datetime import pytz from libs import post_text import spotipy import os from spotipy.oauth2 import SpotifyClientCredentials ''' sadness_texts = [line.strip() for line in open('list of saddness.txt')] central = timezone('US/Central'...
498552599753f07d179025b5de1e8207ec2b94cd
test/unit/util/test_multipart_stream.py
test/unit/util/test_multipart_stream.py
# coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest.fixture(params=...
# coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest.fixture(params=...
Disable redefined outer name pylint warning.
Disable redefined outer name pylint warning.
Python
apache-2.0
Frencil/box-python-sdk,Frencil/box-python-sdk,box/box-python-sdk
# coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest.fixture(params=...
# coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest.fixture(params=...
<commit_before># coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest....
# coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest.fixture(params=...
# coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest.fixture(params=...
<commit_before># coding: utf-8 from __future__ import unicode_literals, absolute_import import pytest from boxsdk.util.multipart_stream import MultipartStream @pytest.fixture(params=({}, {'data_1': b'data_1_value', 'data_2': b'data_2_value'})) def multipart_stream_data(request): return request.param @pytest....
79996420e775994b53d88f5b7c9ad21106a77831
examples/tests/test_examples.py
examples/tests/test_examples.py
import pytest from examples.gbest_pso import main as gbest from examples.lbest_pso import main as lbest from examples.gc_pso import main as gc from examples.pso_optimizer import main as pso_optimizer @pytest.mark.parametrize("dimension", [ 1, 30 ]) @pytest.mark.parametrize("iterations", [ 3 ]) def test_g...
# Copyright 2016 Andrich van Wyk # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Add license header and file documentation
Add license header and file documentation
Python
apache-2.0
avanwyk/cipy
import pytest from examples.gbest_pso import main as gbest from examples.lbest_pso import main as lbest from examples.gc_pso import main as gc from examples.pso_optimizer import main as pso_optimizer @pytest.mark.parametrize("dimension", [ 1, 30 ]) @pytest.mark.parametrize("iterations", [ 3 ]) def test_g...
# Copyright 2016 Andrich van Wyk # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before>import pytest from examples.gbest_pso import main as gbest from examples.lbest_pso import main as lbest from examples.gc_pso import main as gc from examples.pso_optimizer import main as pso_optimizer @pytest.mark.parametrize("dimension", [ 1, 30 ]) @pytest.mark.parametrize("iterations", [ ...
# Copyright 2016 Andrich van Wyk # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import pytest from examples.gbest_pso import main as gbest from examples.lbest_pso import main as lbest from examples.gc_pso import main as gc from examples.pso_optimizer import main as pso_optimizer @pytest.mark.parametrize("dimension", [ 1, 30 ]) @pytest.mark.parametrize("iterations", [ 3 ]) def test_g...
<commit_before>import pytest from examples.gbest_pso import main as gbest from examples.lbest_pso import main as lbest from examples.gc_pso import main as gc from examples.pso_optimizer import main as pso_optimizer @pytest.mark.parametrize("dimension", [ 1, 30 ]) @pytest.mark.parametrize("iterations", [ ...
8e61726b178c5175347008b9b77032fd223b6114
elections_r_us/security.py
elections_r_us/security.py
from models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.add(User( ...
from .models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.add(User( ...
Move query assignment out of try block
Move query assignment out of try block make import relative
Python
mit
Elections-R-Us/Elections-R-Us,Elections-R-Us/Elections-R-Us,Elections-R-Us/Elections-R-Us,Elections-R-Us/Elections-R-Us
from models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.add(User( ...
from .models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.add(User( ...
<commit_before>from models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.a...
from .models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.add(User( ...
from models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.add(User( ...
<commit_before>from models import User from passlib.apps import custom_app_context as pwd_context def create_user(session, username, password): """Add a new user to the database. session is expected to be a dbsession, username and password are expected to be (unencrypted) unicode strings.""" session.a...
7bde0ba157431311ae138acd8a2018f85d8af91d
test_data.py
test_data.py
def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **kwargs ): pa...
def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **kwargs ): pa...
Add a test for functions with keyword only arguments
Add a test for functions with keyword only arguments This adds a test to ensure that no error is raised if a trailing comma is missing from a function definition that has keyword only arguments. Reviewed-by: Jakub Stasiak <1d3764b91b902f6b45836e2498da81fe35caf6d6@stasiak.at>
Python
mit
smarkets/flake8-strict
def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **kwargs ): pa...
def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **kwargs ): pa...
<commit_before>def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **k...
def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **kwargs ): pa...
def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **kwargs ): pa...
<commit_before>def f1(a, # S100 b): # S101 pass def f2( a, b # S101 ): pass def f3( a, b, ): pass # trailing comma after *args or **kwargs is a syntax error therefore # we don't want to enforce it such situations def f4( a, *args ): pass def f5( b, **k...
176c98dd7fec26980591a9ba3bb71bee1eeab8a7
backend/fureon/components/mixins.py
backend/fureon/components/mixins.py
import threading class SingletonMixin(object): __singleton_lock = threading.Lock() __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_instance: with cls.__singleton_lock: if not cls.__singleton_instance: ...
import threading class SingletonMixin(object): __singleton_lock = None __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_lock: cls.__singleton_lock = threading.Lock() if not cls.__singleton_instance: with cls._...
Change singletons to instantiate locks per-class
Change singletons to instantiate locks per-class Before it was creating one for any singleton object, resulting in Bad Things (infinite lock) happening when one singleton object instantiates another singleton object in its instantiation. (I hope that made sense...)
Python
apache-2.0
ATRAN2/fureon
import threading class SingletonMixin(object): __singleton_lock = threading.Lock() __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_instance: with cls.__singleton_lock: if not cls.__singleton_instance: ...
import threading class SingletonMixin(object): __singleton_lock = None __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_lock: cls.__singleton_lock = threading.Lock() if not cls.__singleton_instance: with cls._...
<commit_before>import threading class SingletonMixin(object): __singleton_lock = threading.Lock() __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_instance: with cls.__singleton_lock: if not cls.__singleton_instanc...
import threading class SingletonMixin(object): __singleton_lock = None __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_lock: cls.__singleton_lock = threading.Lock() if not cls.__singleton_instance: with cls._...
import threading class SingletonMixin(object): __singleton_lock = threading.Lock() __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_instance: with cls.__singleton_lock: if not cls.__singleton_instance: ...
<commit_before>import threading class SingletonMixin(object): __singleton_lock = threading.Lock() __singleton_instance = None @classmethod def instance(cls, *args, **kwargs): if not cls.__singleton_instance: with cls.__singleton_lock: if not cls.__singleton_instanc...
b141956f915a2b3e87e1c85949f6bddccf62c57c
okpub/client.py
okpub/client.py
# Copyright (c) 2015, Stavros Sachtouris # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions ...
Create KeyAPI class + method to construct endpoint
Create KeyAPI class + method to construct endpoint
Python
bsd-2-clause
saxtouri/okpub
Create KeyAPI class + method to construct endpoint
# Copyright (c) 2015, Stavros Sachtouris # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions ...
<commit_before><commit_msg>Create KeyAPI class + method to construct endpoint<commit_after>
# Copyright (c) 2015, Stavros Sachtouris # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions ...
Create KeyAPI class + method to construct endpoint# Copyright (c) 2015, Stavros Sachtouris # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the ab...
<commit_before><commit_msg>Create KeyAPI class + method to construct endpoint<commit_after># Copyright (c) 2015, Stavros Sachtouris # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistri...
77f820fe1286a5d39f2704c3821251bcbe20a2ba
indra/tests/test_rlimsp.py
indra/tests/test_rlimsp.py
from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) def test_ungrounded_usage(): rp = rlimsp.process_pmc('PMC3717945', with_grounding=False) assert len(rp.statements) == 33, len(rp.statements)
from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) for s in stmts: assert len(s.evidence) == 1, "Wrong amount of evidence." ev = s.evidence[0] assert ev.annotations, "Missing a...
Make basic test more particular.
Make basic test more particular.
Python
bsd-2-clause
sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,johnbachman/belpy,sorgerlab/indra,bgyori/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,johnbachman/indra
from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) def test_ungrounded_usage(): rp = rlimsp.process_pmc('PMC3717945', with_grounding=False) assert len(rp.statements) == 33, len(rp.statements) Ma...
from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) for s in stmts: assert len(s.evidence) == 1, "Wrong amount of evidence." ev = s.evidence[0] assert ev.annotations, "Missing a...
<commit_before>from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) def test_ungrounded_usage(): rp = rlimsp.process_pmc('PMC3717945', with_grounding=False) assert len(rp.statements) == 33, len(rp...
from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) for s in stmts: assert len(s.evidence) == 1, "Wrong amount of evidence." ev = s.evidence[0] assert ev.annotations, "Missing a...
from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) def test_ungrounded_usage(): rp = rlimsp.process_pmc('PMC3717945', with_grounding=False) assert len(rp.statements) == 33, len(rp.statements) Ma...
<commit_before>from indra.sources import rlimsp def test_simple_usage(): rp = rlimsp.process_pmc('PMC3717945') stmts = rp.statements assert len(stmts) == 6, len(stmts) def test_ungrounded_usage(): rp = rlimsp.process_pmc('PMC3717945', with_grounding=False) assert len(rp.statements) == 33, len(rp...
8d93b696700459db7772e1a3f3ae3601af5417d3
rust_sorting.py
rust_sorting.py
#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort(array): ru...
#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort(array): #...
Call the proper quicksort version depending on type.
Call the proper quicksort version depending on type.
Python
bsd-3-clause
nbigaouette/rust-sorting,nbigaouette/rust-sorting,nbigaouette/rust-sorting
#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort(array): ru...
#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort(array): #...
<commit_before>#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort...
#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort(array): #...
#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort(array): ru...
<commit_before>#!/usr/bin/env python3 import ctypes import os import glob import numpy as np # Load the Rust library when loading this module target = "debug" # target = "release" libpath = os.path.join("target", target, "libsorting.*") libfile = glob.glob(libpath)[0] rustlib = ctypes.CDLL(libfile) def quicksort...
adc8e9fd9a6e0960038e51e03bc3c211de283a39
python/setup.py
python/setup.py
from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packages=find_package...
from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packages=find_package...
Add futures as a dependency.
Add futures as a dependency.
Python
mit
vanloswang/tchannel,sasa233/tchannel,benfleis/tchannel,hustxiaoc/tchannel,savaki/tchannel,RyanTech/tchannel,Zirpon/tchannel,RyanTech/tchannel,i/tchannel,chenwenbin928/tchannel,i/tchannel,vanloswang/tchannel,sasa233/tchannel,bunnyblue/tchannel,Zirpon/tchannel,i/tchannel,benfleis/tchannel,benfleis/tchannel,chenwenbin928/...
from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packages=find_package...
from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packages=find_package...
<commit_before>from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packag...
from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packages=find_package...
from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packages=find_package...
<commit_before>from setuptools import find_packages, setup setup( name='tchannel', version='0.1.0+dev0', author='Aiden Scandella', author_email='dev@uber.com', description='Network multiplexing and framing protocol for RPC', license='MIT', url='https://github.com/uber/tchannel', packag...
f6cd6b3377769af524377979438b9e662bb9175a
tangled/site/model/base.py
tangled/site/model/base.py
import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__(cls): ...
from datetime import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__(...
Update updated time on update
Update updated time on update I.e., added onupdate=datetime.now to TimestampMixin.updated_at so that it will be automatically updated whenever a record is edited.
Python
mit
TangledWeb/tangled.site
import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__(cls): ...
from datetime import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__(...
<commit_before>import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__...
from datetime import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__(...
import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__(cls): ...
<commit_before>import datetime from sqlalchemy.schema import Column from sqlalchemy.types import DateTime, Integer from sqlalchemy.ext.declarative import declarative_base, declared_attr Base = declarative_base() class BaseMixin: id = Column(Integer, primary_key=True) @declared_attr def __tablename__...
38f3fb09857a4babbd893f546f39c60ce4865fb1
lib/main/tests/__init__.py
lib/main/tests/__init__.py
# (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
# (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
Fix import error for missing file.
Fix import error for missing file.
Python
apache-2.0
snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,snahelou/awx
# (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
# (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
<commit_before># (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
# (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
# (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
<commit_before># (c) 2013, AnsibleWorks # # This file is part of Ansible Commander # # Ansible Commander is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
4518263958a9985a7b9b2018264ee0c42479fd10
src/tempel/urls.py
src/tempel/urls.py
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), (r'^(...
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), url(r...
Add names to each url
Add names to each url
Python
agpl-3.0
fajran/tempel
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), (r'^(...
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), url(r...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.ur...
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), url(r...
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), (r'^(...
<commit_before>from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.ur...
b3c2e4636b3f271eeba2e9a7c11f491ed7d77f71
attributes/community/main.py
attributes/community/main.py
import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM projects ...
import sys from lib.core import Tokenizer from lib.utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM project...
Update community to use new lib namespace
Update community to use new lib namespace
Python
apache-2.0
RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper
import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM projects ...
import sys from lib.core import Tokenizer from lib.utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM project...
<commit_before>import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM ...
import sys from lib.core import Tokenizer from lib.utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM project...
import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM projects ...
<commit_before>import sys from core import Tokenizer from utilities import url_to_json def run(project_id, repo_path, cursor, **options): t_sub = options.get('sub') t_star = options.get('star') t_forks = options.get('forks') cursor.execute(''' SELECT url FROM ...
dc2ed8e733d0497e1812ee31b61279083ef1861f
backend/breach/tests/base.py
backend/breach/tests/base.py
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
Add balance checking test samplesets
Add balance checking test samplesets
Python
mit
dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,d...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ...
e6ee77f88ab0d05b221b5470d2c649d3d242f505
hecate/core/__init__.py
hecate/core/__init__.py
from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder, ) from hecate...
from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder, StaticBorder,...
Add StaticBorder to public API
Add StaticBorder to public API
Python
mit
a5kin/hecate,a5kin/hecate
from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder, ) from hecate...
from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder, StaticBorder,...
<commit_before>from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder...
from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder, StaticBorder,...
from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder, ) from hecate...
<commit_before>from hecate.core.base import CellularAutomaton from hecate.core.properties import ( IntegerProperty, ) from hecate.core.topology.lattice import ( OrthogonalLattice, ) from hecate.core.topology.neighborhood import ( MooreNeighborhood, ) from hecate.core.topology.border import ( TorusBorder...
f5d3fb307bb17bc6651fe32ea2f520e7b87d37ca
utility.py
utility.py
#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ import endpoints f...
#!/usr/bin/env python """ Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ import endpoints from google.appengine.ext import ndb def get_by_urlsafe(urlsafe, model): """Returns an ndb.Model entity that the urlsafe key points to. ...
Remove copyright to code not written by bquach.
Doc: Remove copyright to code not written by bquach.
Python
mit
brianquach/udacity-nano-fullstack-game
#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ import endpoints f...
#!/usr/bin/env python """ Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ import endpoints from google.appengine.ext import ndb def get_by_urlsafe(urlsafe, model): """Returns an ndb.Model entity that the urlsafe key points to. ...
<commit_before>#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ impo...
#!/usr/bin/env python """ Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ import endpoints from google.appengine.ext import ndb def get_by_urlsafe(urlsafe, model): """Returns an ndb.Model entity that the urlsafe key points to. ...
#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ import endpoints f...
<commit_before>#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa Code Citation: https://github.com/udacity/FSND-P4-Design-A-Game/blob/master/Skeleton%20Project%20Guess-a-Number/utils.py #noqa """ impo...
a980be7e64193fa29f3913651f48a413c02f5fa3
climlab/__init__.py
climlab/__init__.py
__version__ = '0.3.2' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
__version__ = '0.4.0' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
Increment version number to 0.4.0
Increment version number to 0.4.0 This should have been done a while ago... many changes including comprehensive documentation, support for lat-lon grids, bug fixes, etc.
Python
mit
cjcardinale/climlab,brian-rose/climlab,cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab
__version__ = '0.3.2' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
__version__ = '0.4.0' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
<commit_before>__version__ = '0.3.2' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab i...
__version__ = '0.4.0' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
__version__ = '0.3.2' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiation...
<commit_before>__version__ = '0.3.2' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab i...
b7ada8c3a4cacc5b6b91aa5cb91cd57a6ee5566d
example.py
example.py
# -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask import Flask f...
# -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask import Flask f...
Update import to use flask.ext
Update import to use flask.ext
Python
mit
corydolphin/flask-olinauth
# -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask import Flask f...
# -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask import Flask f...
<commit_before># -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask ...
# -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask import Flask f...
# -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask import Flask f...
<commit_before># -*- coding: utf-8 -*- """ Flask-Login example =================== This is a small application that provides a trivial demonstration of Flask-Login, including remember me functionality. :copyright: (C) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. """ from flask ...
e16911bb965a86fc841b17d4748fdc75d8ed5cf2
quizzes.py
quizzes.py
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
Add additional CRUD functions to Quiz class
Add additional CRUD functions to Quiz class
Python
bsd-2-clause
estreeper/quizalicious,estreeper/quizalicious,estreeper/quizalicious
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
<commit_before>from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): ...
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
<commit_before>from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): ...
a769c30a874913cbf053c6973b137520dfc58e93
stingray/__init__.py
stingray/__init__.py
# Licensed under MIT license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------...
# Licensed under MIT license - see LICENSE.rst """ Library of Time Series Methods For Astronomical X-ray Data. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_ini...
Remove useless information from library description
Remove useless information from library description
Python
mit
evandromr/stingray,abigailStev/stingray,dhuppenkothen/stingray,pabell/stingray,StingraySoftware/stingray
# Licensed under MIT license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------...
# Licensed under MIT license - see LICENSE.rst """ Library of Time Series Methods For Astronomical X-ray Data. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_ini...
<commit_before># Licensed under MIT license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init impo...
# Licensed under MIT license - see LICENSE.rst """ Library of Time Series Methods For Astronomical X-ray Data. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_ini...
# Licensed under MIT license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------...
<commit_before># Licensed under MIT license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init impo...
c2003d452914a2725e04f58a744bbafe4554dec5
holmes/migrations/versions/4d45dd3d8ce5_add_a_flag_for_review_active.py
holmes/migrations/versions/4d45dd3d8ce5_add_a_flag_for_review_active.py
"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'vi...
"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'vi...
Fix syntax of a migration
Fix syntax of a migration
Python
mit
holmes-app/holmes-api,holmes-app/holmes-api
"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'vi...
"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'vi...
<commit_before>"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_colu...
"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'vi...
"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'vi...
<commit_before>"""add a flag for review active Revision ID: 4d45dd3d8ce5 Revises: 49d09b3d2801 Create Date: 2014-02-26 16:29:54.507710 """ # revision identifiers, used by Alembic. revision = '4d45dd3d8ce5' down_revision = '49d09b3d2801' from alembic import op import sqlalchemy as sa def upgrade(): op.add_colu...
f565b24c7766df2681669abd6a3c2145a4a62853
example/deploy.py
example/deploy.py
from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( etcd_node.f...
from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( etcd_node.f...
Include mask size on docker CIDR.
Include mask size on docker CIDR.
Python
mit
EDITD/pyinfra-kubernetes,EDITD/pyinfra-kubernetes
from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( etcd_node.f...
from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( etcd_node.f...
<commit_before>from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( ...
from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( etcd_node.f...
from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( etcd_node.f...
<commit_before>from pyinfra import inventory, state from pyinfra_docker import deploy_docker from pyinfra_etcd import deploy_etcd from pyinfra_kubernetes import deploy_kubernetes_master, deploy_kubernetes_node SUDO = True FAIL_PERCENT = 0 def get_etcd_nodes(): return [ 'http://{0}:2379'.format( ...
9b820aff6fc64ffa750dbf92a51d754f9c55ab79
froide/publicbody/search_indexes.py
froide/publicbody/search_indexes.py
from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex, indexes.Indexa...
from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex, indexes.Indexa...
Make topic_* field on public body search index optional
Make topic_* field on public body search index optional
Python
mit
okfse/froide,ryankanno/froide,fin/froide,catcosmo/froide,ryankanno/froide,stefanw/froide,okfse/froide,catcosmo/froide,okfse/froide,ryankanno/froide,stefanw/froide,ryankanno/froide,stefanw/froide,stefanw/froide,okfse/froide,okfse/froide,LilithWittmann/froide,catcosmo/froide,CodeforHawaii/froide,fin/froide,LilithWittmann...
from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex, indexes.Indexa...
from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex, indexes.Indexa...
<commit_before>from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex,...
from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex, indexes.Indexa...
from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex, indexes.Indexa...
<commit_before>from __future__ import print_function from django.conf import settings from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from .models import PublicBody PUBLIC_BODY_BOOSTS = settings.FROIDE_CONFIG.get("public_body_boosts", {}) class PublicBodyIndex(CelerySearchIndex,...
d8a36da519dd5b5659777e2b92564569a3dfb9f8
test/test_get_new.py
test/test_get_new.py
from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @pytest.mark.trylast @needinternet def test_check_get_new(fixture_update_dir): """Test th...
from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @needinternet def test_check_get_new(fixture_update_dir): """Test that gets new version f...
Write test that attempts to unpack invalid archive
Write test that attempts to unpack invalid archive
Python
lgpl-2.1
rlee287/pyautoupdate,rlee287/pyautoupdate
from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @pytest.mark.trylast @needinternet def test_check_get_new(fixture_update_dir): """Test th...
from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @needinternet def test_check_get_new(fixture_update_dir): """Test that gets new version f...
<commit_before>from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @pytest.mark.trylast @needinternet def test_check_get_new(fixture_update_dir):...
from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @needinternet def test_check_get_new(fixture_update_dir): """Test that gets new version f...
from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @pytest.mark.trylast @needinternet def test_check_get_new(fixture_update_dir): """Test th...
<commit_before>from __future__ import absolute_import, print_function from ..pyautoupdate.launcher import Launcher from .pytest_skipif import needinternet from .pytest_makevers import fixture_update_dir import os import sys import pytest @pytest.mark.trylast @needinternet def test_check_get_new(fixture_update_dir):...
75add42972c059a00b01fe2b4eeb716d905a3bd6
mamba/cli.py
mamba/cli.py
# -*- coding: utf-8 -*- import sys import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in sys.argv[1:]: module = imp.load_source(file_.replace('.py', ''), file_) runner.r...
# -*- coding: utf-8 -*- import sys import os import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in _specs(): module = imp.load_source(file_.replace('.py', ''), file_) ru...
Load specs from spec/**/*_spec.py if no spec was specified
Load specs from spec/**/*_spec.py if no spec was specified
Python
mit
angelsanz/mamba,eferro/mamba,alejandrodob/mamba,dex4er/mamba,nestorsalceda/mamba,markng/mamba,jaimegildesagredo/mamba
# -*- coding: utf-8 -*- import sys import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in sys.argv[1:]: module = imp.load_source(file_.replace('.py', ''), file_) runner.r...
# -*- coding: utf-8 -*- import sys import os import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in _specs(): module = imp.load_source(file_.replace('.py', ''), file_) ru...
<commit_before># -*- coding: utf-8 -*- import sys import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in sys.argv[1:]: module = imp.load_source(file_.replace('.py', ''), file_) ...
# -*- coding: utf-8 -*- import sys import os import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in _specs(): module = imp.load_source(file_.replace('.py', ''), file_) ru...
# -*- coding: utf-8 -*- import sys import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in sys.argv[1:]: module = imp.load_source(file_.replace('.py', ''), file_) runner.r...
<commit_before># -*- coding: utf-8 -*- import sys import imp from mamba import formatters from mamba.runner import Runner def main(): formatter = formatters.DocumentationFormatter() runner = Runner(formatter) for file_ in sys.argv[1:]: module = imp.load_source(file_.replace('.py', ''), file_) ...
3d1c4c3bd3dd6ae48e75772a2f2706d6104d189c
googkit.py
googkit.py
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
Support making available to exec cmd on sub dir
Support making available to exec cmd on sub dir
Python
mit
googkit/googkit,googkit/googkit,googkit/googkit
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
<commit_before>import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import Googki...
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
<commit_before>import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import Googki...
f00eeefd5c7b13c8fdff2ff213a50f2c13423073
example.py
example.py
#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) array = np.arr...
#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) array = np.arr...
Change random range to be between -max_val/2 and max_val for negative numbers.
Change random range to be between -max_val/2 and max_val for negative numbers.
Python
bsd-3-clause
nbigaouette/rust-sorting,nbigaouette/rust-sorting,nbigaouette/rust-sorting
#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) array = np.arr...
#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) array = np.arr...
<commit_before>#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) ...
#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) array = np.arr...
#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) array = np.arr...
<commit_before>#!/usr/bin/env python3 import numpy as np import copy as cp import rust_sorting as rs N = 5 max_val = 10.0 dtypes = [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64, np.float32, np.float64] for dtype in dtypes: # print("dtype:", dtype) ...
f1a5c564d56996d023cc891f56c28000ba24df7f
src/client.py
src/client.py
#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx, posy, posz = 0.0, 0.0, 0.0 def change_pos(*values): range_delta = 0.1 output = [] for pos in values: pos_min = pos - range_delta pos_min = -0.5 if pos_min < -0.5 e...
#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx = random.uniform(-50.00, 50.00) posy = random.uniform(-50.00, 50.00) posz = random.uniform(-50.00, 50.00) def change_pos(*values): range_delta = 0.1 output = [] for pos in values: ...
Use better start values for arm
Use better start values for arm
Python
mit
saleone/bachelor-thesis
#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx, posy, posz = 0.0, 0.0, 0.0 def change_pos(*values): range_delta = 0.1 output = [] for pos in values: pos_min = pos - range_delta pos_min = -0.5 if pos_min < -0.5 e...
#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx = random.uniform(-50.00, 50.00) posy = random.uniform(-50.00, 50.00) posz = random.uniform(-50.00, 50.00) def change_pos(*values): range_delta = 0.1 output = [] for pos in values: ...
<commit_before>#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx, posy, posz = 0.0, 0.0, 0.0 def change_pos(*values): range_delta = 0.1 output = [] for pos in values: pos_min = pos - range_delta pos_min = -0.5 if p...
#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx = random.uniform(-50.00, 50.00) posy = random.uniform(-50.00, 50.00) posz = random.uniform(-50.00, 50.00) def change_pos(*values): range_delta = 0.1 output = [] for pos in values: ...
#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx, posy, posz = 0.0, 0.0, 0.0 def change_pos(*values): range_delta = 0.1 output = [] for pos in values: pos_min = pos - range_delta pos_min = -0.5 if pos_min < -0.5 e...
<commit_before>#!/usr/bin/env python3 import socket import time import math import random HOST, PORT = 'localhost', 7777 LIMIT = 0.5 posx, posy, posz = 0.0, 0.0, 0.0 def change_pos(*values): range_delta = 0.1 output = [] for pos in values: pos_min = pos - range_delta pos_min = -0.5 if p...