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
9a5905a42eebcc3b4dadc3f772ba7d9d6b25af63
setup.py
setup.py
from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', author_emai...
from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', author_emai...
Install ipython in development environment
Install ipython in development environment
Python
mit
Turbasen/turbasen.py
from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', author_emai...
from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', author_emai...
<commit_before>from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', ...
from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', author_emai...
from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', author_emai...
<commit_before>from setuptools import setup name = 'turbasen' VERSION = '2.4.6' setup( name=name, packages=[name], version=VERSION, description='Client for Nasjonal Turbase REST API', long_description='See https://github.com/Turbasen/turbasen.py/blob/master/README.md', author='Ali Kaafarani', ...
1cda2d235000e33d3325f313edc424d06e5bacc9
setup.py
setup.py
from setuptools import setup setup( name='tattle', version='0.1', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], )
from setuptools import setup setup( name='tattle', version='0.1.0', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], )
Update tattle version to 0.1.0
Update tattle version to 0.1.0 Previous version number was 0.1
Python
apache-2.0
cloudify-cosmo/tattle
from setuptools import setup setup( name='tattle', version='0.1', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], ) Update tattle version to 0.1.0 Previous version number was 0.1
from setuptools import setup setup( name='tattle', version='0.1.0', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], )
<commit_before>from setuptools import setup setup( name='tattle', version='0.1', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], ) <commit_msg>Update tattle version to 0.1.0 Previous version number was 0.1<commit_after>
from setuptools import setup setup( name='tattle', version='0.1.0', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], )
from setuptools import setup setup( name='tattle', version='0.1', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], ) Update tattle version to 0.1.0 Previous version number was 0.1from setuptools import setup setup( name='tattle', ...
<commit_before>from setuptools import setup setup( name='tattle', version='0.1', packages=[ 'tattle', ], install_requires=[ 'requests>=2.7.0', 'pyyaml>=3.11' ], ) <commit_msg>Update tattle version to 0.1.0 Previous version number was 0.1<commit_after>from setuptools imp...
178434bc869bf8884a29fbf622570d0d8661a675
setup.py
setup.py
from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.0', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', classifiers=[ ...
from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.1', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', classifiers=[ ...
Fix link to spec in README
Fix link to spec in README
Python
bsd-2-clause
anossov/openrtb,gsakkis/openrtb
from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.0', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', classifiers=[ ...
from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.1', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', classifiers=[ ...
<commit_before>from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.0', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', c...
from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.1', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', classifiers=[ ...
from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.0', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', classifiers=[ ...
<commit_before>from setuptools import setup import codecs def readme(fn): with codecs.open(fn, encoding='utf-8') as f: return f.read() setup(name='openrtb', version='0.1.0', packages=[ 'openrtb', ], author='Pavel Anossov', author_email='anossov@gmail.com', c...
3f298ed994506a54068ec8cec6fd028a0b0e8699
setup.py
setup.py
from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@leidel.info', ...
from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@leidel.info', ...
Remove download URL since Github doesn't get his act together. Damnit
Remove download URL since Github doesn't get his act together. Damnit git-svn-id: https://django-robots.googlecode.com/svn/trunk@36 12edf5ea-513a-0410-8a8c-37067077e60f committer: leidel <leidel@12edf5ea-513a-0410-8a8c-37067077e60f> --HG-- extra : convert_revision : aa256d6eb94fc5492608373969ed7c5826b2077a
Python
bsd-3-clause
gbezyuk/django-robots,pbs/django-robots,jscott1971/django-robots,jezdez/django-robots,jazzband/django-robots,jezdez/django-robots,freakboy3742/django-robots,pbs/django-robots,philippeowagner/django-robots,philippeowagner/django-robots,amitu/django-robots,jazzband/django-robots,freakboy3742/django-robots,pbs/django-robo...
from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@leidel.info', ...
from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@leidel.info', ...
<commit_before>from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@...
from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@leidel.info', ...
from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@leidel.info', ...
<commit_before>from distutils.core import setup setup( name='django-robots', version=__import__('robots').__version__, description='Robots exclusion application for Django, complementing Sitemaps.', long_description=open('docs/overview.txt').read(), author='Jannis Leidel', author_email='jannis@...
adc79737e1932724fa38533ecf67a65bf77a6dc8
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils setup( name='Libact', version='0.1.0', description='Active learning package', long_description='Active learning package', author='LSC', author_email='this@is.email', url='http://www.csie.ntu.edu.tw/~ht...
#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils import sys if sys.platform == 'darwin': print("Platform Detection: Mac OS X. Link to openblas...") extra_link_args = ['-L/usr/local/opt/openblas/lib -lopenblas'] include_dirs = (numpy.distutils.misc_util.get_numpy_inc...
Fix compiling flags for darwin.
Fix compiling flags for darwin. The OpenBLAS formula is keg-only, which means it was not symlinked into /usr/local. Thus, we need to add the build variables manually. Also, the library is named as openblas, which means `-llapack` and `-llapacke` will cause library not found error.
Python
bsd-2-clause
ntucllab/libact,ntucllab/libact,ntucllab/libact
#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils setup( name='Libact', version='0.1.0', description='Active learning package', long_description='Active learning package', author='LSC', author_email='this@is.email', url='http://www.csie.ntu.edu.tw/~ht...
#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils import sys if sys.platform == 'darwin': print("Platform Detection: Mac OS X. Link to openblas...") extra_link_args = ['-L/usr/local/opt/openblas/lib -lopenblas'] include_dirs = (numpy.distutils.misc_util.get_numpy_inc...
<commit_before>#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils setup( name='Libact', version='0.1.0', description='Active learning package', long_description='Active learning package', author='LSC', author_email='this@is.email', url='http://www.csie...
#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils import sys if sys.platform == 'darwin': print("Platform Detection: Mac OS X. Link to openblas...") extra_link_args = ['-L/usr/local/opt/openblas/lib -lopenblas'] include_dirs = (numpy.distutils.misc_util.get_numpy_inc...
#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils setup( name='Libact', version='0.1.0', description='Active learning package', long_description='Active learning package', author='LSC', author_email='this@is.email', url='http://www.csie.ntu.edu.tw/~ht...
<commit_before>#!/usr/bin/env python from distutils.core import setup, Extension import numpy.distutils setup( name='Libact', version='0.1.0', description='Active learning package', long_description='Active learning package', author='LSC', author_email='this@is.email', url='http://www.csie...
19e7aa3269adacd6ff5f0974ddd957b468ebd0ca
slack.py
slack.py
import requests import json import time import sys _token = "xxxxxxx" _domain = "xxxxxxx" def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) files_list_url = "https://slack.com/api/files.list" data = { "token": _toke...
import requests import json import time import sys file = open('token.txt', 'r') _token = file.readline() file.close() file = open('domain.txt', 'r') _domain = file.readline() def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) f...
Change about read "token" & "domain"
Change about read "token" & "domain"
Python
mit
Rick-Kota/Slack_file_Delete
import requests import json import time import sys _token = "xxxxxxx" _domain = "xxxxxxx" def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) files_list_url = "https://slack.com/api/files.list" data = { "token": _toke...
import requests import json import time import sys file = open('token.txt', 'r') _token = file.readline() file.close() file = open('domain.txt', 'r') _domain = file.readline() def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) f...
<commit_before>import requests import json import time import sys _token = "xxxxxxx" _domain = "xxxxxxx" def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) files_list_url = "https://slack.com/api/files.list" data = { ...
import requests import json import time import sys file = open('token.txt', 'r') _token = file.readline() file.close() file = open('domain.txt', 'r') _domain = file.readline() def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) f...
import requests import json import time import sys _token = "xxxxxxx" _domain = "xxxxxxx" def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) files_list_url = "https://slack.com/api/files.list" data = { "token": _toke...
<commit_before>import requests import json import time import sys _token = "xxxxxxx" _domain = "xxxxxxx" def del_time(Day): Set_time = str(int(time.time())-Day*86400) return Set_time def files_list(Day): Del_time = del_time(Day) files_list_url = "https://slack.com/api/files.list" data = { ...
3068939373b864995827b938b669b9493e6a680d
app/settings/prod.py
app/settings/prod.py
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = [ 'backend.agendaodonto.com' ] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = ...
Update allowed hosts to the new domain
fix: Update allowed hosts to the new domain
Python
agpl-3.0
agendaodonto/server,agendaodonto/server
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = [ 'backend.agendaodonto.com' ] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = ...
<commit_before>import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = [ 'backend.agendaodonto.com' ] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = ...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
<commit_before>import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['...
e331f5cd1c921ca35c6184c00fbd36929cb92b90
src/tenyksddate/main.py
src/tenyksddate/main.py
from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'today': [r'^(?i)(ddate|discordian)'] } def __init__(self, *args, **kwargs): super(DiscordianDate, self).__init__(*args, **k...
import datetime from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'date': [r'^(?i)(ddate|discordian) (?P<month>(.*)) (?P<day>(.*)) (?P<year>(.*))'], 'today': [r'^(?i)(ddate|discordian...
Add lookup for an arbitrary date
Add lookup for an arbitrary date In the form “mm dd yyyy”.
Python
mit
kyleterry/tenyks-contrib,cblgh/tenyks-contrib,colby/tenyks-contrib
from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'today': [r'^(?i)(ddate|discordian)'] } def __init__(self, *args, **kwargs): super(DiscordianDate, self).__init__(*args, **k...
import datetime from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'date': [r'^(?i)(ddate|discordian) (?P<month>(.*)) (?P<day>(.*)) (?P<year>(.*))'], 'today': [r'^(?i)(ddate|discordian...
<commit_before>from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'today': [r'^(?i)(ddate|discordian)'] } def __init__(self, *args, **kwargs): super(DiscordianDate, self).__in...
import datetime from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'date': [r'^(?i)(ddate|discordian) (?P<month>(.*)) (?P<day>(.*)) (?P<year>(.*))'], 'today': [r'^(?i)(ddate|discordian...
from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'today': [r'^(?i)(ddate|discordian)'] } def __init__(self, *args, **kwargs): super(DiscordianDate, self).__init__(*args, **k...
<commit_before>from tenyksservice import TenyksService, run_service from ddate.base import DDate class DiscordianDate(TenyksService): direct_only = True irc_message_filters = { 'today': [r'^(?i)(ddate|discordian)'] } def __init__(self, *args, **kwargs): super(DiscordianDate, self).__in...
9ad378244cf8ca8a28b01ae1c7e166dbeff9a3fb
odoo/addons/test_main_flows/__manifest__.py
odoo/addons/test_main_flows/__manifest__.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute the most import...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute the most import...
Revert "[FIX] test_main_flows: missing dependency to run it in a browser"
Revert "[FIX] test_main_flows: missing dependency to run it in a browser" This reverts commit 58e914425033a9604885fb0cdd7de1a6a144c4da.
Python
agpl-3.0
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute the most import...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute the most import...
<commit_before># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute ...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute the most import...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute the most import...
<commit_before># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Main Flow', 'version': '1.0', 'category': 'Tools', 'description': """ This module will test the main workflow of Odoo. It will install some main apps and will try to execute ...
91147e838348b576d760cb2f3966e2c64b930e2e
swift/dedupe/killall.py
swift/dedupe/killall.py
#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v grep | cut -c 9-15...
#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v grep | cut -c 9-15...
Change the position. use proxy-server to do dedupe instead of object-server
Change the position. use proxy-server to do dedupe instead of object-server
Python
apache-2.0
mjwtom/swift,mjwtom/swift
#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v grep | cut -c 9-15...
#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v grep | cut -c 9-15...
<commit_before>#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v gre...
#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v grep | cut -c 9-15...
#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v grep | cut -c 9-15...
<commit_before>#!/usr/bin/python __author__ = 'mjwtom' import os os.system('ps -aux | grep swift-proxy-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-account-server | grep -v grep | cut -c 9-15 | xargs kill -s 9') os.system('ps -aux | grep swift-container-server | grep -v gre...
ac854703ac8ae2e9ab1b9fb2475f9fcb11df8721
pysc2/agents/base_agent.py
pysc2/agents/base_agent.py
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Define instance attributes on __init__.
Define instance attributes on __init__. PySC2: Import of refs/pull/48/head PiperOrigin-RevId: 166837442
Python
apache-2.0
deepmind/pysc2
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
856bdb5219b233769dc2529772d8489c20fb1efc
reddit_adzerk/adzerkads.py
reddit_adzerk/adzerkads.py
from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_ht...
from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) site_name = getattr(...
Use protocol relative adzerk url
Use protocol relative adzerk url
Python
bsd-3-clause
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_ht...
from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) site_name = getattr(...
<commit_before>from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_k...
from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) site_name = getattr(...
from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_key = "adzerk_ht...
<commit_before>from urllib import quote from pylons import tmpl_context as c from pylons import app_globals as g from r2.lib.pages import Ads as BaseAds from r2.models.subreddit import DefaultSR FRONTPAGE_NAME = "-reddit.com" class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) url_k...
485f04f0e396444dbb5635b21202b2cd2e0612ff
src/webapp/admin/login.py
src/webapp/admin/login.py
from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key = current_app....
from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key = current_app....
Fix redirect generation for reverse proxied solutions
Fix redirect generation for reverse proxied solutions
Python
bsd-3-clause
janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system
from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key = current_app....
from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key = current_app....
<commit_before>from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key...
from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key = current_app....
from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key = current_app....
<commit_before>from datetime import timedelta, datetime from functools import wraps import hmac from hashlib import sha1 from flask import Blueprint, session, redirect, url_for, request, current_app ADMIN = "valid_admin" TIME_FORMAT = '%Y%m%d%H%M%S' TIME_LIMIT = timedelta(hours=3) def _create_hmac(payload): key...
1ad3bf1093dd6b336dfc45c51dc608f04b355631
wafer/talks/tests/test_wafer_basic_talks.py
wafer/talks/tests/test_wafer_basic_talks.py
# This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword') talk = T...
# This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword') Talk.obj...
Add some more simple tests
Add some more simple tests
Python
isc
CTPUG/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer
# This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword') talk = T...
# This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword') Talk.obj...
<commit_before># This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword...
# This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword') Talk.obj...
# This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword') talk = T...
<commit_before># This tests the very basic talk stuff, to ensure some levels of sanity def test_add_talk(): """Create a user and add a talk to it""" from django.contrib.auth.models import User from wafer.talks.models import Talk user = User.objects.create_user('john', 'best@wafer.test', 'johnpassword...
1cf1da043ceab767d9d0dbdbed62c2f1c5ff36e9
test_http.py
test_http.py
from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstance(s._socket, s...
from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstance(s._socket, s...
Add tests for closing a socket
Add tests for closing a socket
Python
mit
jefrailey/network_tools
from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstance(s._socket, s...
from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstance(s._socket, s...
<commit_before>from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstan...
from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstance(s._socket, s...
from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstance(s._socket, s...
<commit_before>from http_server import HttpServer import socket def test_200_ok(): s = HttpServer() assert s.ok() == "HTTP/1.1 200 OK" def test_200_ok_byte(): s = HttpServer() assert isinstance(s.ok(), bytes) def test_socket_is_socket(): s = HttpServer() s.open_socket() assert isinstan...
8cd922488ffa3363f140ba156e1e5a011d89545d
tfr/files.py
tfr/files.py
import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))-1): ''' Saves samples in given sampling frequency to ...
import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))): ''' Saves samples in given sampling frequency to a ...
Fix the quantization factor for writing.
Fix the quantization factor for writing.
Python
mit
bzamecnik/tfr,bzamecnik/tfr
import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))-1): ''' Saves samples in given sampling frequency to ...
import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))): ''' Saves samples in given sampling frequency to a ...
<commit_before>import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))-1): ''' Saves samples in given samplin...
import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))): ''' Saves samples in given sampling frequency to a ...
import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))-1): ''' Saves samples in given sampling frequency to ...
<commit_before>import numpy as np from scipy.io import wavfile def normalize(samples): max_value = np.max(np.abs(samples)) return samples / max_value if max_value != 0 else samples def save_wav(samples, filename, fs=44100, should_normalize=False, factor=((2**15))-1): ''' Saves samples in given samplin...
5def645c7bceaca3da3e76fec136c82b4ae848e3
UIP.py
UIP.py
import sys from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wallpaper.") try: offline = False if len(sys.argv) > 1 an...
import sys, argparse, os, shutil from uiplib.constants import CURR_DIR, PICS_FOLDER from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wall...
Add flag options for flush and offline modes
Add flag options for flush and offline modes Fixes #65
Python
agpl-3.0
Aniq55/UIP,nemaniarjun/UIP,mohitshaw/UIP,akshatnitd/UIP,VK10/UIP,VK10/UIP,nemaniarjun/UIP,Aniq55/UIP,NIT-dgp/UIP,DarkSouL11/UIP,hackrush01/UIP,NIT-dgp/UIP,hassi2016/UIP
import sys from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wallpaper.") try: offline = False if len(sys.argv) > 1 an...
import sys, argparse, os, shutil from uiplib.constants import CURR_DIR, PICS_FOLDER from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wall...
<commit_before>import sys from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wallpaper.") try: offline = False if len(s...
import sys, argparse, os, shutil from uiplib.constants import CURR_DIR, PICS_FOLDER from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wall...
import sys from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wallpaper.") try: offline = False if len(sys.argv) > 1 an...
<commit_before>import sys from uiplib.scheduler import scheduler if __name__ == "__main__": print("Hey this is UIP! you can use it to download" " images from reddit and also to schedule the setting of these" " images as your desktop wallpaper.") try: offline = False if len(s...
a3c52c84da93c3e3007fa291213b97fd7d5b0e8f
tests.py
tests.py
""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.test_client() ...
""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.test_client() ...
Add twitter API functionality test
Add twitter API functionality test
Python
mit
jayelm/twittersa,jayelm/twittersa
""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.test_client() ...
""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.test_client() ...
<commit_before>""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.tes...
""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.test_client() ...
""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.test_client() ...
<commit_before>""" Tests for TwitterSA These tests might be overkill, it's my first time messing around with unit tests. Jesse Mu """ import TwitterSA import unittest class TwitterSATestCase(unittest.TestCase): def setUp(self): TwitterSA.app.config['TESTING'] = True self.app = TwitterSA.app.tes...
5f16929b405ea12a430a22fdd02a547d6b7e28a5
tests.py
tests.py
from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() self.as...
from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() self.as...
Add test for adding a page
Add test for adding a page
Python
mit
plumdog/mainstay_wiki
from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() self.as...
from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() self.as...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() ...
from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() self.as...
from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() self.as...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from mainstay.test_utils import MainstayTest from .models import Page class WikiTestCase(MainstayTest): fixtures = MainstayTest.fixtures + ['wiki_pages'] def test_user_loaded(self): user = User.objects.get() ...
d2cfadb8100859521c9423ae8ace95cf074fed05
src/submodules/sm_stats.py
src/submodules/sm_stats.py
#!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and block log. """ DEPTH = 1 import config site = config.site class JuniorCollector(): def __init__(self,user): self.user = user def raw(self): return {'sample':site.Pages['Example']}
#!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and log events. """ DEPTH = 1 import config site = config.site import dateutil.parser from collections import Counter class JuniorCollector(): def __init__(self,user): self.user = user self.process() def...
Add basic data parsing, userrights changes
Add basic data parsing, userrights changes
Python
mit
theopolisme/wikitimeline
#!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and block log. """ DEPTH = 1 import config site = config.site class JuniorCollector(): def __init__(self,user): self.user = user def raw(self): return {'sample':site.Pages['Example']} Add basic data parsi...
#!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and log events. """ DEPTH = 1 import config site = config.site import dateutil.parser from collections import Counter class JuniorCollector(): def __init__(self,user): self.user = user self.process() def...
<commit_before> #!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and block log. """ DEPTH = 1 import config site = config.site class JuniorCollector(): def __init__(self,user): self.user = user def raw(self): return {'sample':site.Pages['Example']} <comm...
#!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and log events. """ DEPTH = 1 import config site = config.site import dateutil.parser from collections import Counter class JuniorCollector(): def __init__(self,user): self.user = user self.process() def...
#!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and block log. """ DEPTH = 1 import config site = config.site class JuniorCollector(): def __init__(self,user): self.user = user def raw(self): return {'sample':site.Pages['Example']} Add basic data parsi...
<commit_before> #!/usr/bin/env python """ Returns basic statistics about the user, including edit count, creation date, and block log. """ DEPTH = 1 import config site = config.site class JuniorCollector(): def __init__(self,user): self.user = user def raw(self): return {'sample':site.Pages['Example']} <comm...
c7150bf227edf78d716fe4e09b3a073d9b0cfc1e
fmriprep/workflows/bold/tests/test_utils.py
fmriprep/workflows/bold/tests/test_utils.py
''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_enhance_and_skullstrip_bold_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 total1 = np.sum(ma...
''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_bold_reference_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 total1 = np.sum(mask1) tota...
Use bold_reference_wf to generate reference before enhancing
TEST: Use bold_reference_wf to generate reference before enhancing
Python
bsd-3-clause
poldracklab/preprocessing-workflow,poldracklab/fmriprep,poldracklab/preprocessing-workflow,oesteban/fmriprep,oesteban/fmriprep,oesteban/fmriprep,oesteban/preprocessing-workflow,poldracklab/fmriprep,poldracklab/fmriprep,oesteban/preprocessing-workflow
''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_enhance_and_skullstrip_bold_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 total1 = np.sum(ma...
''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_bold_reference_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 total1 = np.sum(mask1) tota...
<commit_before>''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_enhance_and_skullstrip_bold_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 tot...
''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_bold_reference_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 total1 = np.sum(mask1) tota...
''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_enhance_and_skullstrip_bold_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 total1 = np.sum(ma...
<commit_before>''' Testing module for fmriprep.workflows.base ''' import pytest import numpy as np from nilearn.image import load_img from ..utils import init_enhance_and_skullstrip_bold_wf def symmetric_overlap(img1, img2): mask1 = load_img(img1).get_data() > 0 mask2 = load_img(img2).get_data() > 0 tot...
b742bd2ba0a2dd18c614ddb72dc09ef091a81717
takeyourmeds/api/views.py
takeyourmeds/api/views.py
from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder, ReminderTime class ReminderTimeField(serializers.RelatedField): def...
from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder class ReminderTimeField(serializers.RelatedField): def to_representa...
Use related_name etc to avoid code
Use related_name etc to avoid code Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>
Python
mit
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder, ReminderTime class ReminderTimeField(serializers.RelatedField): def...
from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder class ReminderTimeField(serializers.RelatedField): def to_representa...
<commit_before>from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder, ReminderTime class ReminderTimeField(serializers.Related...
from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder class ReminderTimeField(serializers.RelatedField): def to_representa...
from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder, ReminderTime class ReminderTimeField(serializers.RelatedField): def...
<commit_before>from rest_framework import serializers, viewsets from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework.permissions import IsAuthenticated from takeyourmeds.reminder.models import Reminder, ReminderTime class ReminderTimeField(serializers.Related...
d3a0c400e50d34b9829b05d26eef5eac878aa091
enhanced_cbv/views/list.py
enhanced_cbv/views/list.py
from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.filter_set ...
from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.filter_set ...
Add get_filter_set_kwargs for instanciating FilterSet with additional arguments
Add get_filter_set_kwargs for instanciating FilterSet with additional arguments
Python
bsd-3-clause
rasca/django-enhanced-cbv,matuu/django-enhanced-cbv,matuu/django-enhanced-cbv,rasca/django-enhanced-cbv
from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.filter_set ...
from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.filter_set ...
<commit_before>from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.f...
from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.filter_set ...
from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.filter_set ...
<commit_before>from django.core.exceptions import ImproperlyConfigured from django.views.generic import ListView class ListFilteredMixin(object): """ Mixin that adds support for django-filter """ filter_set = None def get_filter_set(self): if self.filter_set: return self.f...
c6eac58dcddde575dbc919edb71661b4a443cc29
shallow_appify/_version.py
shallow_appify/_version.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 3) __version__ = '.'.join(map(str, __version_info__))
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 4) __version__ = '.'.join(map(str, __version_info__))
Increase the version number to `0.4.4`
Increase the version number to `0.4.4`
Python
mit
IngoHeimbach/shallow-appify
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 3) __version__ = '.'.join(map(str, __version_info__)) Increase the version number to `0.4.4`
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 4) __version__ = '.'.join(map(str, __version_info__))
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 3) __version__ = '.'.join(map(str, __version_info__)) <commit_msg>Increase the version number to `0.4.4`...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 4) __version__ = '.'.join(map(str, __version_info__))
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 3) __version__ = '.'.join(map(str, __version_info__)) Increase the version number to `0.4.4`# -*- coding: utf-8 -*- fr...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals __version_info__ = (0, 4, 3) __version__ = '.'.join(map(str, __version_info__)) <commit_msg>Increase the version number to `0.4.4`...
4a8c608c545b67f9dc1f436c82e0d83a55e168e9
scripts/database/common.py
scripts/database/common.py
import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look like: host: loc...
import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look like: host: loc...
Add default port to database connection script
Add default port to database connection script The default port is used if the ~/.catmaid-db file doesn't contain it. This fixes #454.
Python
agpl-3.0
fzadow/CATMAID,htem/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID
import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look like: host: loc...
import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look like: host: loc...
<commit_before>import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look l...
import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look like: host: loc...
import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look like: host: loc...
<commit_before>import sys import psycopg2 import os import yaml if 'CATMAID_CONFIGURATION' in os.environ: path = os.environ['CATMAID_CONFIGURATION'] else: path = os.path.join(os.environ['HOME'], '.catmaid-db') try: conf = yaml.load(open(path)) except: print >> sys.stderr, '''Your %s file should look l...
523dc5d2ab15b0e092f7c73d5a38ba90c8753338
custom/icds_reports/__init__.py
custom/icds_reports/__init__.py
from django.apps import AppConfig class ICDSReportsAppConfig(AppConfig): name = 'custom.icds_reports' def ready(self): import custom.icds_reports.reports.reports # noqa default_app_config = 'custom.icds_reports.ICDSReportsAppConfig'
Make sure reports are loaded so location_safe is applied
Make sure reports are loaded so location_safe is applied
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Make sure reports are loaded so location_safe is applied
from django.apps import AppConfig class ICDSReportsAppConfig(AppConfig): name = 'custom.icds_reports' def ready(self): import custom.icds_reports.reports.reports # noqa default_app_config = 'custom.icds_reports.ICDSReportsAppConfig'
<commit_before><commit_msg>Make sure reports are loaded so location_safe is applied<commit_after>
from django.apps import AppConfig class ICDSReportsAppConfig(AppConfig): name = 'custom.icds_reports' def ready(self): import custom.icds_reports.reports.reports # noqa default_app_config = 'custom.icds_reports.ICDSReportsAppConfig'
Make sure reports are loaded so location_safe is appliedfrom django.apps import AppConfig class ICDSReportsAppConfig(AppConfig): name = 'custom.icds_reports' def ready(self): import custom.icds_reports.reports.reports # noqa default_app_config = 'custom.icds_reports.ICDSReportsAppConfig'
<commit_before><commit_msg>Make sure reports are loaded so location_safe is applied<commit_after>from django.apps import AppConfig class ICDSReportsAppConfig(AppConfig): name = 'custom.icds_reports' def ready(self): import custom.icds_reports.reports.reports # noqa default_app_config = 'custom.icds...
1431f45e6b605e54f1ec341114b53ae047e48be7
token_names.py
token_names.py
INTEGER, PLUS, MINUS, MULTIPLY, DIVIDE, LPAREN, RPAREN, EOF, OPEN, CLOSE, BANG, ASSIGN, SEMI, ID = ( 'INTEGER', 'PLUS', 'MINUS', 'MULTIPLY', 'DIVIDE', 'LPAREN', 'RPAREN', 'EOF', 'OPEN', 'CLOSE', 'BANG', 'ASSIGN', 'SEMI', 'ID' )
ASSIGN = 'ASSIGN' BANG = 'BANG' CLOSE = 'CLOSE' DIVIDE = 'DIVIDE' EOF = 'EOF' ID = 'ID' INTEGER = 'INTEGER' LPAREN = 'LPAREN' MINUS = 'MINUS' MULTIPLY = 'MULTIPLY' OPEN = 'OPEN' PLUS = 'PLUS' RPAREN = 'RPAREN' SEMI = 'SEMI'
Fix token names format for readability.
Fix token names format for readability.
Python
mit
doubledherin/my_compiler
INTEGER, PLUS, MINUS, MULTIPLY, DIVIDE, LPAREN, RPAREN, EOF, OPEN, CLOSE, BANG, ASSIGN, SEMI, ID = ( 'INTEGER', 'PLUS', 'MINUS', 'MULTIPLY', 'DIVIDE', 'LPAREN', 'RPAREN', 'EOF', 'OPEN', 'CLOSE', 'BANG', 'ASSIGN', 'SEMI', 'ID' ) Fix token names format for readabili...
ASSIGN = 'ASSIGN' BANG = 'BANG' CLOSE = 'CLOSE' DIVIDE = 'DIVIDE' EOF = 'EOF' ID = 'ID' INTEGER = 'INTEGER' LPAREN = 'LPAREN' MINUS = 'MINUS' MULTIPLY = 'MULTIPLY' OPEN = 'OPEN' PLUS = 'PLUS' RPAREN = 'RPAREN' SEMI = 'SEMI'
<commit_before>INTEGER, PLUS, MINUS, MULTIPLY, DIVIDE, LPAREN, RPAREN, EOF, OPEN, CLOSE, BANG, ASSIGN, SEMI, ID = ( 'INTEGER', 'PLUS', 'MINUS', 'MULTIPLY', 'DIVIDE', 'LPAREN', 'RPAREN', 'EOF', 'OPEN', 'CLOSE', 'BANG', 'ASSIGN', 'SEMI', 'ID' ) <commit_msg>Fix token...
ASSIGN = 'ASSIGN' BANG = 'BANG' CLOSE = 'CLOSE' DIVIDE = 'DIVIDE' EOF = 'EOF' ID = 'ID' INTEGER = 'INTEGER' LPAREN = 'LPAREN' MINUS = 'MINUS' MULTIPLY = 'MULTIPLY' OPEN = 'OPEN' PLUS = 'PLUS' RPAREN = 'RPAREN' SEMI = 'SEMI'
INTEGER, PLUS, MINUS, MULTIPLY, DIVIDE, LPAREN, RPAREN, EOF, OPEN, CLOSE, BANG, ASSIGN, SEMI, ID = ( 'INTEGER', 'PLUS', 'MINUS', 'MULTIPLY', 'DIVIDE', 'LPAREN', 'RPAREN', 'EOF', 'OPEN', 'CLOSE', 'BANG', 'ASSIGN', 'SEMI', 'ID' ) Fix token names format for readabili...
<commit_before>INTEGER, PLUS, MINUS, MULTIPLY, DIVIDE, LPAREN, RPAREN, EOF, OPEN, CLOSE, BANG, ASSIGN, SEMI, ID = ( 'INTEGER', 'PLUS', 'MINUS', 'MULTIPLY', 'DIVIDE', 'LPAREN', 'RPAREN', 'EOF', 'OPEN', 'CLOSE', 'BANG', 'ASSIGN', 'SEMI', 'ID' ) <commit_msg>Fix token...
9ce01dc752d62c62eb8b276698f7cf2d6bc5707f
transaction.py
transaction.py
import signature class Transaction: def __init__(self, data, signature): self.data = data self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.signature) def sign_transaction(data, key): return Transaction(data, signature.sign(key, data))
import signature class Transaction: def __init__(self, data, author, signature): self.data = data self.author = author self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.author) def get_data(self): return self.data def get_au...
Add author public key info to Transaction class
Add author public key info to Transaction class
Python
mit
jake-billings/research-blockchain
import signature class Transaction: def __init__(self, data, signature): self.data = data self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.signature) def sign_transaction(data, key): return Transaction(data, signature.sign(key, data)) Add auth...
import signature class Transaction: def __init__(self, data, author, signature): self.data = data self.author = author self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.author) def get_data(self): return self.data def get_au...
<commit_before>import signature class Transaction: def __init__(self, data, signature): self.data = data self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.signature) def sign_transaction(data, key): return Transaction(data, signature.sign(key, ...
import signature class Transaction: def __init__(self, data, author, signature): self.data = data self.author = author self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.author) def get_data(self): return self.data def get_au...
import signature class Transaction: def __init__(self, data, signature): self.data = data self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.signature) def sign_transaction(data, key): return Transaction(data, signature.sign(key, data)) Add auth...
<commit_before>import signature class Transaction: def __init__(self, data, signature): self.data = data self.signature = signature def get_string(self): return '%s (%s)' % (self.data, self.signature) def sign_transaction(data, key): return Transaction(data, signature.sign(key, ...
b44dc164e6dd1e9a07f460c2be07829744029cea
server/tests/test_admin.py
server/tests/test_admin.py
"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', 'instal...
"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', 'instal...
Remove endpoint from test (it has been removed in lieu of User admin).
Remove endpoint from test (it has been removed in lieu of User admin).
Python
apache-2.0
sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,salopensource/sal
"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', 'instal...
"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', 'instal...
<commit_before>"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', ...
"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', 'instal...
"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', 'instal...
<commit_before>"""General functional tests for the Server admin.""" from sal.test_utils import AdminTestCase class ServerAdminTest(AdminTestCase): """Test the admin site is configured to have all expected views.""" admin_endpoints = { 'apikey', 'businessunit', 'condition', 'fact', 'historicalfact', ...
76bbaa5e0208e5c28747fff09388cd52ef63f6f5
blackjax/__init__.py
blackjax/__init__.py
from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder_adaptation, rmh, ...
from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder, pathfinder_adaptat...
Add `pathfinder` to the library namespace
Add `pathfinder` to the library namespace
Python
apache-2.0
blackjax-devs/blackjax
from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder_adaptation, rmh, ...
from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder, pathfinder_adaptat...
<commit_before>from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder_adaptati...
from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder, pathfinder_adaptat...
from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder_adaptation, rmh, ...
<commit_before>from .diagnostics import effective_sample_size as ess from .diagnostics import potential_scale_reduction as rhat from .kernels import ( adaptive_tempered_smc, elliptical_slice, ghmc, hmc, irmh, mala, meads, mgrad_gaussian, nuts, orbital_hmc, pathfinder_adaptati...
f48a9f088e383eb77c40b0196552590dc654cea7
test/mbed_gt_cli.py
test/mbed_gt_cli.py
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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 unit tests to mbed-greentea version printing API
Add unit tests to mbed-greentea version printing API
Python
apache-2.0
ARMmbed/greentea
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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...
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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...
80a55580806f19e9e57d86a03768664caf35d54b
ci/generate_pipeline_yml.py
ci/generate_pipeline_yml.py
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] tiles = [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(f.read()); with open('pipeline.yml', 'w') as f: f.write(t....
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = T...
Comment out our one breaking example from pipeline
Comment out our one breaking example from pipeline
Python
apache-2.0
cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] tiles = [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(f.read()); with open('pipeline.yml', 'w') as f: f.write(t....
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = T...
<commit_before>#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] tiles = [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(f.read()); with open('pipeline.yml', 'w') as ...
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] # Commenting out this as we only have one example and it breaks tiles = [] # [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = T...
#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] tiles = [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(f.read()); with open('pipeline.yml', 'w') as f: f.write(t....
<commit_before>#!/usr/bin/env python import os from jinja2 import Template clusters = ['1-12', '2-0', '2-1', '2-2'] tiles = [d for d in os.listdir('../examples') if os.path.isdir(os.path.join('../examples', d))] with open('pipeline.yml.jinja2', 'r') as f: t = Template(f.read()); with open('pipeline.yml', 'w') as ...
6bca7b628af7b5f57c4d7090008369eb2cde9d46
rest/views.py
rest/views.py
import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import BasicAuthentication ...
import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import BasicAuthentication ...
Make sure to rename the sound file to its checksum
Make sure to rename the sound file to its checksum
Python
bsd-3-clause
Soundphy/soundphy
import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import BasicAuthentication ...
import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import BasicAuthentication ...
<commit_before>import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import Basic...
import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import BasicAuthentication ...
import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import BasicAuthentication ...
<commit_before>import hashlib from rest.models import Sound from rest_framework import generics from rest.serializers import SoundListCreateSerializer from rest.serializers import SoundRetrieveUpdateDestroySerializer from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import Basic...
f9c3e4b95cb38f5aff5bad6692ac4fe469f5444d
test/spambl_test.py
test/spambl_test.py
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest class DNSBLTest(unittest.TestCase): pass if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest from spambl import DNSBL class DNSBLTest(unittest.TestCase): @classmethod def setUpClass(cls): code_item_class = {1: 'Class #1', 2: 'Class #2'} query_suffix = 'query.suffix' cls.dnsbl = DNSBL('test.dnsbl', query_s...
Add setUpClass method to DNSBLTest
Add setUpClass method to DNSBLTest This method is used to set up a common instance of DNSBL for testing
Python
mit
piotr-rusin/spam-lists
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest class DNSBLTest(unittest.TestCase): pass if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()Add setUpClass method to DNSBLTest This method is used to set up a common instance of DNSBL for testing
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest from spambl import DNSBL class DNSBLTest(unittest.TestCase): @classmethod def setUpClass(cls): code_item_class = {1: 'Class #1', 2: 'Class #2'} query_suffix = 'query.suffix' cls.dnsbl = DNSBL('test.dnsbl', query_s...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import unittest class DNSBLTest(unittest.TestCase): pass if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()<commit_msg>Add setUpClass method to DNSBLTest This method is used to set up a common instance of DN...
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest from spambl import DNSBL class DNSBLTest(unittest.TestCase): @classmethod def setUpClass(cls): code_item_class = {1: 'Class #1', 2: 'Class #2'} query_suffix = 'query.suffix' cls.dnsbl = DNSBL('test.dnsbl', query_s...
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest class DNSBLTest(unittest.TestCase): pass if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()Add setUpClass method to DNSBLTest This method is used to set up a common instance of DNSBL for testing#!/usr/bin/p...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import unittest class DNSBLTest(unittest.TestCase): pass if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()<commit_msg>Add setUpClass method to DNSBLTest This method is used to set up a common instance of DN...
e4c5f68da949683232b520796b380e8b8f2163c7
test/tiles/bigwig_test.py
test/tiles/bigwig_test.py
import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join('data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig') meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(filename, ['x.0.0.m...
import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join( 'data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig' ) meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(...
Test for bigWig aggregation modes
Test for bigWig aggregation modes
Python
mit
hms-dbmi/clodius,hms-dbmi/clodius
import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join('data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig') meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(filename, ['x.0.0.m...
import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join( 'data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig' ) meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(...
<commit_before>import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join('data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig') meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(file...
import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join( 'data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig' ) meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(...
import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join('data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig') meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(filename, ['x.0.0.m...
<commit_before>import clodius.tiles.bigwig as hgbi import os.path as op def test_bigwig_tiles(): filename = op.join('data', 'wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.bigWig') meanval = hgbi.tiles(filename, ['x.0.0']) minval = hgbi.tiles(filename, ['x.0.0.min']) maxval = hgbi.tiles(file...
60db7d52b2e3138eaedd87619d49ab8f6b422367
metakernel/magics/tests/test_spell_magic.py
metakernel/magics/tests/test_spell_magic.py
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print "ok" """, False) kernel.do_execute("%spell testme", False) text = get_log...
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print("ok") """, False) kernel.do_execute("%spell testme", False) text = get_lo...
Make spell test Python3 compatible
Make spell test Python3 compatible
Python
bsd-3-clause
Calysto/metakernel
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print "ok" """, False) kernel.do_execute("%spell testme", False) text = get_log...
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print("ok") """, False) kernel.do_execute("%spell testme", False) text = get_lo...
<commit_before> from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print "ok" """, False) kernel.do_execute("%spell testme", False) ...
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print("ok") """, False) kernel.do_execute("%spell testme", False) text = get_lo...
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print "ok" """, False) kernel.do_execute("%spell testme", False) text = get_log...
<commit_before> from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel, clear_log_text) def test_spell_magic(): kernel = get_kernel(EvalKernel) kernel.do_execute("""%%spell testme print "ok" """, False) kernel.do_execute("%spell testme", False) ...
23de595bdf9d87dc4841138b6ae284faeda4b856
banner/forms.py
banner/forms.py
from django import forms from django.utils.translation import ugettext as _ class ImportForm(forms.Form): csv_file = forms.FileField( required=True, label=_('CSV File'), help_text=_('CSV File containing import data.') ) def __init__(self, model, *args, **kwargs): super(Imp...
from django import forms from django.conf import settings from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from jmbo.admin import ModelBaseAdminForm from banner.styles import BANNER_STYLE_CLASSES class ImportForm(forms.Form): csv_file = forms.FileField( re...
Use custom form for Banner model because style is a special case
Use custom form for Banner model because style is a special case
Python
bsd-3-clause
praekelt/jmbo-banner,praekelt/jmbo-banner
from django import forms from django.utils.translation import ugettext as _ class ImportForm(forms.Form): csv_file = forms.FileField( required=True, label=_('CSV File'), help_text=_('CSV File containing import data.') ) def __init__(self, model, *args, **kwargs): super(Imp...
from django import forms from django.conf import settings from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from jmbo.admin import ModelBaseAdminForm from banner.styles import BANNER_STYLE_CLASSES class ImportForm(forms.Form): csv_file = forms.FileField( re...
<commit_before>from django import forms from django.utils.translation import ugettext as _ class ImportForm(forms.Form): csv_file = forms.FileField( required=True, label=_('CSV File'), help_text=_('CSV File containing import data.') ) def __init__(self, model, *args, **kwargs): ...
from django import forms from django.conf import settings from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from jmbo.admin import ModelBaseAdminForm from banner.styles import BANNER_STYLE_CLASSES class ImportForm(forms.Form): csv_file = forms.FileField( re...
from django import forms from django.utils.translation import ugettext as _ class ImportForm(forms.Form): csv_file = forms.FileField( required=True, label=_('CSV File'), help_text=_('CSV File containing import data.') ) def __init__(self, model, *args, **kwargs): super(Imp...
<commit_before>from django import forms from django.utils.translation import ugettext as _ class ImportForm(forms.Form): csv_file = forms.FileField( required=True, label=_('CSV File'), help_text=_('CSV File containing import data.') ) def __init__(self, model, *args, **kwargs): ...
204ee81fcb12e03f4a9d02b336709e6c79c6872c
rx/linq/observable/bufferwithtimeorcount.py
rx/linq/observable/bufferwithtimeorcount.py
from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler): """Projects each element of an observable sequence into a buffer that is completed when either it's full ...
from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler=None): """Projects each element of an observable sequence into a buffer that is completed when either it's ...
Align buffer_with_time_or_count signature with doc
Align buffer_with_time_or_count signature with doc According to docs, `buffer_with_time_or_count` has an optional scheduler parameter but in reality it's mandatory. Let's make it optional for real as passing `None` as third argument all the time is a bit inconvenient.
Python
mit
ReactiveX/RxPY,ReactiveX/RxPY
from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler): """Projects each element of an observable sequence into a buffer that is completed when either it's full ...
from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler=None): """Projects each element of an observable sequence into a buffer that is completed when either it's ...
<commit_before>from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler): """Projects each element of an observable sequence into a buffer that is completed when ei...
from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler=None): """Projects each element of an observable sequence into a buffer that is completed when either it's ...
from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler): """Projects each element of an observable sequence into a buffer that is completed when either it's full ...
<commit_before>from rx import Observable from rx.concurrency import timeout_scheduler from rx.internal import extensionmethod @extensionmethod(Observable) def buffer_with_time_or_count(self, timespan, count, scheduler): """Projects each element of an observable sequence into a buffer that is completed when ei...
65bfede8d8739699e57ddd4f66049ac0374d1a8d
ydf/instructions.py
ydf/instructions.py
""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COPY' ENTRYPOINT = 'ENTRYPOINT' VOLUME = 'VOLUME' USER = 'USER'...
""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ import collections import functools from ydf import meta __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COP...
Add @instruction decorator to mark module level funcs as handlers.
Add @instruction decorator to mark module level funcs as handlers.
Python
apache-2.0
ahawker/ydf
""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COPY' ENTRYPOINT = 'ENTRYPOINT' VOLUME = 'VOLUME' USER = 'USER'...
""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ import collections import functools from ydf import meta __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COP...
<commit_before>""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COPY' ENTRYPOINT = 'ENTRYPOINT' VOLUME = 'VOLUME...
""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ import collections import functools from ydf import meta __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COP...
""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COPY' ENTRYPOINT = 'ENTRYPOINT' VOLUME = 'VOLUME' USER = 'USER'...
<commit_before>""" ydf/instructions ~~~~~~~~~~~~~~~~ Convert objects parsed from YAML to those that represent Dockerfile instructions. """ __all__ = [] FROM = 'FROM' RUN = 'RUN' CMD = 'CMD' LABEL = 'LABEL' EXPOSE = 'EXPOSE' ENV = 'ENV' ADD = 'ADD' COPY = 'COPY' ENTRYPOINT = 'ENTRYPOINT' VOLUME = 'VOLUME...
a0391649f2982f3dcb2ca251f0803095879b01fe
tests/test_leaky_state.py
tests/test_leaky_state.py
import spylon.spark.launcher as sparklauncher import os def test_set_spark_property(): c = sparklauncher.SparkConfiguration() c.driver_memory = "4g" def test_spark_driver_memory(): c = sparklauncher.SparkConfiguration() c.conf.spark.driver.memory = "5g" c._set_environment_variables() assert '-...
Add test that exposes leaky state
Add test that exposes leaky state
Python
bsd-3-clause
MaxPoint/spylon
Add test that exposes leaky state
import spylon.spark.launcher as sparklauncher import os def test_set_spark_property(): c = sparklauncher.SparkConfiguration() c.driver_memory = "4g" def test_spark_driver_memory(): c = sparklauncher.SparkConfiguration() c.conf.spark.driver.memory = "5g" c._set_environment_variables() assert '-...
<commit_before><commit_msg>Add test that exposes leaky state<commit_after>
import spylon.spark.launcher as sparklauncher import os def test_set_spark_property(): c = sparklauncher.SparkConfiguration() c.driver_memory = "4g" def test_spark_driver_memory(): c = sparklauncher.SparkConfiguration() c.conf.spark.driver.memory = "5g" c._set_environment_variables() assert '-...
Add test that exposes leaky stateimport spylon.spark.launcher as sparklauncher import os def test_set_spark_property(): c = sparklauncher.SparkConfiguration() c.driver_memory = "4g" def test_spark_driver_memory(): c = sparklauncher.SparkConfiguration() c.conf.spark.driver.memory = "5g" c._set_envi...
<commit_before><commit_msg>Add test that exposes leaky state<commit_after>import spylon.spark.launcher as sparklauncher import os def test_set_spark_property(): c = sparklauncher.SparkConfiguration() c.driver_memory = "4g" def test_spark_driver_memory(): c = sparklauncher.SparkConfiguration() c.conf.s...
39bd25ffa9a90fb4dbbd63321eeee4acd84b8781
tests/test_movingfiles.py
tests/test_movingfiles.py
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_simple_realtive_m...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_simple_realtive_m...
Add more complex move_file test
Add more complex move_file test
Python
unlicense
lahwaacz/tvnamer,m42e/tvnamer,dbr/tvnamer
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_simple_realtive_m...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_simple_realtive_m...
<commit_before>#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_si...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_simple_realtive_m...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_simple_realtive_m...
<commit_before>#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvnamer #repository:http://github.com/dbr/tvnamer #license:Creative Commons GNU GPL v2 # http://creativecommons.org/licenses/GPL/2.0/ """Tests moving renamed files """ from functional_runner import run_tvnamer, verify_out_data def test_si...
a7c78d0abb2ce3b44c8db67b12d658bed960306f
tests/types/test_arrow.py
tests/types/test_arrow.py
from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __tablename__ = 'artic...
from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __tablename__ = 'artic...
Add tz tests for ArrowType
Add tz tests for ArrowType
Python
bsd-3-clause
joshfriend/sqlalchemy-utils,tonyseek/sqlalchemy-utils,tonyseek/sqlalchemy-utils,rmoorman/sqlalchemy-utils,marrybird/sqlalchemy-utils,cheungpat/sqlalchemy-utils,joshfriend/sqlalchemy-utils,JackWink/sqlalchemy-utils,konstantinoskostis/sqlalchemy-utils,spoqa/sqlalchemy-utils
from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __tablename__ = 'artic...
from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __tablename__ = 'artic...
<commit_before>from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __table...
from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __tablename__ = 'artic...
from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __tablename__ = 'artic...
<commit_before>from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils.types import arrow from tests import TestCase @mark.skipif('arrow.arrow is None') class TestArrowDateTimeType(TestCase): def create_models(self): class Article(self.Base): __table...
a29d4c9ea531552886734b3217a18c2128ddc233
byceps/util/money.py
byceps/util/money.py
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
Use `locale.format_string` to format monetary amounts
Use `locale.format_string` to format monetary amounts Previously used `locale.format` is deprecated as of Python 3.7 and suggests to use `format_string` instead.
Python
bsd-3-clause
m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
<commit_before>""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual representation ...
<commit_before>""" byceps.util.money ~~~~~~~~~~~~~~~~~ Handle monetary amounts. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from decimal import Decimal import locale TWO_PLACES = Decimal('.00') def format_euro_amount(x: Decimal) -> str: """Return a textual ...
7a5083163f86833d81a41de8f0448292e2c31d75
tools/db/copy_chunk_of_nonpartitioned_sentences_to_partitions.py
tools/db/copy_chunk_of_nonpartitioned_sentences_to_partitions.py
#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_nonpartitioned" ...
#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_nonpartitioned" ...
Reduce story sentences chunk size
Reduce story sentences chunk size For whatever reason 100k never finishes copying a chunk.
Python
agpl-3.0
berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud
#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_nonpartitioned" ...
#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_nonpartitioned" ...
<commit_before>#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_n...
#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_nonpartitioned" ...
#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_nonpartitioned" ...
<commit_before>#!/usr/bin/env python3 from mediawords.db import connect_to_db from mediawords.util.log import create_logger from mediawords.util.process import run_alone log = create_logger(__name__) def copy_chunk_of_nonpartitioned_sentences_to_partitions(): """Copy a chunk of sentences from "story_sentences_n...
eb78719ad6bd8d3d2d5f1160c9fe8d300d867ee3
isthatanearthquake/urls.py
isthatanearthquake/urls.py
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), url(r'^admin/doc...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), url(r'^admin/doc...
Include URLs from the quake project.
Include URLs from the quake project.
Python
bsd-3-clause
adamfast/isthatanearthquake
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), url(r'^admin/doc...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), url(r'^admin/doc...
<commit_before>from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), u...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), url(r'^admin/doc...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), url(r'^admin/doc...
<commit_before>from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'isthatanearthquake.views.home', name='home'), # url(r'^isthatanearthquake/', include('isthatanearthquake.foo.urls')), u...
b2b5b82632e1feee76ee9d4f6a9a070b350114b7
vim_turing_machine/machines/merge_business_hours/encode_hours.py
vim_turing_machine/machines/merge_business_hours/encode_hours.py
"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER from vim_turing_machine.constants imp...
"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER def encode_hours(hours, num_bits=BI...
Remove blank space at beginning
Remove blank space at beginning
Python
mit
ealter/vim_turing_machine,ealter/vim_turing_machine
"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER from vim_turing_machine.constants imp...
"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER def encode_hours(hours, num_bits=BI...
<commit_before>"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER from vim_turing_machin...
"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER def encode_hours(hours, num_bits=BI...
"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER from vim_turing_machine.constants imp...
<commit_before>"""Encodes a json representation of the business's hours into the 5-bit binary representation used by the merge business hours turing machine. It takes input from stdin and outputs the initial tape.""" import json import sys from vim_turing_machine.constants import BITS_PER_NUMBER from vim_turing_machin...
1bd287d3f6f7545e47364832a824e7380c6609e8
web/core/api/resources.py
web/core/api/resources.py
import tastypie.resources import tastypie.authentication import django.db.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_methods = ['get', 'post'] authe...
import tastypie.resources import tastypie.authentication import tastypie.fields import django.contrib.auth.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_method...
Allow files to be uploaded through the TastyPie API
Allow files to be uploaded through the TastyPie API
Python
bsd-3-clause
ambientsound/rsync,ambientsound/rsync,ambientsound/rsync,ambientsound/rsync
import tastypie.resources import tastypie.authentication import django.db.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_methods = ['get', 'post'] authe...
import tastypie.resources import tastypie.authentication import tastypie.fields import django.contrib.auth.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_method...
<commit_before>import tastypie.resources import tastypie.authentication import django.db.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_methods = ['get', 'post'...
import tastypie.resources import tastypie.authentication import tastypie.fields import django.contrib.auth.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_method...
import tastypie.resources import tastypie.authentication import django.db.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_methods = ['get', 'post'] authe...
<commit_before>import tastypie.resources import tastypie.authentication import django.db.models import web.core.models import web.core.api.authorization class FileResource(tastypie.resources.ModelResource): class Meta: queryset = web.core.models.File.objects.all() allowed_methods = ['get', 'post'...
edc296184db9d11dc160035541af2fa7c37f7e4b
twominutejournal/errors.py
twominutejournal/errors.py
"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining the error """...
"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining the error """...
Add type annotation to EntryAlreadyExistsError
Add type annotation to EntryAlreadyExistsError
Python
mit
tjmcginnis/tmj
"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining the error """...
"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining the error """...
<commit_before>"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining th...
"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining the error """...
"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining the error """...
<commit_before>"""errors Journal specific errors and exceptions """ class Error(Exception): """Base class for journal exceptions""" pass class EntryAlreadyExistsError(Error): """Raised when prompts are requested but an entry has already been written today @param message: a message explaining th...
f90cd0883a9a9301f359c7a238aba223756c6765
klustakwik2/numerics/cylib/compute_cluster_masks.py
klustakwik2/numerics/cylib/compute_cluster_masks.py
from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, cluster_mask_sum...
from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, cluster_mask_sum...
Fix for some version of py64 on win64
Fix for some version of py64 on win64
Python
bsd-3-clause
benvermaercke/klustakwik2,kwikteam/klustakwik2
from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, cluster_mask_sum...
from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, cluster_mask_sum...
<commit_before>from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, c...
from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, cluster_mask_sum...
from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, cluster_mask_sum...
<commit_before>from .compute_cluster_masks_cy import doaccum __all__ = ['accumulate_cluster_mask_sum'] def accumulate_cluster_mask_sum(kk, cluster_mask_sum): data = kk.data doaccum(kk.clusters, data.unmasked, data.unmasked_start, data.unmasked_end, data.masks, data.values_start, data.values_end, c...
cf3ff4d78a9a64c0c0e8d274ca36f68e9290b463
tests/seattle_benchmark.py
tests/seattle_benchmark.py
## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) tt = time.t...
## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) tt = time.t...
Update Seattle to print the mean at the end
Update Seattle to print the mean at the end
Python
apache-2.0
cognitect/transit-python,cognitect/transit-python,dand-oss/transit-python,dand-oss/transit-python
## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) tt = time.t...
## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) tt = time.t...
<commit_before>## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) ...
## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) tt = time.t...
## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) tt = time.t...
<commit_before>## Copyright (c) Cognitect, Inc. ## All rights reserved. from transit.reader import JsonUnmarshaler import json import time from StringIO import StringIO def run_tests(data): datas = StringIO(data) t = time.time() JsonUnmarshaler().load(datas) et = time.time() datas = StringIO(data) ...
f5543f10208ed4eef9d0f1a0a208e03e72709f40
windpowerlib/wind_farm.py
windpowerlib/wind_farm.py
""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ """ def __init_...
""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ def __init__(self, ...
Change parameters power_curve and power_output to attributes
Change parameters power_curve and power_output to attributes
Python
mit
wind-python/windpowerlib
""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ """ def __init_...
""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ def __init__(self, ...
<commit_before>""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ """ ...
""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ def __init__(self, ...
""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ """ def __init_...
<commit_before>""" The ``wind_farm`` module contains the class WindFarm that implements a wind farm in the windpowerlib and functions needed for the modelling of a wind farm. """ __copyright__ = "Copyright oemof developer group" __license__ = "GPLv3" import numpy as np class WindFarm(object): """ """ ...
b2b7975d635eea81fc370f07758564a7e28d3e65
tools/bots/ddc_tests.py
tools/bots/ddc_tests.py
#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess import bot im...
#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess import bot im...
Disable npm steps on DDC bot for now
Disable npm steps on DDC bot for now This will only regression test compilation (no running of generated code), but that appears to work. R=leafp@google.com Review-Url: https://codereview.chromium.org/2646493003 .
Python
bsd-3-clause
dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk...
#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess import bot im...
#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess import bot im...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess...
#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess import bot im...
#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess import bot im...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import os.path import shutil import sys import subprocess...
3b4af27a5e6a13e384852d31108449aa60f30fa2
tools/gdb/gdb_chrome.py
tools/gdb/gdb_chrome.py
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys sys.path.insert(...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys sys.path.insert(...
Add FilePath to the gdb pretty printers.
Add FilePath to the gdb pretty printers. Review URL: http://codereview.chromium.org/6621017 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@76956 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
ropik/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,ropik/ch...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys sys.path.insert(...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys sys.path.insert(...
<commit_before>#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys s...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys sys.path.insert(...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys sys.path.insert(...
<commit_before>#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys s...
ece6799fce381c5047c510f3db0303ff62195cc6
datapipe/targets/objects.py
datapipe/targets/objects.py
from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self): return...
from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self): return...
Fix up to date checks for PyTarget
Fix up to date checks for PyTarget
Python
mit
ibab/datapipe
from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self): return...
from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self): return...
<commit_before>from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self):...
from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self): return...
from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self): return...
<commit_before>from ..target import Target import hashlib import dill import joblib class PyTarget(Target): def __init__(self, name, obj=None): self._name = name self._obj = obj super(PyTarget, self).__init__() if not obj is None: self.set(obj) def identifier(self):...
13c0d58f1625c11f041a23ef442c86370cd41f1c
src/ros_sdp/sdp_publisher.py
src/ros_sdp/sdp_publisher.py
import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
Remove tester code in publisher
Remove tester code in publisher
Python
mit
edran/ros_sdp
import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
<commit_before>import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
<commit_before>import os import rospy from std_msgs.msg import String # Don't do this in your code, mkay? :) fib = lambda n: n if n < 2 else fib(n-1) + fib(n-2) class SDPPublisher(object): def __init__(self): self.pub = rospy.Publisher('sdp_ros_fib', String, ...
74fa1bf956952df4cddd7420610475725a473831
userkit/__init__.py
userkit/__init__.py
from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = None users = None invit...
from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager from logs import LogsManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = No...
Add LogsManager to UserKit constructor
Add LogsManager to UserKit constructor
Python
mit
workpail/userkit-python
from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = None users = None invit...
from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager from logs import LogsManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = No...
<commit_before>from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = None users =...
from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager from logs import LogsManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = No...
from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = None users = None invit...
<commit_before>from requestor import Requestor from users import UserManager from invites import InviteManager from emails import EmailManager from session import Session from widget import WidgetManager class UserKit(object): _rq = None api_version = 1.0 api_base_url = None api_key = None users =...
a038657aab5896394ba4e0c8f6b07d2620d5061a
perimeter/management/commands/list_access_tokens.py
perimeter/management/commands/list_access_tokens.py
# -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **options): ...
# -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **options): ...
Fix lingering logging statement in management command
Fix lingering logging statement in management command
Python
mit
yunojuno/django-perimeter,yunojuno/django-perimeter
# -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **options): ...
# -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **options): ...
<commit_before># -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **opt...
# -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **options): ...
# -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **options): ...
<commit_before># -*- coding: utf-8 -*- """Management command to list all active tokens.""" from django.core.management.base import BaseCommand from optparse import make_option from perimeter.models import AccessToken class Command(BaseCommand): help = "List all active tokens." def handle(self, *args, **opt...
221cfd23efde8d0ccc096da57aa95ad44c3a83a0
django/generate_fixtures.py
django/generate_fixtures.py
from django.core.management.base import BaseCommand, CommandError from {{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_models %%}{%% set mod...
from django.core.management.base import BaseCommand, CommandError from {{{ project }}}.{{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_model...
Use proper relative path in django commands file
Use proper relative path in django commands file
Python
apache-2.0
christabor/Skaffold,christabor/Skaffold
from django.core.management.base import BaseCommand, CommandError from {{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_models %%}{%% set mod...
from django.core.management.base import BaseCommand, CommandError from {{{ project }}}.{{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_model...
<commit_before>from django.core.management.base import BaseCommand, CommandError from {{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_models...
from django.core.management.base import BaseCommand, CommandError from {{{ project }}}.{{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_model...
from django.core.management.base import BaseCommand, CommandError from {{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_models %%}{%% set mod...
<commit_before>from django.core.management.base import BaseCommand, CommandError from {{{ app_name }}} import model_factories MAX_RECORDS = 10 class Command(BaseCommand): help = 'Adds all fixture data.' def handle(self, *args, **options): for _ in xrange(MAX_RECORDS):{%% for model_name in all_models...
b01a1c3b03c5d87c3fbf13d06c72849da2bab12e
web/django/emca/urls.py
web/django/emca/urls.py
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch ids (with predic...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch ids (with pred...
Remove admin interface from emca.
Remove admin interface from emca.
Python
apache-2.0
openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch ids (with predic...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch ids (with pred...
<commit_before>from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch i...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch ids (with pred...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch ids (with predic...
<commit_before>from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('emca.views', # test url(r'^$', 'index'), # catmaid url(r'^catmaid/(?P<webargs>\w+/.*)$', 'catmaid'), # fetch i...
d3de354717fdb15d6e883f38d87eba4806fd5cc7
wafer/pages/urls.py
wafer/pages/urls.py
from django.conf.urls import patterns, url, include from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) urlpatterns = p...
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) urlpatterns = patterns( 'wafer.pages.views', url(r'^api/', include(router.urls)), url(r'^(?:(.+)/)?$', '...
Drop index redirect, no longer needed
Drop index redirect, no longer needed
Python
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
from django.conf.urls import patterns, url, include from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) urlpatterns = p...
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) urlpatterns = patterns( 'wafer.pages.views', url(r'^api/', include(router.urls)), url(r'^(?:(.+)/)?$', '...
<commit_before>from django.conf.urls import patterns, url, include from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) ...
from django.conf.urls import patterns, url, include from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) urlpatterns = patterns( 'wafer.pages.views', url(r'^api/', include(router.urls)), url(r'^(?:(.+)/)?$', '...
from django.conf.urls import patterns, url, include from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) urlpatterns = p...
<commit_before>from django.conf.urls import patterns, url, include from django.core.urlresolvers import get_script_prefix from django.views.generic import RedirectView from rest_framework import routers from wafer.pages.views import PageViewSet router = routers.DefaultRouter() router.register(r'pages', PageViewSet) ...
925864a916e5c06b58cac1caa3f2bac5907bbbd3
grader/grader/grade/__init__.py
grader/grader/grade/__init__.py
'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--image', default='...
'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--image', default='...
Fix a flake style issue
Fix a flake style issue
Python
mit
redkyn/grader,grade-it/grader,redkyn/grader
'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--image', default='...
'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--image', default='...
<commit_before>'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--im...
'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--image', default='...
'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--image', default='...
<commit_before>'''TODO: Grade package docs ''' from grader.grade.main import grade from docker import Client help = "Grade assignments" def setup_parser(parser): parser.add_argument('folder', metavar='folder', help='Folder of tarballs or assignment folders.') parser.add_argument('--im...
ea0f0f13b5d91c991e593792eee721f5fb7717b8
core/enso/plugins.py
core/enso/plugins.py
# TODO: Add documentation for this module. import logging import atexit import enso.config _plugins = [] def install( eventManager ): eventManager.registerResponder( _init, "init" ) atexit.register( _shutdown ) def _init(): for moduleName in enso.config.PLUGINS: try: # Import the mo...
# TODO: Add documentation for this module. import logging import enso.config def install( eventManager ): eventManager.registerResponder( _init, "init" ) def _init(): for moduleName in enso.config.PLUGINS: try: # Import the module; most of this code was taken from the # Pytho...
Change to plugin interface: unload() is no longer part of the protocol, and any unloading a plugin needs to do can just be done by registering an atexit handler.
Change to plugin interface: unload() is no longer part of the protocol, and any unloading a plugin needs to do can just be done by registering an atexit handler. git-svn-id: b6fd099cd3d97ba56ca68c4d1ea7aaa6a131ba03@17 8b7adc99-b347-0410-ae0a-d9e86c8d69b5
Python
bsd-3-clause
roderyc/enso,roderyc/enso,roderyc/enso
# TODO: Add documentation for this module. import logging import atexit import enso.config _plugins = [] def install( eventManager ): eventManager.registerResponder( _init, "init" ) atexit.register( _shutdown ) def _init(): for moduleName in enso.config.PLUGINS: try: # Import the mo...
# TODO: Add documentation for this module. import logging import enso.config def install( eventManager ): eventManager.registerResponder( _init, "init" ) def _init(): for moduleName in enso.config.PLUGINS: try: # Import the module; most of this code was taken from the # Pytho...
<commit_before># TODO: Add documentation for this module. import logging import atexit import enso.config _plugins = [] def install( eventManager ): eventManager.registerResponder( _init, "init" ) atexit.register( _shutdown ) def _init(): for moduleName in enso.config.PLUGINS: try: ...
# TODO: Add documentation for this module. import logging import enso.config def install( eventManager ): eventManager.registerResponder( _init, "init" ) def _init(): for moduleName in enso.config.PLUGINS: try: # Import the module; most of this code was taken from the # Pytho...
# TODO: Add documentation for this module. import logging import atexit import enso.config _plugins = [] def install( eventManager ): eventManager.registerResponder( _init, "init" ) atexit.register( _shutdown ) def _init(): for moduleName in enso.config.PLUGINS: try: # Import the mo...
<commit_before># TODO: Add documentation for this module. import logging import atexit import enso.config _plugins = [] def install( eventManager ): eventManager.registerResponder( _init, "init" ) atexit.register( _shutdown ) def _init(): for moduleName in enso.config.PLUGINS: try: ...
013154d359570d591f9315b10c738616d9cddb49
loqusdb/build_models/profile_variant.py
loqusdb/build_models/profile_variant.py
import logging import json from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ if ID CAF exists in INFO column, return the allele frequency for the alt allele. The CAF INFO tag from dbSNP is a Comma delimited li...
import logging from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ Gets the MAF (minor allele frequency) tag from the info field for the variant. Args: variant (cyvcf2.Variant) Retu...
Change from CAF to MAF tag when looking for MAF in vcf file
Change from CAF to MAF tag when looking for MAF in vcf file
Python
mit
moonso/loqusdb
import logging import json from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ if ID CAF exists in INFO column, return the allele frequency for the alt allele. The CAF INFO tag from dbSNP is a Comma delimited li...
import logging from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ Gets the MAF (minor allele frequency) tag from the info field for the variant. Args: variant (cyvcf2.Variant) Retu...
<commit_before>import logging import json from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ if ID CAF exists in INFO column, return the allele frequency for the alt allele. The CAF INFO tag from dbSNP is a Com...
import logging from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ Gets the MAF (minor allele frequency) tag from the info field for the variant. Args: variant (cyvcf2.Variant) Retu...
import logging import json from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ if ID CAF exists in INFO column, return the allele frequency for the alt allele. The CAF INFO tag from dbSNP is a Comma delimited li...
<commit_before>import logging import json from loqusdb.models import ProfileVariant from .variant import get_variant_id LOG = logging.getLogger(__name__) def get_maf(variant): """ if ID CAF exists in INFO column, return the allele frequency for the alt allele. The CAF INFO tag from dbSNP is a Com...
0ab4a593781dea4bf7c2f631a88f906f4aa7e329
swift/obj/dedupe/fp_index.py
swift/obj/dedupe/fp_index.py
__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.execute('''C...
__author__ = 'mjwtom' import sqlite3 import unittest class Fp_Index(object): def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.exec...
Use database to detect the duplication. But the md5 value does not match. Need to add some code here
Use database to detect the duplication. But the md5 value does not match. Need to add some code here
Python
apache-2.0
mjwtom/swift,mjwtom/swift
__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.execute('''C...
__author__ = 'mjwtom' import sqlite3 import unittest class Fp_Index(object): def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.exec...
<commit_before>__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self...
__author__ = 'mjwtom' import sqlite3 import unittest class Fp_Index(object): def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.exec...
__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.execute('''C...
<commit_before>__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self...
e951dde14f65e188118c2eb9e8825d317ada488a
yunity/groups/models.py
yunity/groups/models.py
from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL)
from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL, related_name='gr...
Add related name for group member
Add related name for group member
Python
agpl-3.0
yunity/yunity-core,yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/foodsaving-backend
from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL) Add related name...
from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL, related_name='gr...
<commit_before>from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL) <...
from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL, related_name='gr...
from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL) Add related name...
<commit_before>from django.db.models import TextField, ManyToManyField from yunity.base.base_models import BaseModel, LocationModel from config import settings class Group(BaseModel, LocationModel): name = TextField() description = TextField(null=True) members = ManyToManyField(settings.AUTH_USER_MODEL) <...
f33bd2f80076c192796da5015228d44dce638fee
users/migrations/0002_initial_admin_user.py
users/migrations/0002_initial_admin_user.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the hist...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the hist...
Change default admin email to alex.smith@example.com
Change default admin email to alex.smith@example.com
Python
mit
magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the hist...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the hist...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the hist...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the hist...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth.hashers import make_password def create_users(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. ...
b3525570929ba47c10d9d08696876c39487f7000
test/mitmproxy/contentviews/test_xml_html.py
test/mitmproxy/contentviews/test_xml_html.py
import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')]]) assert ...
import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')]]) assert ...
Fix test_format_xml with dot in path
Fix test_format_xml with dot in path When the path contains dot ".", replacing all dots will generate a non-exist result and raises a FileNotFoundError. Replacing only the last dot fixes this.
Python
mit
ujjwal96/mitmproxy,MatthewShao/mitmproxy,cortesi/mitmproxy,ddworken/mitmproxy,vhaupert/mitmproxy,cortesi/mitmproxy,mitmproxy/mitmproxy,Kriechi/mitmproxy,mhils/mitmproxy,mhils/mitmproxy,xaxa89/mitmproxy,zlorb/mitmproxy,mitmproxy/mitmproxy,ujjwal96/mitmproxy,zlorb/mitmproxy,cortesi/mitmproxy,mhils/mitmproxy,mitmproxy/mit...
import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')]]) assert ...
import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')]]) assert ...
<commit_before>import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')...
import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')]]) assert ...
import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')]]) assert ...
<commit_before>import pytest from mitmproxy.contentviews import xml_html from mitmproxy.test import tutils from . import full_eval data = tutils.test_data.push("mitmproxy/contentviews/test_xml_html_data/") def test_simple(): v = full_eval(xml_html.ViewXmlHtml()) assert v(b"foo") == ('XML', [[('text', 'foo')...
a12c61d5e86f10d0f0b310c9204d56d2defd8f8d
src/monitors/checks/http-get-statuscode/__init__.py
src/monitors/checks/http-get-statuscode/__init__.py
#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return true if no erro...
#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return true if no erro...
Add logging to http-get-statuscode monitor for docs example
Add logging to http-get-statuscode monitor for docs example
Python
unknown
codecakes/cloudroutes-service,dethos/cloudroutes-service,rbramwell/runbook,rbramwell/runbook,dethos/cloudroutes-service,rbramwell/runbook,madflojo/cloudroutes-service,Runbook/runbook,asm-products/cloudroutes-service,codecakes/cloudroutes-service,madflojo/cloudroutes-service,Runbook/runbook,madflojo/cloudroutes-service,...
#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return true if no erro...
#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return true if no erro...
<commit_before>#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return ...
#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return true if no erro...
#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return true if no erro...
<commit_before>#!/usr/bin/python ###################################################################### # Cloud Routes Availability Manager: http-get-statuscode module # ------------------------------------------------------------------ # This is a moduel for performing http get based health checks. # This will return ...
c73d24259a6aa198d749fba097999ba2c18bd6da
website/addons/figshare/settings/defaults.py
website/addons/figshare/settings/defaults.py
API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000
CLIENT_ID = None CLIENT_SECRET = None API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000
Add figshare CLIENT_ID and CLIENT_SECRET back into default settings.
Add figshare CLIENT_ID and CLIENT_SECRET back into default settings. [skip ci]
Python
apache-2.0
mattclark/osf.io,brandonPurvis/osf.io,TomBaxter/osf.io,jnayak1/osf.io,SSJohns/osf.io,revanthkolli/osf.io,kch8qx/osf.io,amyshi188/osf.io,GaryKriebel/osf.io,fabianvf/osf.io,revanthkolli/osf.io,jinluyuan/osf.io,cldershem/osf.io,KAsante95/osf.io,lamdnhan/osf.io,caseyrygt/osf.io,leb2dg/osf.io,HarryRybacki/osf.io,caneruguz/o...
API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000 Add figshare CLIENT_ID and CLIENT_SECRET back into default settings. [skip ci]
CLIENT_ID = None CLIENT_SECRET = None API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000
<commit_before>API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000 <commit_msg>Add figshare CLIENT_ID and CLIENT_SECRET back into default settings. [skip ci]<commit_after>
CLIENT_ID = None CLIENT_SECRET = None API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000
API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000 Add figshare CLIENT_ID and CLIENT_SECRET back into default settings. [skip ci]CLIENT_ID = None CLIENT_SECRET = None API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000
<commit_before>API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_URL + 'my_data/' MAX_RENDER_SIZE = 1000 <commit_msg>Add figshare CLIENT_ID and CLIENT_SECRET back into default settings. [skip ci]<commit_after>CLIENT_ID = None CLIENT_SECRET = None API_URL = 'http://api.figshare.com/v1/' API_OAUTH_URL = API_...
24c5cd9916b7fe81d3a57fc612132a070367756f
challenges/c7.py
challenges/c7.py
from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac455' self._hints = {1: 'Base58 Encoding'} def get_response(self, app): retu...
from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac4556' self._hints = {1: 'Base58 Encoding'} def get_response(self, app): ret...
Fix incorrect hash in URL
Fix incorrect hash in URL
Python
mit
GunshipPenguin/billionaire_challenge,GunshipPenguin/billionaire_challenge
from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac455' self._hints = {1: 'Base58 Encoding'} def get_response(self, app): retu...
from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac4556' self._hints = {1: 'Base58 Encoding'} def get_response(self, app): ret...
<commit_before>from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac455' self._hints = {1: 'Base58 Encoding'} def get_response(self, app...
from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac4556' self._hints = {1: 'Base58 Encoding'} def get_response(self, app): ret...
from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac455' self._hints = {1: 'Base58 Encoding'} def get_response(self, app): retu...
<commit_before>from challenge import Challenge import flask class c7(Challenge): ''' Challenge 7 Satoshi Base58 Encoding ''' def __init__(self): super() self._id = '3aed4348ed11e6adf1b54885b297078070ac455' self._hints = {1: 'Base58 Encoding'} def get_response(self, app...
e81e25f1d97ef4f141e392bda736aaa6a37aadf5
chatbot/botui.py
chatbot/botui.py
import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor def bot_ui(): data_file = os.path.join(PROJECT_ROOT, 'Data', 'Corpus', 'basic_conv.txt') td = TokenizedData(seq_lengt...
import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def bot_ui(): dict_file = os.path.join(PROJECT_ROOT, 'Data', 'Result', 'dicts.pi...
Optimize the UI and allow the user to exit the program smoothly.
Optimize the UI and allow the user to exit the program smoothly.
Python
apache-2.0
bshao001/ChatLearner,bshao001/ChatLearner,bshao001/ChatLearner,bshao001/ChatLearner
import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor def bot_ui(): data_file = os.path.join(PROJECT_ROOT, 'Data', 'Corpus', 'basic_conv.txt') td = TokenizedData(seq_lengt...
import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def bot_ui(): dict_file = os.path.join(PROJECT_ROOT, 'Data', 'Result', 'dicts.pi...
<commit_before>import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor def bot_ui(): data_file = os.path.join(PROJECT_ROOT, 'Data', 'Corpus', 'basic_conv.txt') td = Tokenize...
import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def bot_ui(): dict_file = os.path.join(PROJECT_ROOT, 'Data', 'Result', 'dicts.pi...
import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor def bot_ui(): data_file = os.path.join(PROJECT_ROOT, 'Data', 'Corpus', 'basic_conv.txt') td = TokenizedData(seq_lengt...
<commit_before>import numpy as np import os import sys import tensorflow as tf from settings import PROJECT_ROOT from chatbot.tokenizeddata import TokenizedData from chatbot.botpredictor import BotPredictor def bot_ui(): data_file = os.path.join(PROJECT_ROOT, 'Data', 'Corpus', 'basic_conv.txt') td = Tokenize...
66a68261fcc67abe7f87885edb5ff5b5ead68a45
diylang/evaluator.py
diylang/evaluator.py
# -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, and the focus for...
# -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, \ is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, and the foc...
Break line in long line of imports.
Break line in long line of imports.
Python
bsd-3-clause
kvalle/diy-lang,kvalle/diy-lisp,kvalle/diy-lang,kvalle/diy-lisp,codecop/diy-lang,codecop/diy-lang
# -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, and the focus for...
# -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, \ is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, and the foc...
<commit_before># -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, an...
# -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, \ is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, and the foc...
# -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, and the focus for...
<commit_before># -*- coding: utf-8 -*- from .types import Environment, DiyLangError, Closure, String from .ast import is_boolean, is_atom, is_symbol, is_list, is_closure, is_integer, is_string from .parser import unparse """ This is the Evaluator module. The `evaluate` function below is the heart of your language, an...
d7bd0ff21a32806459dcb45cea9c1d1faacc0f51
scraper/fedtext/spiders/tutorial_spider.py
scraper/fedtext/spiders/tutorial_spider.py
import scrapy from bs4 import BeautifulSoup from bs4.element import Comment class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if the element text is visible (in the ren...
import scrapy from bs4 import BeautifulSoup from bs4.element import Comment from fedtext.items import FedTextItem class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if ...
Use a faster parser for bs4
Use a faster parser for bs4
Python
cc0-1.0
khandelwal/fedtext
import scrapy from bs4 import BeautifulSoup from bs4.element import Comment class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if the element text is visible (in the ren...
import scrapy from bs4 import BeautifulSoup from bs4.element import Comment from fedtext.items import FedTextItem class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if ...
<commit_before>import scrapy from bs4 import BeautifulSoup from bs4.element import Comment class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if the element text is visi...
import scrapy from bs4 import BeautifulSoup from bs4.element import Comment from fedtext.items import FedTextItem class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if ...
import scrapy from bs4 import BeautifulSoup from bs4.element import Comment class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if the element text is visible (in the ren...
<commit_before>import scrapy from bs4 import BeautifulSoup from bs4.element import Comment class TutorialSpider(scrapy.Spider): name = "tutorialspider" allowed_domains = ['*.gov'] start_urls = ['http://www.recreation.gov'] def visible(self, element): """ Return True if the element text is visi...
a2bcee39ae1b40848bdddefb1b5d5ed05b847c55
mysite/search/tasks/__init__.py
mysite/search/tasks/__init__.py
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
Add a task to grab GNOME love bugs.
Add a task to grab GNOME love bugs.
Python
agpl-3.0
sudheesh001/oh-mainline,openhatch/oh-mainline,Changaco/oh-mainline,campbe13/openhatch,onceuponatimeforever/oh-mainline,onceuponatimeforever/oh-mainline,eeshangarg/oh-mainline,nirmeshk/oh-mainline,eeshangarg/oh-mainline,onceuponatimeforever/oh-mainline,sudheesh001/oh-mainline,mzdaniel/oh-mainline,nirmeshk/oh-mainline,wi...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
<commit_before>from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta(days=1) de...
<commit_before>from datetime import timedelta from mysite.search.models import Project from celery.task import PeriodicTask from celery.registry import tasks from mysite.search.launchpad_crawl import grab_lp_bugs, lpproj2ohproj import mysite.customs.miro class GrabLaunchpadBugs(PeriodicTask): run_every = timedelta...
155952fa8db51184314f1922bb2f041bfdefcaa7
harp/settings/production.py
harp/settings/production.py
from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise ImproperlyConfigur...
from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise ImproperlyConfigur...
Change static to new webfaction application
Change static to new webfaction application
Python
mit
msampaio/harpa,msampaio/harpa,msampaio/harpa
from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise ImproperlyConfigur...
from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise ImproperlyConfigur...
<commit_before>from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise Imp...
from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise ImproperlyConfigur...
from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise ImproperlyConfigur...
<commit_before>from __future__ import absolute_import from .base import * import json from django.core.exceptions import ImproperlyConfigured def get_secret(): try: with open(join(DJANGO_ROOT, "serverconf.json")) as conf_file: return json.load(conf_file) except KeyError: raise Imp...
fe2fdd17dcf05e7464e9b5cdeccbf7e884c0ee38
cob/subsystems/models_subsystem.py
cob/subsystems/models_subsystem.py
import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): database_uri = os....
import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): env_override = os....
Make COB_DATABASE_URI environment variable override existing settings
Make COB_DATABASE_URI environment variable override existing settings
Python
bsd-3-clause
getweber/weber-cli
import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): database_uri = os....
import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): env_override = os....
<commit_before>import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): dat...
import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): env_override = os....
import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): database_uri = os....
<commit_before>import os import logbook from .base import SubsystemBase from ..ctx import context from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy _logger = logbook.Logger(__name__) class ModelsSubsystem(SubsystemBase): NAME = 'models' def activate(self, flask_app): dat...
b4687eb7fda33323cad8d42f9819a3ee223d3822
web/config/local_settings.py
web/config/local_settings.py
import os from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') if os.getenv("MEMCACHE_HOSTS"): CLUSTER_SERVERS = ...
import os import json, requests from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') elif os.getenv("RANCHER_GRAPHITE_...
Add graphite cluster discovery support using rancher
Add graphite cluster discovery support using rancher
Python
apache-2.0
Banno/graphite-setup,Banno/graphite-setup,Banno/graphite-setup
import os from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') if os.getenv("MEMCACHE_HOSTS"): CLUSTER_SERVERS = ...
import os import json, requests from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') elif os.getenv("RANCHER_GRAPHITE_...
<commit_before>import os from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') if os.getenv("MEMCACHE_HOSTS"): CLU...
import os import json, requests from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') elif os.getenv("RANCHER_GRAPHITE_...
import os from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') if os.getenv("MEMCACHE_HOSTS"): CLUSTER_SERVERS = ...
<commit_before>import os from datetime import datetime LOG_DIR = '/var/log/graphite' if os.getenv("CARBONLINK_HOSTS"): CARBONLINK_HOSTS = os.getenv("CARBONLINK_HOSTS").split(',') if os.getenv("CLUSTER_SERVERS"): CLUSTER_SERVERS = os.getenv("CLUSTER_SERVERS").split(',') if os.getenv("MEMCACHE_HOSTS"): CLU...
1c482edbc29d008a8de9a0762c1a85027de083cc
src/spz/test/test_views.py
src/spz/test/test_views.py
# -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources from util.build_assets import build_assets @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources() build_as...
# -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources() yield client def test_startpage(client): asse...
Remove build_assets from test since test client will neither interprete css nor javascript
Remove build_assets from test since test client will neither interprete css nor javascript
Python
mit
spz-signup/spz-signup
# -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources from util.build_assets import build_assets @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources() build_as...
# -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources() yield client def test_startpage(client): asse...
<commit_before># -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources from util.build_assets import build_assets @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources(...
# -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources() yield client def test_startpage(client): asse...
# -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources from util.build_assets import build_assets @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources() build_as...
<commit_before># -*- coding: utf-8 -*- """Tests the application views. """ import pytest from spz import app from util.init_db import recreate_tables, insert_resources from util.build_assets import build_assets @pytest.fixture def client(): client = app.test_client() recreate_tables() insert_resources(...
0808e3f5897028a1f174e21200870e4be6fcad11
apps/quotes/admin.py
apps/quotes/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text', 'timestamp', '...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text', 'timestamp', '...
Make broadcast editable for now.
Make broadcast editable for now.
Python
apache-2.0
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text', 'timestamp', '...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text', 'timestamp', '...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text',...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text', 'timestamp', '...
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text', 'timestamp', '...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from .models import Quote class QuoteAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('text', ('timestamp', 'subject'),)}), ('Metadata', {'fields': ('creator', 'broadcast', 'game')}) ) list_display = ['text',...
4a6449b806dc755fe3f9d18966c0420da2a4d0fc
devito/dle/manipulation.py
devito/dle/manipulation.py
import cgen as c from devito.codeprinter import ccode from devito.nodes import Element, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l = list(nodes) ...
from sympy import Eq from devito.codeprinter import ccode from devito.nodes import Expression, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l = list(...
Use Expression, not Element, in copy_arrays
dle: Use Expression, not Element, in copy_arrays
Python
mit
opesci/devito,opesci/devito
import cgen as c from devito.codeprinter import ccode from devito.nodes import Element, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l = list(nodes) ...
from sympy import Eq from devito.codeprinter import ccode from devito.nodes import Expression, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l = list(...
<commit_before>import cgen as c from devito.codeprinter import ccode from devito.nodes import Element, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l...
from sympy import Eq from devito.codeprinter import ccode from devito.nodes import Expression, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l = list(...
import cgen as c from devito.codeprinter import ccode from devito.nodes import Element, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l = list(nodes) ...
<commit_before>import cgen as c from devito.codeprinter import ccode from devito.nodes import Element, Iteration from devito.visitors import MergeOuterIterations __all__ = ['compose_nodes', 'copy_arrays'] def compose_nodes(nodes): """Build an Iteration/Expression tree by nesting the nodes in ``nodes``.""" l...
ed0d2f78bee4c7082be99683d2905e308f526d0c
diapason/dub.py
diapason/dub.py
""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg',) if coding_f...
""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg', 'vorbis') if...
Allow converting WAV to vorbis as well
Allow converting WAV to vorbis as well
Python
bsd-3-clause
Soundphy/diapason
""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg',) if coding_f...
""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg', 'vorbis') if...
<commit_before>""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg',) ...
""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg', 'vorbis') if...
""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg',) if coding_f...
<commit_before>""" Dub module that can be used when ffmpeg is available to deal with different audio formats. """ from io import BytesIO from pydub import AudioSegment def convert_wav(wav, coding_format='mpeg', **kwargs): """ Convert a WAV file to other formats. """ assert coding_format in ('mpeg',) ...
20c6c985ea5f27a7badb18ecd7f6e6e6c4e250a0
avocado/export/__init__.py
avocado/export/__init__.py
from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv') registry.reg...
from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv') registry.reg...
Disable registration of the HTML exporter for now
Disable registration of the HTML exporter for now
Python
bsd-2-clause
murphyke/avocado,murphyke/avocado,murphyke/avocado,murphyke/avocado
from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv') registry.reg...
from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv') registry.reg...
<commit_before>from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv...
from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv') registry.reg...
from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv') registry.reg...
<commit_before>from avocado.core import loader from avocado.conf import OPTIONAL_DEPS from _csv import CSVExporter from _sas import SASExporter from _r import RExporter from _json import JSONExporter from _html import HTMLExporter registry = loader.Registry(register_instance=False) registry.register(CSVExporter, 'csv...
01daa7448260552113aa68f18c215c192e95324e
editorsnotes/auth/forms.py
editorsnotes/auth/forms.py
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def clean_email(self): # Since User.email is u...
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from rest_framework.authtoken.models import Token from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def...
Allow tokens to be created/changed on profile settings page
Allow tokens to be created/changed on profile settings page
Python
agpl-3.0
editorsnotes/editorsnotes,editorsnotes/editorsnotes
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def clean_email(self): # Since User.email is u...
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from rest_framework.authtoken.models import Token from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def...
<commit_before>from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def clean_email(self): # Since ...
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from rest_framework.authtoken.models import Token from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def...
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def clean_email(self): # Since User.email is u...
<commit_before>from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from .models import User, Project class ENUserCreationForm(UserCreationForm): class Meta: model = User fields = ('email', 'display_name') def clean_email(self): # Since ...
8c1b2f1fc71be754898bf962306c325538a589bf
contentdensity/textifai/views.py
contentdensity/textifai/views.py
from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for the text input p...
from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for the text input p...
Add view definition for the general-insights page
Add view definition for the general-insights page
Python
mit
CS326-important/space-deer,CS326-important/space-deer
from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for the text input p...
from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for the text input p...
<commit_before>from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for t...
from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for the text input p...
from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for the text input p...
<commit_before>from django.shortcuts import render from .models import User, Text, Insight, Comment # Create your views here. def index(request): """ View function for the homepage of the site """ return render(request, 'index.html', context={}) def textinput(request): """ View function for t...
0bbfa67be217b603ee551aac0098eca2e74f43f0
.bin/scripts/current_track.py
.bin/scripts/current_track.py
import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split(" ") if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: pri...
import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(...
Fix bug in current track
Fix bug in current track
Python
mit
iAmMrinal0/dotfiles,iAmMrinal0/dotfiles
import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split(" ") if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: pri...
import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(...
<commit_before>import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split(" ") if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: ...
import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split() if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: print(...
import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split(" ") if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: pri...
<commit_before>import subprocess def main(): st = subprocess.getoutput("mpc") lin = st.split("\n") if len(lin) > 1: sn_status = lin[1] duration = lin[1].split(" ") if "paused" in sn_status: print(lin[0].split("-")[-1] + " [paused]") elif "playing" in sn_status: ...
34df666a20b6dba1f84af63e640a8d1058f131a8
exam/asserts.py
exam/asserts.py
IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVANT) def __...
IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVANT) def __...
Use repr for assert failure
Use repr for assert failure
Python
mit
Fluxx/exam,gterzian/exam,Fluxx/exam,gterzian/exam
IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVANT) def __...
IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVANT) def __...
<commit_before>IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVA...
IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVANT) def __...
IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVANT) def __...
<commit_before>IRRELEVANT = object() class ChangeWatcher(object): def __init__(self, thing, *args, **kwargs): self.thing = thing self.args = args self.kwargs = kwargs self.expected_before = kwargs.pop('before', IRRELEVANT) self.expected_after = kwargs.pop('after', IRRELEVA...
046ab8fc0f60b15ccdafcbb549c7de894ecd064e
putio_cli/commands/base.py
putio_cli/commands/base.py
"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options def run(self): raise NotImplementedError( 'You must implement the run() method yourself!') class BaseClient(B...
"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options class BaseClient(Base): """A base client command.""" def __init__(self, options): # update options from config file ...
Remove run method (useless) in Base class
Remove run method (useless) in Base class
Python
mit
jlejeune/putio-cli
"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options def run(self): raise NotImplementedError( 'You must implement the run() method yourself!') class BaseClient(B...
"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options class BaseClient(Base): """A base client command.""" def __init__(self, options): # update options from config file ...
<commit_before>"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options def run(self): raise NotImplementedError( 'You must implement the run() method yourself!') cla...
"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options class BaseClient(Base): """A base client command.""" def __init__(self, options): # update options from config file ...
"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options def run(self): raise NotImplementedError( 'You must implement the run() method yourself!') class BaseClient(B...
<commit_before>"""The base command.""" import ConfigParser import os import putiopy class Base(object): """A base command.""" def __init__(self, options): self.options = options def run(self): raise NotImplementedError( 'You must implement the run() method yourself!') cla...
101bcd388745cc790408c39b74ceaa11062bebbf
treeherder/client/setup.py
treeherder/client/setup.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, description=...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, description=...
Set author to 'Mozilla Automation and Testing Team'
Set author to 'Mozilla Automation and Testing Team'
Python
mpl-2.0
tojonmz/treeherder,avih/treeherder,edmorley/treeherder,sylvestre/treeherder,KWierso/treeherder,deathping1994/treeherder,tojonmz/treeherder,avih/treeherder,moijes12/treeherder,rail/treeherder,rail/treeherder,KWierso/treeherder,gbrmachado/treeherder,wlach/treeherder,avih/treeherder,parkouss/treeherder,deathping1994/treeh...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, description=...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, description=...
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, ...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, description=...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, description=...
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from setuptools import setup version = '1.0' setup(name='treeherder-client', version=version, ...
4e306441cbfab5f56eaedcd9af8f71f84e40467c
tests/pytests/unit/states/test_makeconf.py
tests/pytests/unit/states/test_makeconf.py
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the variable is in the `...
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the variable is in the `...
Move makeconf state tests to pytest
Move makeconf state tests to pytest
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the variable is in the `...
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the variable is in the `...
<commit_before>""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the varia...
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the variable is in the `...
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the variable is in the `...
<commit_before>""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.makeconf as makeconf from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {makeconf: {}} def test_present(): """ Test to verify that the varia...
859722fea0ed205c1af37c43c211d2f2855d22fc
fonts/create.py
fonts/create.py
import fontforge fontforge.open('input.otf').save('termu.sfd')
import fontforge font = fontforge.open('input.otf') font.fontname = 'Termu-' + font.fontname font.familyname = 'Termu: ' + font.familyname font.fullname = 'Termu: ' + font.fullname font.save('termu.sfd')
Add "termu" to the name of the font
Add "termu" to the name of the font
Python
mit
CoderPuppy/cc-emu,CoderPuppy/cc-emu,CoderPuppy/cc-emu
import fontforge fontforge.open('input.otf').save('termu.sfd') Add "termu" to the name of the font
import fontforge font = fontforge.open('input.otf') font.fontname = 'Termu-' + font.fontname font.familyname = 'Termu: ' + font.familyname font.fullname = 'Termu: ' + font.fullname font.save('termu.sfd')
<commit_before>import fontforge fontforge.open('input.otf').save('termu.sfd') <commit_msg>Add "termu" to the name of the font<commit_after>
import fontforge font = fontforge.open('input.otf') font.fontname = 'Termu-' + font.fontname font.familyname = 'Termu: ' + font.familyname font.fullname = 'Termu: ' + font.fullname font.save('termu.sfd')
import fontforge fontforge.open('input.otf').save('termu.sfd') Add "termu" to the name of the fontimport fontforge font = fontforge.open('input.otf') font.fontname = 'Termu-' + font.fontname font.familyname = 'Termu: ' + font.familyname font.fullname = 'Termu: ' + font.fullname font.save('termu.sfd')
<commit_before>import fontforge fontforge.open('input.otf').save('termu.sfd') <commit_msg>Add "termu" to the name of the font<commit_after>import fontforge font = fontforge.open('input.otf') font.fontname = 'Termu-' + font.fontname font.familyname = 'Termu: ' + font.familyname font.fullname = 'Termu: ' + font.fullnam...
53add68f6ceb1f326f8162a361cf442b741d7470
app/__init__.py
app/__init__.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() lm = LoginManager() oauth = OAuth() def create_app(config_name): app = Flask(__name__) app.config.from_object(config[config...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oauth = OAuth() lm = LoginManager() lm.login_view = "views.login" from app.models import User @lm.user_loader def load_user(id): ...
Set user loader and login view
Set user loader and login view
Python
mit
Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() lm = LoginManager() oauth = OAuth() def create_app(config_name): app = Flask(__name__) app.config.from_object(config[config...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oauth = OAuth() lm = LoginManager() lm.login_view = "views.login" from app.models import User @lm.user_loader def load_user(id): ...
<commit_before>from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() lm = LoginManager() oauth = OAuth() def create_app(config_name): app = Flask(__name__) app.config.from_objec...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() oauth = OAuth() lm = LoginManager() lm.login_view = "views.login" from app.models import User @lm.user_loader def load_user(id): ...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() lm = LoginManager() oauth = OAuth() def create_app(config_name): app = Flask(__name__) app.config.from_object(config[config...
<commit_before>from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_oauthlib.client import OAuth from config import config db = SQLAlchemy() lm = LoginManager() oauth = OAuth() def create_app(config_name): app = Flask(__name__) app.config.from_objec...
2ed812ddc50bd262aadd74e01f24c8346d7ec8f7
scripts/fix_country_ids.py
scripts/fix_country_ids.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. import json import os file_dest = os.path.abspath( os.path.join(os.path.dirname(__file__), '../data/countries.json')) replacements = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. # # Not all the SU_A3 IDs match those used in the ISO_A3 standard. This script replaces non-matching IDs # with corresponding ISO_A3 values...
Add more details about issue being fixed
Add more details about issue being fixed
Python
mit
elaOnMars/d3-geomap,yaph/d3-geomap,elaOnMars/d3-geomap,elaOnMars/d3-geomap,yaph/d3-geomap
#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. import json import os file_dest = os.path.abspath( os.path.join(os.path.dirname(__file__), '../data/countries.json')) replacements = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. # # Not all the SU_A3 IDs match those used in the ISO_A3 standard. This script replaces non-matching IDs # with corresponding ISO_A3 values...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. import json import os file_dest = os.path.abspath( os.path.join(os.path.dirname(__file__), '../data/countries.json')) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. # # Not all the SU_A3 IDs match those used in the ISO_A3 standard. This script replaces non-matching IDs # with corresponding ISO_A3 values...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. import json import os file_dest = os.path.abspath( os.path.join(os.path.dirname(__file__), '../data/countries.json')) replacements = ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Fix some iso3 IDs that are wrong in ne_10m_admin_0_countries_lakes.shp, # ne_10m_admin_1_states_provinces_lakes.shp seems ok though. import json import os file_dest = os.path.abspath( os.path.join(os.path.dirname(__file__), '../data/countries.json')) ...
bbe5494df123a2173200669768f4297578aea23b
cms/djangoapps/contentstore/views/xblock.py
cms/djangoapps/contentstore/views/xblock.py
""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_type, uri): # py...
""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_type, uri): # py...
Fix XBlock class loading in local resource view
Fix XBlock class loading in local resource view Some XBlock classes were being (randomly) incorrectly loaded. This was due to an error in the way the XBlock.load_class method was called. Error was happening randomly because of the cache mechanism in the class loading method. (see PLUGIN_CACHE)
Python
agpl-3.0
itsjeyd/edx-platform,vikas1885/test1,ovnicraft/edx-platform,gymnasium/edx-platform,chand3040/cloud_that,zadgroup/edx-platform,solashirai/edx-platform,JCBarahona/edX,Ayub-Khan/edx-platform,don-github/edx-platform,MakeHer/edx-platform,jamesblunt/edx-platform,martynovp/edx-platform,SivilTaram/edx-platform,mcgachey/edx-pla...
""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_type, uri): # py...
""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_type, uri): # py...
<commit_before>""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_ty...
""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_type, uri): # py...
""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_type, uri): # py...
<commit_before>""" Views dedicated to rendering xblocks. """ from __future__ import absolute_import import logging import mimetypes from xblock.core import XBlock from django.conf import settings from django.http import Http404, HttpResponse log = logging.getLogger(__name__) def xblock_resource(request, block_ty...
b38a55302540507c43f56ed9c9c6c55d3ea7be8f
backend/websocket_server.py
backend/websocket_server.py
import thread import json from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.sendMessage(answ...
import thread import json import time from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.send...
Fix high cpu usage through sleep
Fix high cpu usage through sleep
Python
mit
HPI-Hackathon/cartets,HPI-Hackathon/cartets,HPI-Hackathon/cartets
import thread import json from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.sendMessage(answ...
import thread import json import time from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.send...
<commit_before>import thread import json from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.s...
import thread import json import time from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.send...
import thread import json from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.sendMessage(answ...
<commit_before>import thread import json from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer from game import Game def client_thread(game, conn, data): player = game.add_player(conn, data) while True: answer_data = game.wait_for_answer(player) if answer_data: conn.s...
c00b673a03d1f52b0b92d0fec96a16ffc4985fd8
go/apps/urls.py
go/apps/urls.py
from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', include('go....
from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', include('go....
Add template path and URLs.
Add template path and URLs.
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', include('go....
from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', include('go....
<commit_before>from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', ...
from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', include('go....
from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', include('go....
<commit_before>from django.conf.urls.defaults import patterns, url, include urlpatterns = patterns('', url(r'^survey/', include('go.apps.surveys.urls', namespace='survey')), url(r'^multi_survey/', include('go.apps.multi_surveys.urls', namespace='multi_survey')), url(r'^bulk_message/', ...
0137d5440f86a8f1424598beea4468ae8c68f985
demos/dlgr/demos/iterated_drawing/models.py
demos/dlgr/demos/iterated_drawing/models.py
from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): """Define th...
from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): """Define th...
Comment explaining random.choice() on 1-item list
Comment explaining random.choice() on 1-item list
Python
mit
Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger
from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): """Define th...
from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): """Define th...
<commit_before>from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): ...
from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): """Define th...
from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): """Define th...
<commit_before>from dallinger.nodes import Source import random import base64 import os import json class DrawingSource(Source): """A Source that reads in a random image from a file and transmits it.""" __mapper_args__ = { "polymorphic_identity": "drawing_source" } def _contents(self): ...
b5fc8db375e7273fb3b7cbb2318f57f141e25045
src/commoner/profiles/models.py
src/commoner/profiles/models.py
import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) nickname = m...
import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) nickname = m...
Allow the photo to be blank.
Allow the photo to be blank.
Python
agpl-3.0
cc-archive/commoner,cc-archive/commoner
import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) nickname = m...
import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) nickname = m...
<commit_before>import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) ...
import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) nickname = m...
import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) nickname = m...
<commit_before>import urlparse from django.db import models from django.db.models import permalink from django.core.urlresolvers import reverse from django.contrib.auth.models import User from commoner.util import getBaseURL class CommonerProfile(models.Model): user = models.ForeignKey(User, unique=True) ...
fc94ac89d2f602c381f4c882ec963995f3ce3043
cla_frontend/apps/core/context_processors.py
cla_frontend/apps/core/context_processors.py
from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site'] or '' } i...
from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site'] or '', 'so...
Make socketio server url a global context variable in Django
Make socketio server url a global context variable in Django
Python
mit
ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend
from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site'] or '' } i...
from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site'] or '', 'so...
<commit_before>from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site']...
from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site'] or '', 'so...
from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site'] or '' } i...
<commit_before>from django.conf import settings def globals(request): context = { 'app_title': 'Civil Legal Advice', 'proposition_title': 'Civil Legal Advice', 'phase': 'alpha', 'product_type': 'service', 'feedback_url': '#', 'ga_id': '', 'raven_config_site': settings.RAVEN_CONFIG['site']...
552996b1c135d17f14752e098e1d305d2971611a
follower/fetch_timeline.py
follower/fetch_timeline.py
#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRET_KEY = os.envi...
#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRET_KEY = os.env...
Add empty line after imports
[R] Add empty line after imports
Python
mit
suchkultur/trumpeltier
#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRET_KEY = os.envi...
#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRET_KEY = os.env...
<commit_before>#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRE...
#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRET_KEY = os.env...
#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRET_KEY = os.envi...
<commit_before>#!/usr/bin/env python3 """ Follow the white house rabbit This fetches tweets from an user and prints the full json output from the api. """ import os import sys import json from twython import Twython from twython import TwythonError CONSUMER_KEY = os.environ.get('TWITTER_CONSUMER_KEY') CONSUMER_SECRE...
bbc0b5df6bd43588f3c85c1031d3efd4eb1ec6a7
tests/panels/test_cache.py
tests/panels/test_cache.py
# coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() self.pa...
# coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() self.pa...
Fix the number of cache calls expected in a test.
Fix the number of cache calls expected in a test.
Python
bsd-3-clause
spookylukey/django-debug-toolbar,megcunningham/django-debug-toolbar,spookylukey/django-debug-toolbar,ChristosChristofidis/django-debug-toolbar,sidja/django-debug-toolbar,peap/django-debug-toolbar,calvinpy/django-debug-toolbar,sidja/django-debug-toolbar,calvinpy/django-debug-toolbar,megcunningham/django-debug-toolbar,pe...
# coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() self.pa...
# coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() self.pa...
<commit_before># coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() ...
# coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() self.pa...
# coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() self.pa...
<commit_before># coding: utf-8 from __future__ import absolute_import, unicode_literals import django from django.core import cache from django.utils.unittest import skipIf from ..base import BaseTestCase class CachePanelTestCase(BaseTestCase): def setUp(self): super(CachePanelTestCase, self).setUp() ...