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
785a9cccafab36ef1eb49d9379aed9aef2f0f87f
tools/dataset_rst.py
tools/dataset_rst.py
#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path import join import...
#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path import join import...
Update tools script for file renaming
ENH: Update tools script for file renaming
Python
bsd-3-clause
kiyoto/statsmodels,yl565/statsmodels,edhuckle/statsmodels,Averroes/statsmodels,huongttlan/statsmodels,saketkc/statsmodels,hlin117/statsmodels,alekz112/statsmodels,waynenilsen/statsmodels,yarikoptic/pystatsmodels,bzero/statsmodels,wkfwkf/statsmodels,Averroes/statsmodels,alekz112/statsmodels,Averroes/statsmodels,huongttl...
#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path import join import...
#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path import join import...
<commit_before>#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path imp...
#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path import join import...
#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path import join import...
<commit_before>#! /usr/bin/env python """ Run this script to convert dataset documentation to ReST files. Relies on the meta-information from the datasets of the currently installed version. Ie., it imports the datasets package to scrape the meta-information. """ import statsmodels.api as sm import os from os.path imp...
e985163d189883a2419e34021971709c9c7498c0
request/__init__.py
request/__init__.py
__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/'
__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, Jannis Leidel (jezdez), krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/'
Add jezdez to the authors
Add jezdez to the authors
Python
bsd-2-clause
gnublade/django-request,kylef/django-request,kylef/django-request,kylef/django-request,gnublade/django-request,gnublade/django-request
__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/' Add jezdez to the authors
__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, Jannis Leidel (jezdez), krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/'
<commit_before>__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/' <commit_msg>Add jezdez to the authors<commit_after>
__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, Jannis Leidel (jezdez), krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/'
__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/' Add jezdez to the authors__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Full...
<commit_before>__version__ = 0.23 __copyright__ = 'Copyright (c) 2009, Kyle Fuller' __licence__ = 'BSD' __author__ = 'Kyle Fuller <inbox@kylefuller.co.uk>, krisje8 <krisje8@gmail.com>' __URL__ = 'http://kylefuller.co.uk/project/django-request/' <commit_msg>Add jezdez to the authors<commit_after>__version__ = 0.23 __cop...
5881436bea688ee49175192452dec18fad4ba9b2
airflow/executors/__init__.py
airflow/executors/__init__.py
import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor # TODO Fix this emergency fix try: from airflow.executors.celery_executor import...
import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor from airflow.utils import AirflowException _EXECUTOR = configuration.get('core', 'E...
Remove hack by only importing when configured
Remove hack by only importing when configured
Python
apache-2.0
asnir/airflow,DEVELByte/incubator-airflow,yati-sagade/incubator-airflow,OpringaoDoTurno/airflow,yk5/incubator-airflow,spektom/incubator-airflow,owlabs/incubator-airflow,preete-dixit-ck/incubator-airflow,malmiron/incubator-airflow,alexvanboxel/airflow,wndhydrnt/airflow,bolkedebruin/airflow,dhuang/incubator-airflow,ledsu...
import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor # TODO Fix this emergency fix try: from airflow.executors.celery_executor import...
import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor from airflow.utils import AirflowException _EXECUTOR = configuration.get('core', 'E...
<commit_before>import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor # TODO Fix this emergency fix try: from airflow.executors.celery_...
import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor from airflow.utils import AirflowException _EXECUTOR = configuration.get('core', 'E...
import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor # TODO Fix this emergency fix try: from airflow.executors.celery_executor import...
<commit_before>import logging from airflow import configuration from airflow.executors.base_executor import BaseExecutor from airflow.executors.local_executor import LocalExecutor from airflow.executors.sequential_executor import SequentialExecutor # TODO Fix this emergency fix try: from airflow.executors.celery_...
3036533d25ce9955568efb4ba119d6e32af78ace
fabfile.py
fabfile.py
from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['80.169.183.93'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '.git*', '.DS_Sto...
from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['146.185.132.96'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '.git*', '.DS_St...
Use new IP in deployment
Use new IP in deployment
Python
mit
persand/helloper,persand/helloper.com,persand/helloper,persand/helloper.com,persand/helloper,persand/helloper.com
from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['80.169.183.93'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '.git*', '.DS_Sto...
from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['146.185.132.96'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '.git*', '.DS_St...
<commit_before>from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['80.169.183.93'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '....
from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['146.185.132.96'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '.git*', '.DS_St...
from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['80.169.183.93'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '.git*', '.DS_Sto...
<commit_before>from __future__ import with_statement import os.path from fabric.api import * from fabric.contrib.project import * env.user = 'root' env.hosts = ['80.169.183.93'] env.remote_dir = '/mnt/persist/www/helloper.com' def deploy(where=None): rsync_project( env.remote_dir, 'dist/', ['.git', '....
04085c781621b47cfd47632531341fa7b2e9a956
raven/contrib/django/apps.py
raven/contrib/django/apps.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven.contrib.django' verbose_name = 'Raven'
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven_contrib_django' verbose_name = 'Raven'
Remove periods in label value
Remove periods in label value Fixes https://github.com/getsentry/raven-python/issues/594
Python
bsd-3-clause
hzy/raven-python,hzy/raven-python,percipient/raven-python,smarkets/raven-python,lepture/raven-python,johansteffner/raven-python,Photonomie/raven-python,akalipetis/raven-python,recht/raven-python,ewdurbin/raven-python,someonehan/raven-python,dbravender/raven-python,ronaldevers/raven-python,smarkets/raven-python,johanste...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven.contrib.django' verbose_name = 'Raven' Remove periods in label value Fixes https://github.com/getsentry/raven-python/issues/594
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven_contrib_django' verbose_name = 'Raven'
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven.contrib.django' verbose_name = 'Raven' <commit_msg>Remove periods in label value Fixes https://github.com/getsentry/ra...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven_contrib_django' verbose_name = 'Raven'
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven.contrib.django' verbose_name = 'Raven' Remove periods in label value Fixes https://github.com/getsentry/raven-python/issues/594# -*- ...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from django.apps import AppConfig class RavenConfig(AppConfig): name = 'raven.contrib.django' label = 'raven.contrib.django' verbose_name = 'Raven' <commit_msg>Remove periods in label value Fixes https://github.com/getsentry/ra...
1e62898d02ae5187ce078a2bb699eefd6bc184ef
s2v2.py
s2v2.py
from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_records2(my_csv) ...
from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row # print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_records2(my_csv...
Comment out print statements for total number of ties
Comment out print statements for total number of ties
Python
mit
alexmilesyounger/ds_basics
from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_records2(my_csv) ...
from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row # print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_records2(my_csv...
<commit_before>from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_re...
from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row # print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_records2(my_csv...
from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_records2(my_csv) ...
<commit_before>from s2v1 import * def number_of_records(data_sample): return len(data_sample) number_of_ties = number_of_records(data_from_csv) - 1 # minus header row print(number_of_ties, "ties in our data sample") def number_of_records2(data_sample): return data_sample.size number_of_ties_my_csv = number_of_re...
4a5bc9439840db3197610d67a5ad885849e8312b
urls.py
urls.py
from django.conf.urls import patterns, include, url from contact.views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), )
from django.conf.urls import patterns, include, url from .views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), )
Update for more generic url pattern and import
Update for more generic url pattern and import
Python
mit
brob/simple-django-contact
from django.conf.urls import patterns, include, url from contact.views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), ) Update for more generic url pattern and import
from django.conf.urls import patterns, include, url from .views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), )
<commit_before>from django.conf.urls import patterns, include, url from contact.views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), ) <commit_msg>Update for more generic url pattern and import<commit_after>
from django.conf.urls import patterns, include, url from .views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), )
from django.conf.urls import patterns, include, url from contact.views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), ) Update for more generic url pattern and importfrom django.conf.urls import patterns, include, url from .views import contactForm urlpatterns = patterns('', ur...
<commit_before>from django.conf.urls import patterns, include, url from contact.views import contactForm urlpatterns = patterns('', url(r'^contact/$', contactForm), ) <commit_msg>Update for more generic url pattern and import<commit_after>from django.conf.urls import patterns, include, url from .views import cont...
093e51ea520400faef4f2f64f926135786b652a3
src/serve.py
src/serve.py
""" Transit Status """ from flask import Flask, render_template import json import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', stops = json.dumps(se...
""" Transit Status """ from flask import Flask, render_template import json import mlb_schedule import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', s...
Add endpoint for getting today's Giants game
Add endpoint for getting today's Giants game
Python
mit
albertyw/wilo,albertyw/wilo,albertyw/wilo,albertyw/wilo,albertyw/wilo
""" Transit Status """ from flask import Flask, render_template import json import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', stops = json.dumps(se...
""" Transit Status """ from flask import Flask, render_template import json import mlb_schedule import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', s...
<commit_before>""" Transit Status """ from flask import Flask, render_template import json import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', stops ...
""" Transit Status """ from flask import Flask, render_template import json import mlb_schedule import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', s...
""" Transit Status """ from flask import Flask, render_template import json import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', stops = json.dumps(se...
<commit_before>""" Transit Status """ from flask import Flask, render_template import json import settings app = Flask(__name__) app.debug = settings.DEBUG @app.route("/") def root(): wifi = {'WIFI_NAME': settings.WIFI_NAME, 'WIFI_PASSWORD': settings.WIFI_PASSWORD} return render_template('home.html', stops ...
5ac310b7c5cee4a8c5f247ae117fda17fc4cb61a
pypocketexplore/jobs.py
pypocketexplore/jobs.py
from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep def extract_topic_items(topic): db = MongoClient(MONGO_URI).get_default_database() resp = req.get('http://localhost:5000/api/topic/{}'.format(topic)) da...
from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep from redis import StrictRedis import rq def extract_topic_items(topic): r = StrictRedis() def topic_in_queue(topic): q = rq.Queue('topics', connec...
Fix bug to avoid duplicating topics
Fix bug to avoid duplicating topics
Python
mit
Florents-Tselai/PyPocketExplore
from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep def extract_topic_items(topic): db = MongoClient(MONGO_URI).get_default_database() resp = req.get('http://localhost:5000/api/topic/{}'.format(topic)) da...
from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep from redis import StrictRedis import rq def extract_topic_items(topic): r = StrictRedis() def topic_in_queue(topic): q = rq.Queue('topics', connec...
<commit_before>from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep def extract_topic_items(topic): db = MongoClient(MONGO_URI).get_default_database() resp = req.get('http://localhost:5000/api/topic/{}'.format...
from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep from redis import StrictRedis import rq def extract_topic_items(topic): r = StrictRedis() def topic_in_queue(topic): q = rq.Queue('topics', connec...
from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep def extract_topic_items(topic): db = MongoClient(MONGO_URI).get_default_database() resp = req.get('http://localhost:5000/api/topic/{}'.format(topic)) da...
<commit_before>from datetime import datetime import requests as req from pymongo import MongoClient from pypocketexplore.config import MONGO_URI from time import sleep def extract_topic_items(topic): db = MongoClient(MONGO_URI).get_default_database() resp = req.get('http://localhost:5000/api/topic/{}'.format...
edec2186f5a83789a5d6a5dbd112c9ff716c3d46
src/python/datamodels/output_models.py
src/python/datamodels/output_models.py
import hashlib class Store(object): def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.location.zipcode, self.location.coords) class Customer(object): def __init__(self): self.id = None ...
import hashlib class Store(object): """ Record for stores. id -- integer name -- string location -- ZipcodeRecord """ def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.loca...
Add docstrings to output models
Add docstrings to output models
Python
apache-2.0
rnowling/bigpetstore-data-generator,rnowling/bigpetstore-data-generator,rnowling/bigpetstore-data-generator
import hashlib class Store(object): def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.location.zipcode, self.location.coords) class Customer(object): def __init__(self): self.id = None ...
import hashlib class Store(object): """ Record for stores. id -- integer name -- string location -- ZipcodeRecord """ def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.loca...
<commit_before>import hashlib class Store(object): def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.location.zipcode, self.location.coords) class Customer(object): def __init__(self): ...
import hashlib class Store(object): """ Record for stores. id -- integer name -- string location -- ZipcodeRecord """ def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.loca...
import hashlib class Store(object): def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.location.zipcode, self.location.coords) class Customer(object): def __init__(self): self.id = None ...
<commit_before>import hashlib class Store(object): def __init__(self): self.id = None self.name = None self.location = None def __repr__(self): return "%s,%s,%s" % (self.name, self.location.zipcode, self.location.coords) class Customer(object): def __init__(self): ...
fb4aa211f64ed6fdc0443d03dd02dc52fc882978
server/dummy/dummy_server.py
server/dummy/dummy_server.py
#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stream.read(length)...
#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stream.read(length)...
Clean up and refactor printing of request
Clean up and refactor printing of request
Python
mit
jonspeicher/Puddle,jonspeicher/Puddle,jonspeicher/Puddle
#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stream.read(length)...
#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stream.read(length)...
<commit_before>#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stre...
#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stream.read(length)...
#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stream.read(length)...
<commit_before>#!/usr/bin/env python import BaseHTTPServer ServerClass = BaseHTTPServer.HTTPServer RequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler SERVER_NAME = '' SERVER_PORT = 9000 class JsonPostResponder(RequestHandlerClass): def _get_content_from_stream(self, length, stream): return stre...
abe46e145114805a2ad69c27f601b5da3f5e9959
api/armory_service.py
api/armory_service.py
import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_dir_root = os.e...
import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_dir_root = os.e...
Refactor Armory API to use UnsignedTransaction class
Refactor Armory API to use UnsignedTransaction class
Python
agpl-3.0
achamely/omniwallet,Nevtep/omniwallet,OmniLayer/omniwallet,habibmasuro/omniwallet,Nevtep/omniwallet,habibmasuro/omniwallet,VukDukic/omniwallet,habibmasuro/omniwallet,OmniLayer/omniwallet,OmniLayer/omniwallet,achamely/omniwallet,achamely/omniwallet,VukDukic/omniwallet,VukDukic/omniwallet,Nevtep/omniwallet,achamely/omniw...
import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_dir_root = os.e...
import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_dir_root = os.e...
<commit_before>import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_...
import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_dir_root = os.e...
import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_dir_root = os.e...
<commit_before>import urlparse import os, sys, re, random,pybitcointools, bitcoinrpc, math from decimal import Decimal from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) data_...
3e3f7b827e226146ec7d3efe523f1f900ac4e99a
sjconfparts/type.py
sjconfparts/type.py
class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '.join(list_objec...
class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '.join(list_objec...
Allow “enabled“, “enable”, “disabled“, “disable” as boolean values
Allow “enabled“, “enable”, “disabled“, “disable” as boolean values
Python
lgpl-2.1
SmartJog/sjconf,SmartJog/sjconf
class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '.join(list_objec...
class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '.join(list_objec...
<commit_before>class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '....
class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '.join(list_objec...
class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '.join(list_objec...
<commit_before>class Type: @classmethod def str_to_list(xcls, str_object): list = map(str.strip, str_object.split(',')) try: list.remove('') except ValueError: pass return list @classmethod def list_to_str(xcls, list_object): return ', '....
ba0a4aff1ea21670712b35061570805e62bb4159
Instanssi/admin_blog/forms.py
Instanssi/admin_blog/forms.py
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEntryForm, self)._...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEntryForm, self)._...
Add date field to edit form.
admin_blog: Add date field to edit form.
Python
mit
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEntryForm, self)._...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEntryForm, self)._...
<commit_before># -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEnt...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEntryForm, self)._...
# -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEntryForm, self)._...
<commit_before># -*- coding: utf-8 -*- from django import forms from uni_form.helper import FormHelper from uni_form.layout import Submit, Layout, Fieldset, ButtonHolder from Instanssi.ext_blog.models import BlogEntry class BlogEntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BlogEnt...
1c2e17e31c00a52661706a3c90efbb3c93d6fbef
app/initialization.py
app/initialization.py
import sys import os import shutil import composer import configuration import downloader def run(): project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if len(sys.argv) == 2: project_dir = sys.argv[1] os.chdir(execution_dir) p...
import sys import os import shutil import composer import configuration import downloader def run(): try: project_dir = configuration.get_value('project-dir') except: project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if le...
Fix issue with duplicated call
Fix issue with duplicated call
Python
mit
mi-schi/php-code-checker
import sys import os import shutil import composer import configuration import downloader def run(): project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if len(sys.argv) == 2: project_dir = sys.argv[1] os.chdir(execution_dir) p...
import sys import os import shutil import composer import configuration import downloader def run(): try: project_dir = configuration.get_value('project-dir') except: project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if le...
<commit_before>import sys import os import shutil import composer import configuration import downloader def run(): project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if len(sys.argv) == 2: project_dir = sys.argv[1] os.chdir(execut...
import sys import os import shutil import composer import configuration import downloader def run(): try: project_dir = configuration.get_value('project-dir') except: project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if le...
import sys import os import shutil import composer import configuration import downloader def run(): project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if len(sys.argv) == 2: project_dir = sys.argv[1] os.chdir(execution_dir) p...
<commit_before>import sys import os import shutil import composer import configuration import downloader def run(): project_dir = os.getcwd()+'/' execution_dir = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]+'/' if len(sys.argv) == 2: project_dir = sys.argv[1] os.chdir(execut...
b9fcd270f520f49fcbe85bcbc53940326f556fdf
Lib/test/test_import.py
Lib/test/test_import.py
from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, "b =", b f.clos...
from test_support import TESTFN import os import random import sys sys.path.insert(0, os.curdir) source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print ...
Insert the current directory to the front of sys.path -- and remove it at the end. This fixes a problem where
Insert the current directory to the front of sys.path -- and remove it at the end. This fixes a problem where python Lib/test/test_import.py failed while "make test" succeeded.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, "b =", b f.clos...
from test_support import TESTFN import os import random import sys sys.path.insert(0, os.curdir) source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print ...
<commit_before>from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, ...
from test_support import TESTFN import os import random import sys sys.path.insert(0, os.curdir) source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print ...
from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, "b =", b f.clos...
<commit_before>from test_support import TESTFN import os import random source = TESTFN + ".py" pyc = TESTFN + ".pyc" pyo = TESTFN + ".pyo" f = open(source, "w") print >> f, "# This will test Python's ability to import a .py file" a = random.randrange(1000) b = random.randrange(1000) print >> f, "a =", a print >> f, ...
2951520fab9f213322584327c9e5841fe13fc993
tests/run.py
tests/run.py
#! /usr/bin/env python3 import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12 'djang...
import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12 'django.contrib.contenttypes',...
Remove unnecessary Python 3 declaration.
Remove unnecessary Python 3 declaration.
Python
bsd-2-clause
incuna/incuna-auth,incuna/incuna-auth,ghickman/incuna-auth,ghickman/incuna-auth
#! /usr/bin/env python3 import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12 'djang...
import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12 'django.contrib.contenttypes',...
<commit_before>#! /usr/bin/env python3 import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12...
import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12 'django.contrib.contenttypes',...
#! /usr/bin/env python3 import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12 'djang...
<commit_before>#! /usr/bin/env python3 import sys from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( INSTALLED_APPS=( # Put contenttypes before auth to work around test issue. # See: https://code.djangoproject.com/ticket/10827#comment:12...
8edd3879c87727b7d6b0808227d32d9bd3072c90
server/resources.py
server/resources.py
from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lectures = Lecture.query.filter(Lecture.id == lecture_id).all() if not db_lectures: abort(404, message="Lecture {} does n...
from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: abort(404, message="Lecture {} does n...
Use first() when querying one lecture from DB
Use first() when querying one lecture from DB
Python
mit
MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS
from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lectures = Lecture.query.filter(Lecture.id == lecture_id).all() if not db_lectures: abort(404, message="Lecture {} does n...
from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: abort(404, message="Lecture {} does n...
<commit_before>from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lectures = Lecture.query.filter(Lecture.id == lecture_id).all() if not db_lectures: abort(404, message="Le...
from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: abort(404, message="Lecture {} does n...
from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lectures = Lecture.query.filter(Lecture.id == lecture_id).all() if not db_lectures: abort(404, message="Lecture {} does n...
<commit_before>from flask_restful import Resource, Api, abort from .models import Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lectures = Lecture.query.filter(Lecture.id == lecture_id).all() if not db_lectures: abort(404, message="Le...
00aad9bc179aa4a090f703db9669e8ba49ff8f3c
bibliopixel/main/arguments.py
bibliopixel/main/arguments.py
from .. project import project """Common command line arguments for run and demo.""" def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.add_argument( '-l', '--layout', default='matrix', ...
import json from .. project import project """Common command line arguments for run and demo.""" COMPONENTS = 'driver', 'layout', 'animation' def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.ad...
Allow json in component flags.
Allow json in component flags.
Python
mit
ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel
from .. project import project """Common command line arguments for run and demo.""" def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.add_argument( '-l', '--layout', default='matrix', ...
import json from .. project import project """Common command line arguments for run and demo.""" COMPONENTS = 'driver', 'layout', 'animation' def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.ad...
<commit_before>from .. project import project """Common command line arguments for run and demo.""" def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.add_argument( '-l', '--layout', defau...
import json from .. project import project """Common command line arguments for run and demo.""" COMPONENTS = 'driver', 'layout', 'animation' def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.ad...
from .. project import project """Common command line arguments for run and demo.""" def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.add_argument( '-l', '--layout', default='matrix', ...
<commit_before>from .. project import project """Common command line arguments for run and demo.""" def add_to_parser(parser): parser.add_argument( '-d', '--driver', default='simpixel', help='Default driver type if no driver is specified') parser.add_argument( '-l', '--layout', defau...
618bcd64fa23e1bd8868c06ce38e30b7ef47b7e1
bin/create_traveltime_data.py
bin/create_traveltime_data.py
#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitystation, ...
#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitystation, ...
Fix create missing station data function arguments
Fix create missing station data function arguments
Python
mit
bartromgens/nsmaps,bartromgens/nsmaps,bartromgens/nsmaps
#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitystation, ...
#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitystation, ...
<commit_before>#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitys...
#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitystation, ...
#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitystation, ...
<commit_before>#!/usr/bin/env python3 import sys import os sys.path.append('../nsmaps') import nsmaps from nsmaps.station import StationType DATA_DIR = './website/nsmaps-data' MAX_STATIONS = 60 def main(): stations = nsmaps.station.Stations(DATA_DIR) major_station_types = ( StationType.intercitys...
5b9e2849c6ee49d68968fdc2588fefd5a25e7bac
contrib/migrateticketmodel.py
contrib/migrateticketmodel.py
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
Fix missing import in contrib script added in [2630].
Fix missing import in contrib script added in [2630]. git-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@2631 af82e41b-90c4-0310-8c96-b1721e28e2e2
Python
bsd-3-clause
rbaumg/trac,rbaumg/trac,rbaumg/trac,rbaumg/trac
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
<commit_before>#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # chan...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed to the more...
<commit_before>#!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # chan...
97ffd9f5271ffb93b04da06866591f6e6650d76b
bluebottle/settings/travis.py
bluebottle/settings/travis.py
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, }
# NOTE: local.py must be an empty file when using this configuration. from .defaults import * # Put the travis-ci environment specific overrides below. SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME...
Fix Travis config so that the test run.
Fix Travis config so that the test run.
Python
bsd-3-clause
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, } Fix Travis config so that the test run.
# NOTE: local.py must be an empty file when using this configuration. from .defaults import * # Put the travis-ci environment specific overrides below. SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME...
<commit_before>SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, } <commit_msg>Fix Travis config so that the test run.<commit_after>
# NOTE: local.py must be an empty file when using this configuration. from .defaults import * # Put the travis-ci environment specific overrides below. SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME...
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, } Fix Travis config so that the test run.# NOTE: local.py must be an empty file when using this configuration. from .defaults impor...
<commit_before>SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q==' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, } <commit_msg>Fix Travis config so that the test run.<commit_after># NOTE: local.py must be an empty file when using ...
802d030087d7f15add5ccfa5d305555632575642
changes/jobs/cleanup_tasks.py
changes/jobs/cleanup_tasks.py
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=6...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount, incr from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(min...
Add counter for cleanup tasks not following the decorator
Add counter for cleanup tasks not following the decorator
Python
apache-2.0
bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=6...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount, incr from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(min...
<commit_before>from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = time...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount, incr from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(min...
from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = timedelta(minutes=6...
<commit_before>from __future__ import absolute_import from datetime import datetime, timedelta from changes.config import queue from changes.constants import Status from changes.experimental.stats import RCount from changes.models import Task from changes.queue.task import TrackedTask, tracked_task CHECK_TIME = time...
c69b9519c2984154dd15d31395d9590e00d689b5
allauth/socialaccount/providers/trello/provider.py
allauth/socialaccount/providers/trello/provider.py
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OAuthProvider): ...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OAuthProvider): ...
Use 'scope' in TrelloProvider auth params. Allows overriding from django settings.
feat(TrelloProvider): Use 'scope' in TrelloProvider auth params. Allows overriding from django settings.
Python
mit
lukeburden/django-allauth,rsalmaso/django-allauth,lukeburden/django-allauth,bittner/django-allauth,rsalmaso/django-allauth,pennersr/django-allauth,bittner/django-allauth,bittner/django-allauth,pennersr/django-allauth,lukeburden/django-allauth,pennersr/django-allauth,rsalmaso/django-allauth
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OAuthProvider): ...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OAuthProvider): ...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OA...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OAuthProvider): ...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OAuthProvider): ...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider class TrelloAccount(ProviderAccount): def get_profile_url(self): return None def get_avatar_url(self): return None class TrelloProvider(OA...
b6db7abfd59a1b97fbb4d1b867e3316c029c94ff
spec/Report_S06_spec.py
spec/Report_S06_spec.py
from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', # 'spec/data/S06_empty.xml' ] self.report = [] for data_...
from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', 'spec/data/S06_with_error.xml', # 'spec/data/S06_empty.xml' ]...
TEST for correct an with errors S06 report
TEST for correct an with errors S06 report
Python
agpl-3.0
gisce/primestg
from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', # 'spec/data/S06_empty.xml' ] self.report = [] for data_...
from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', 'spec/data/S06_with_error.xml', # 'spec/data/S06_empty.xml' ]...
<commit_before>from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', # 'spec/data/S06_empty.xml' ] self.report = [] ...
from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', 'spec/data/S06_with_error.xml', # 'spec/data/S06_empty.xml' ]...
from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', # 'spec/data/S06_empty.xml' ] self.report = [] for data_...
<commit_before>from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S06 example'): with before.all: self.data_filenames = [ 'spec/data/S06.xml', # 'spec/data/S06_empty.xml' ] self.report = [] ...
a2c13df57f2db1721c656200c1c37cf0e52b22c9
dashboard/views.py
dashboard/views.py
# -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequired403Mixin fr...
# -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequired403Mixin fr...
Add dashboard sort clauses: first name and id
Add dashboard sort clauses: first name and id I have seen the dashboard sorting be inconsistent. Last name then first name then id should produce a consistent and predictable sort order.
Python
bsd-2-clause
cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy
# -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequired403Mixin fr...
# -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequired403Mixin fr...
<commit_before># -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequ...
# -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequired403Mixin fr...
# -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequired403Mixin fr...
<commit_before># -*- coding: utf-8 -*- from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.urls import reverse from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from babybuddy.mixins import PermissionRequ...
d7ea1e9c7728b5e98e6c798ab3d5ef5b9066463c
barrage/basetestcases.py
barrage/basetestcases.py
from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False if not p...
from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False if not p...
Fix a bug with application stdout print
Fix a bug with application stdout print
Python
mit
vnetserg/barrage
from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False if not p...
from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False if not p...
<commit_before>from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False ...
from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False if not p...
from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False if not p...
<commit_before>from .baselauncher import BaseLauncher class BaseTestCases(BaseLauncher): def handle_problem_set(self, name, problems): for i, prob in enumerate(problems): answer_got = self.get_answer(prob, name, i, len(problems)) if not answer_got: return False ...
8a6bc4a46141b42d4457fdc4d63df234f788253d
django_nose/plugin.py
django_nose/plugin.py
class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult object. """...
import sys class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult objec...
Allow coverage to work and keep stdout and be activated before initial imports.
Allow coverage to work and keep stdout and be activated before initial imports.
Python
bsd-3-clause
aristiden7o/django-nose,harukaeru/django-nose,disqus/django-nose,dgladkov/django-nose,mzdaniel/django-nose,sociateru/django-nose,krinart/django-nose,alexhayes/django-nose,daineX/django-nose,harukaeru/django-nose,mzdaniel/django-nose,Deepomatic/django-nose,krinart/django-nose,fabiosantoscode/django-nose-123-fix,alexhaye...
class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult object. """...
import sys class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult objec...
<commit_before> class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult ...
import sys class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult objec...
class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult object. """...
<commit_before> class ResultPlugin(object): """ Captures the TestResult object for later inspection. nose doesn't return the full test result object from any of its runner methods. Pass an instance of this plugin to the TestProgram and use ``result`` after running the tests to get the TestResult ...
9c037ed3ebe7353b419562311bbc1f07875ab358
django_su/forms.py
django_su/forms.py
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): user = forms.ModelChoiceField( label=_('Users'), queryset=get_user_model()._default_manager.order_by( ...
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): username_field = get_user_model().USERNAME_FIELD user = forms.ModelChoiceField( label=_('Users'), que...
Update UserSuForm to enhance compatibility with custom user models.
Update UserSuForm to enhance compatibility with custom user models. In custom user models, we cannot rely on there being a 'username' field. Instead, we should use whichever field has been specified as the username field.
Python
mit
adamcharnock/django-su,PetrDlouhy/django-su,adamcharnock/django-su,PetrDlouhy/django-su
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): user = forms.ModelChoiceField( label=_('Users'), queryset=get_user_model()._default_manager.order_by( ...
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): username_field = get_user_model().USERNAME_FIELD user = forms.ModelChoiceField( label=_('Users'), que...
<commit_before># -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): user = forms.ModelChoiceField( label=_('Users'), queryset=get_user_model()._default_manager...
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): username_field = get_user_model().USERNAME_FIELD user = forms.ModelChoiceField( label=_('Users'), que...
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): user = forms.ModelChoiceField( label=_('Users'), queryset=get_user_model()._default_manager.order_by( ...
<commit_before># -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from . import get_user_model class UserSuForm(forms.Form): user = forms.ModelChoiceField( label=_('Users'), queryset=get_user_model()._default_manager...
f100faade749d86597e1c8c52b88d55261e7a4dc
suorganizer/wsgi.py
suorganizer/wsgi.py
""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import Dj...
Use WhiteNoise for static content.
Ch29: Use WhiteNoise for static content.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import Dj...
<commit_before>""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setde...
""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import Dj...
""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
<commit_before>""" WSGI config for suorganizer project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setde...
4412a59bfe8228698e5b5bbe8bb21c8e8a70d357
test/functional/feature_shutdown.py
test/functional/feature_shutdown.py
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
Remove race between connecting and shutdown on separate connections
qa: Remove race between connecting and shutdown on separate connections
Python
mit
fujicoin/fujicoin,myriadteam/myriadcoin,apoelstra/bitcoin,prusnak/bitcoin,namecoin/namecore,midnightmagic/bitcoin,jamesob/bitcoin,fujicoin/fujicoin,pataquets/namecoin-core,r8921039/bitcoin,lateminer/bitcoin,DigitalPandacoin/pandacoin,Sjors/bitcoin,sipsorcery/bitcoin,bitcoin/bitcoin,AkioNak/bitcoin,bespike/litecoin,part...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework fr...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind shutdown.""" from test_framework.test_framework import BitcoinTestFramework fr...
b455b545779836e6fb2ff69717e6b0a26e23e2cc
mopidy/utils/path.py
mopidy/utils/path.py
import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder def get_or_cre...
import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder def get_or_cre...
Add helper for finding files in folder
Add helper for finding files in folder
Python
apache-2.0
priestd09/mopidy,pacificIT/mopidy,kingosticks/mopidy,rawdlite/mopidy,woutervanwijk/mopidy,jcass77/mopidy,dbrgn/mopidy,diandiankan/mopidy,abarisain/mopidy,mopidy/mopidy,adamcik/mopidy,pacificIT/mopidy,hkariti/mopidy,swak/mopidy,mokieyue/mopidy,dbrgn/mopidy,jmarsik/mopidy,bencevans/mopidy,jcass77/mopidy,dbrgn/mopidy,jmar...
import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder def get_or_cre...
import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder def get_or_cre...
<commit_before>import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder ...
import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder def get_or_cre...
import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder def get_or_cre...
<commit_before>import logging import os import sys import urllib logger = logging.getLogger('mopidy.utils.path') def get_or_create_folder(folder): folder = os.path.expanduser(folder) if not os.path.isdir(folder): logger.info(u'Creating dir %s', folder) os.mkdir(folder, 0755) return folder ...
8ae27080b8ff9fe124733005a8006261a3d22266
migrate/crud/versions/001_create_initial_tables.py
migrate/crud/versions/001_create_initial_tables.py
from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=False), Col...
from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=False), Col...
Fix some of the schema.
Fix some of the schema.
Python
bsd-3-clause
mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen,mikeboers/Nitrogen
from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=False), Col...
from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=False), Col...
<commit_before>from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=...
from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=False), Col...
from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=False), Col...
<commit_before>from sqlalchemy import * from migrate import * metadata = MetaData() table = Table('crud_versions', metadata, Column('id', Integer, primary_key=True), Column('object_type', Text, nullable=False), Column('object_id', Integer, nullable=False), Column('commit_time', DateTime, nullable=...
c535d9e105284bb469d10003ee0f5533b8d8d5db
auditlog/__openerp__.py
auditlog/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
Add OCA as author of OCA addons
Add OCA as author of OCA addons In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association.
Python
agpl-3.0
brain-tec/server-tools,bmya/server-tools,bmya/server-tools,brain-tec/server-tools,brain-tec/server-tools,bmya/server-tools
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the te...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 ABF OSIELL (<http://osiell.com>). # # This program is free software: you can redistribute it and/or modify # it under the te...
f7a9074f7096b820b5342108560b90efce619405
tests/test_histogram.py
tests/test_histogram.py
import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) self.benc...
import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) self.benc...
Use whatever is default open mode.
Use whatever is default open mode.
Python
bsd-2-clause
thedrow/pytest-benchmark,aldanor/pytest-benchmark,SectorLabs/pytest-benchmark,ionelmc/pytest-benchmark
import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) self.benc...
import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) self.benc...
<commit_before>import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) ...
import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) self.benc...
import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) self.benc...
<commit_before>import logging import json import py from fields import Namespace from pytest_benchmark.plugin import BenchmarkSession class MockSession(BenchmarkSession): def __init__(self): self.histogram = True me = py.path.local(__file__) self.storage = me.dirpath(me.purebasename) ...
5b94ce3796eb37301f2ac6928bfe0a0426bcf31e
docs/config/all.py
docs/config/all.py
# Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout t...
# Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout t...
Update docs versions for 2.x
Update docs versions for 2.x
Python
mit
cakephp/chronos
# Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout t...
# Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout t...
<commit_before># Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other plac...
# Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout t...
# Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout t...
<commit_before># Global configuration information used across all the # translations of documentation. # # Import the base theme configuration from cakephpsphinx.config.all import * # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other plac...
90ef9d9a8c5b02d32868da1236ea063f6abd7cd0
src/sentry/api/serializers/models/auditlogentry.py
src/sentry/api/serializers/models/auditlogentry.py
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry @register(AuditLogEntry) class AuditLogEntrySerializer(Serializer): def get_attrs(self, item_list, user): # TODO(dcramer); assert on relations ...
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry def fix(data): # There was a point in time where full Team objects # got serialized into our AuditLogEntry.data, so these # values need to be strip...
Expand AuditLogEntry serializer to return back all of the data
feat(api): Expand AuditLogEntry serializer to return back all of the data Fixes GH-6521
Python
bsd-3-clause
ifduyue/sentry,ifduyue/sentry,mvaled/sentry,mvaled/sentry,looker/sentry,mvaled/sentry,ifduyue/sentry,looker/sentry,gencer/sentry,gencer/sentry,ifduyue/sentry,mvaled/sentry,gencer/sentry,mvaled/sentry,looker/sentry,beeftornado/sentry,beeftornado/sentry,ifduyue/sentry,looker/sentry,gencer/sentry,gencer/sentry,beeftornado...
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry @register(AuditLogEntry) class AuditLogEntrySerializer(Serializer): def get_attrs(self, item_list, user): # TODO(dcramer); assert on relations ...
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry def fix(data): # There was a point in time where full Team objects # got serialized into our AuditLogEntry.data, so these # values need to be strip...
<commit_before>from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry @register(AuditLogEntry) class AuditLogEntrySerializer(Serializer): def get_attrs(self, item_list, user): # TODO(dcramer); assert on...
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry def fix(data): # There was a point in time where full Team objects # got serialized into our AuditLogEntry.data, so these # values need to be strip...
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry @register(AuditLogEntry) class AuditLogEntrySerializer(Serializer): def get_attrs(self, item_list, user): # TODO(dcramer); assert on relations ...
<commit_before>from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register, serialize from sentry.models import AuditLogEntry @register(AuditLogEntry) class AuditLogEntrySerializer(Serializer): def get_attrs(self, item_list, user): # TODO(dcramer); assert on...
91acec032abeb942bf90d6522a4d9d38ad624d46
tests/test_buffs.py
tests/test_buffs.py
import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) self.assertEqual...
import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) self.assertEqual...
Test for the BeneficialBuff class
Test for the BeneficialBuff class
Python
mit
Enether/python_wow
import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) self.assertEqual...
import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) self.assertEqual...
<commit_before>import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) s...
import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) self.assertEqual...
import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) self.assertEqual...
<commit_before>import unittest from buffs import * class StatusEffectTests(unittest.TestCase): """ StatusEffect is the base class for buffs """ def test_init(self): test_name = 'testman' test_duration = 10 st_ef = StatusEffect(name=test_name, duration=test_duration) s...
c90fd7d026cdeeff7d073c1d15ff550cc937f961
dusty/daemon.py
dusty/daemon.py
import sys import logging from .preflight import preflight_check from .notifier import notify def configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def main(): notify('Dusty initializing...') configure_logging() preflight_check() if __n...
import os import sys import logging import socket from .preflight import preflight_check from .notifier import notify SOCKET_PATH = '/var/run/dusty/dusty.sock' def _configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def _clean_up_existing_socket(): ...
Set up a Unix socket we can use for input
Set up a Unix socket we can use for input
Python
mit
gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty
import sys import logging from .preflight import preflight_check from .notifier import notify def configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def main(): notify('Dusty initializing...') configure_logging() preflight_check() if __n...
import os import sys import logging import socket from .preflight import preflight_check from .notifier import notify SOCKET_PATH = '/var/run/dusty/dusty.sock' def _configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def _clean_up_existing_socket(): ...
<commit_before>import sys import logging from .preflight import preflight_check from .notifier import notify def configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def main(): notify('Dusty initializing...') configure_logging() preflight_...
import os import sys import logging import socket from .preflight import preflight_check from .notifier import notify SOCKET_PATH = '/var/run/dusty/dusty.sock' def _configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def _clean_up_existing_socket(): ...
import sys import logging from .preflight import preflight_check from .notifier import notify def configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def main(): notify('Dusty initializing...') configure_logging() preflight_check() if __n...
<commit_before>import sys import logging from .preflight import preflight_check from .notifier import notify def configure_logging(): logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.captureWarnings(True) def main(): notify('Dusty initializing...') configure_logging() preflight_...
9a74f11d4adfafbddec2e86251ecef17c4196bf2
tests/test_suite.py
tests/test_suite.py
#! /usr/bin/env python from __future__ import absolute_import import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. """ loader = unittest.TestLoader() suite = unittest.TestSuite() suite.addTest(loader.loadTestsFromModule(unittest_neos...
#! /usr/bin/env python """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. Returns: True if all tests are successful. """ loader = unittest.TestLoader() sui...
Fix a bug to return error status code when tests are failed.
Fix a bug to return error status code when tests are failed.
Python
mit
TrishGillett/pysdpt3glue,discardthree/PySDPT3glue,TrishGillett/pysdpt3glue,discardthree/PySDPT3glue,TrishGillett/pysdpt3glue
#! /usr/bin/env python from __future__ import absolute_import import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. """ loader = unittest.TestLoader() suite = unittest.TestSuite() suite.addTest(loader.loadTestsFromModule(unittest_neos...
#! /usr/bin/env python """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. Returns: True if all tests are successful. """ loader = unittest.TestLoader() sui...
<commit_before>#! /usr/bin/env python from __future__ import absolute_import import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. """ loader = unittest.TestLoader() suite = unittest.TestSuite() suite.addTest(loader.loadTestsFromModul...
#! /usr/bin/env python """ Test suite. """ from __future__ import absolute_import import sys import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. Returns: True if all tests are successful. """ loader = unittest.TestLoader() sui...
#! /usr/bin/env python from __future__ import absolute_import import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. """ loader = unittest.TestLoader() suite = unittest.TestSuite() suite.addTest(loader.loadTestsFromModule(unittest_neos...
<commit_before>#! /usr/bin/env python from __future__ import absolute_import import unittest from . import unittest_neos from . import unittest_sedumi_writer def main(): """ The main function. """ loader = unittest.TestLoader() suite = unittest.TestSuite() suite.addTest(loader.loadTestsFromModul...
6430785e60fcef9bbac3cf4e7c70981f5af6affa
fluent_contents/plugins/sharedcontent/models.py
fluent_contents/plugins/sharedcontent/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField class SharedContent(TranslatableModel): """ The parent hosting object for shared content """ ...
from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField, ContentItemRelation class SharedContent(TranslatableModel): """ The parent hosting object for sha...
Add ContentItemRelation to SharedContent model
Add ContentItemRelation to SharedContent model Displays objects in the admin delete screen.
Python
apache-2.0
jpotterm/django-fluent-contents,django-fluent/django-fluent-contents,django-fluent/django-fluent-contents,ixc/django-fluent-contents,edoburu/django-fluent-contents,jpotterm/django-fluent-contents,django-fluent/django-fluent-contents,pombredanne/django-fluent-contents,jpotterm/django-fluent-contents,pombredanne/django-f...
from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField class SharedContent(TranslatableModel): """ The parent hosting object for shared content """ ...
from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField, ContentItemRelation class SharedContent(TranslatableModel): """ The parent hosting object for sha...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField class SharedContent(TranslatableModel): """ The parent hosting object for shared co...
from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField, ContentItemRelation class SharedContent(TranslatableModel): """ The parent hosting object for sha...
from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField class SharedContent(TranslatableModel): """ The parent hosting object for shared content """ ...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ from parler.models import TranslatableModel, TranslatedFields from fluent_contents.models import ContentItem, PlaceholderField class SharedContent(TranslatableModel): """ The parent hosting object for shared co...
fc21802b68cf9a907218dab5b0e22cd8f1dc75d0
djcelery/backends/database.py
djcelery/backends/database.py
from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" def _store_result(self, task_id, result, status, traceback=None): """Store return value ...
from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" TaskModel = TaskMeta TaskSetModel = TaskSetMeta def _store_result(self, task_id, result,...
Make it possible to override the models used to store task/taskset state
DatabaseBackend: Make it possible to override the models used to store task/taskset state
Python
bsd-3-clause
Amanit/django-celery,kanemra/django-celery,axiom-data-science/django-celery,celery/django-celery,alexhayes/django-celery,digimarc/django-celery,tkanemoto/django-celery,iris-edu-int/django-celery,CloudNcodeInc/django-celery,Amanit/django-celery,CloudNcodeInc/django-celery,iris-edu-int/django-celery,CloudNcodeInc/django-...
from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" def _store_result(self, task_id, result, status, traceback=None): """Store return value ...
from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" TaskModel = TaskMeta TaskSetModel = TaskSetMeta def _store_result(self, task_id, result,...
<commit_before>from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" def _store_result(self, task_id, result, status, traceback=None): """Stor...
from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" TaskModel = TaskMeta TaskSetModel = TaskSetMeta def _store_result(self, task_id, result,...
from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" def _store_result(self, task_id, result, status, traceback=None): """Store return value ...
<commit_before>from celery.backends.base import BaseDictBackend from djcelery.models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """The database backends. Using Django models to store task metadata.""" def _store_result(self, task_id, result, status, traceback=None): """Stor...
370676a21ff43ae25b75b890870613ebd6dbcf03
topiary/__init__.py
topiary/__init__.py
import commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args", "epitopes...
import .commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args", "epitope...
Add relative import to fix Python3 tests
Add relative import to fix Python3 tests
Python
apache-2.0
hammerlab/topiary,hammerlab/topiary
import commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args", "epitopes...
import .commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args", "epitope...
<commit_before>import commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args"...
import .commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args", "epitope...
import commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args", "epitopes...
<commit_before>import commandline_args from .mutant_epitope_predictor import MutantEpitopePredictor from .epitope_helpers import ( epitopes_to_dataframe, epitopes_to_csv ) from .predict_epitopes import predict_epitopes, predict_epitopes_from_args __all__ = [ "MutantEpitopePredictor", "commandline_args"...
97535245f7da3d7e54d64dc384d6cd81caa9a689
tests/test_story.py
tests/test_story.py
from py101 import Story from py101 import variables from py101 import lists import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(Story().name, 'py101', "name should be py101") class TestAdventureVariables(unittest.TestCase): good_solution = """ myinteger = 4 myst...
import py101 import py101.boilerplate import py101.introduction import py101.lists import py101.variables import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(py101.Story().name, 'py101', "name should be py101") class AdventureData(object): def __init__(self, tes...
Refactor tests to remove duplicate code
Refactor tests to remove duplicate code
Python
mit
sophilabs/py101
from py101 import Story from py101 import variables from py101 import lists import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(Story().name, 'py101', "name should be py101") class TestAdventureVariables(unittest.TestCase): good_solution = """ myinteger = 4 myst...
import py101 import py101.boilerplate import py101.introduction import py101.lists import py101.variables import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(py101.Story().name, 'py101', "name should be py101") class AdventureData(object): def __init__(self, tes...
<commit_before>from py101 import Story from py101 import variables from py101 import lists import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(Story().name, 'py101', "name should be py101") class TestAdventureVariables(unittest.TestCase): good_solution = """ myi...
import py101 import py101.boilerplate import py101.introduction import py101.lists import py101.variables import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(py101.Story().name, 'py101', "name should be py101") class AdventureData(object): def __init__(self, tes...
from py101 import Story from py101 import variables from py101 import lists import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(Story().name, 'py101', "name should be py101") class TestAdventureVariables(unittest.TestCase): good_solution = """ myinteger = 4 myst...
<commit_before>from py101 import Story from py101 import variables from py101 import lists import unittest class TestStory(unittest.TestCase): def test_name(self): self.assertEqual(Story().name, 'py101', "name should be py101") class TestAdventureVariables(unittest.TestCase): good_solution = """ myi...
6db806c28f5e6e207e4f3a690f57f09ee1e3e7dd
tilemill/tilemill.py
tilemill/tilemill.py
#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler...
#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler...
Indent properly, get helloworld working
Indent properly, get helloworld working
Python
bsd-3-clause
fxtentacle/tilemill,nyimbi/tilemill,MappingKat/tilemill,paulovieira/tilemill-clima,tizzybec/tilemill,MappingKat/tilemill,fxtentacle/tilemill,Teino1978-Corp/Teino1978-Corp-tilemill,tizzybec/tilemill,makinacorpus/tilemill,paulovieira/tilemill-clima,paulovieira/tilemill-clima,Zhao-Qi/tilemill,Zhao-Qi/tilemill,tizzybec/til...
#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler...
#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler...
<commit_before>#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web...
#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler...
#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web.RequestHandler...
<commit_before>#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import tornado.template from tornado.options import define, options define("port", default=8888, help="run on the given port", type=int) class MainHandler(tornado.web...
510afd0c93c333e86511fb6f6b9e96a434d54d00
zerver/migrations/0174_userprofile_delivery_email.py
zerver/migrations/0174_userprofile_delivery_email.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migration...
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migration...
Disable atomic for delivery_email migration.
migrations: Disable atomic for delivery_email migration. I'm not sure theoretically why this should be required only for some installations, but these articles all suggest the root problem is doing these two migrations together atomically (creating the field and setting a value for it), so the right answer is to decla...
Python
apache-2.0
dhcrzf/zulip,zulip/zulip,zulip/zulip,showell/zulip,dhcrzf/zulip,hackerkid/zulip,jackrzhang/zulip,eeshangarg/zulip,tommyip/zulip,brainwane/zulip,tommyip/zulip,synicalsyntax/zulip,tommyip/zulip,shubhamdhama/zulip,rht/zulip,dhcrzf/zulip,timabbott/zulip,shubhamdhama/zulip,rht/zulip,brainwane/zulip,hackerkid/zulip,synicalsy...
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migration...
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migration...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from djan...
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migration...
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migration...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-05 17:57 from __future__ import unicode_literals from django.db import migrations, models from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from djan...
80ff7429d3a68f99e66cd4cfae9478b3f34e435c
exhibitions/models.py
exhibitions/models.py
from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharField( "Ссылка", bl...
from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharField( "Ссылка", bl...
Order exhibition by end date
Order exhibition by end date
Python
mit
hombit/olgart,hombit/olgart,hombit/olgart,hombit/olgart
from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharField( "Ссылка", bl...
from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharField( "Ссылка", bl...
<commit_before>from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharFiel...
from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharField( "Ссылка", bl...
from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharField( "Ссылка", bl...
<commit_before>from django.db import models class Exhibition(models.Model): title = models.CharField( "Название", max_length=1024 ) begin = models.DateField( "Дата начала" ) end = models.DateField( "Дата окончания" ) showroom = models.CharField( "Выставочный зал", max_length=1024 ) showroom_url = models.CharFiel...
ad477285f4458145bca378b74dcb8cfe3abeaf06
froide/bounce/apps.py
froide/bounce/apps.py
import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export import registry ...
import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export import registry ...
Add unsubscribe reference to mails through context
Add unsubscribe reference to mails through context
Python
mit
stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide
import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export import registry ...
import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export import registry ...
<commit_before>import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export im...
import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export import registry ...
import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export import registry ...
<commit_before>import json from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class BounceConfig(AppConfig): name = 'froide.bounce' verbose_name = _('Bounce') def ready(self): from froide.account import account_canceled from froide.account.export im...
5d67def658f0b1bd206fdefe100d32269f1eb34e
falcom/api/uri/api_querier.py
falcom/api/uri/api_querier.py
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self.uri = uri ...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self.uri = uri ...
Replace local variables with class variables
Replace local variables with class variables
Python
bsd-3-clause
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self.uri = uri ...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self.uri = uri ...
<commit_before># Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self....
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self.uri = uri ...
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self.uri = uri ...
<commit_before># Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from time import sleep class APIQuerier: def __init__ (self, uri, url_opener, sleep_time=300, max_tries=0): self....
50fa164c4b09845bfa262c2f6959a3c5dfd6f76b
fluentcheck/classes/is_cls.py
fluentcheck/classes/is_cls.py
from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNumbers from ..ass...
from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNumbers from ..ass...
Remove methods with unnecessary super delegation.
Remove methods with unnecessary super delegation.
Python
mit
csparpa/check
from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNumbers from ..ass...
from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNumbers from ..ass...
<commit_before>from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNum...
from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNumbers from ..ass...
from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNumbers from ..ass...
<commit_before>from typing import Any from ..assertions_is.booleans import __IsBool from ..assertions_is.collections import __IsCollections from ..assertions_is.dicts import __IsDicts from ..assertions_is.emptiness import __IsEmptiness from ..assertions_is.geo import __IsGeo from ..assertions_is.numbers import __IsNum...
a15d2956cfd48e0d46d5d4cf567af05641b4c8e6
yunity/api/utils.py
yunity/api/utils.py
from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(cls, error, stat...
from functools import wraps from json import loads as load_json from django.http import JsonResponse class ApiBase(object): @classmethod def validation_failure(cls, message, status=400): """ :type message: str :type status: int :rtype JsonResponse """ return J...
Implement JSON request validation decorator
Implement JSON request validation decorator with @NerdyProjects
Python
agpl-3.0
yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/yunity-core
from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(cls, error, stat...
from functools import wraps from json import loads as load_json from django.http import JsonResponse class ApiBase(object): @classmethod def validation_failure(cls, message, status=400): """ :type message: str :type status: int :rtype JsonResponse """ return J...
<commit_before>from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(c...
from functools import wraps from json import loads as load_json from django.http import JsonResponse class ApiBase(object): @classmethod def validation_failure(cls, message, status=400): """ :type message: str :type status: int :rtype JsonResponse """ return J...
from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(cls, error, stat...
<commit_before>from django.http import JsonResponse class ApiBase(object): @classmethod def success(cls, data, status=200): """ :type data: dict :type status: int :rtype JsonResponse """ return JsonResponse(data, status=status) @classmethod def error(c...
798bd79ddc2e9b212a82a7a8455428b3d32cfab4
bin/pymodules/apitest/jscomponent.py
bin/pymodules/apitest/jscomponent.py
import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False def onChang...
import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False def onChang...
Add placeable to javascript context
Add placeable to javascript context
Python
apache-2.0
BogusCurry/tundra,antont/tundra,pharos3d/tundra,antont/tundra,AlphaStaxLLC/tundra,jesterKing/naali,pharos3d/tundra,antont/tundra,pharos3d/tundra,BogusCurry/tundra,BogusCurry/tundra,antont/tundra,realXtend/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,jesterKing/naali,BogusCurry/tundra,pharos3d/tundra,antont/tundra,pharo...
import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False def onChang...
import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False def onChang...
<commit_before>import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False ...
import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False def onChang...
import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False def onChang...
<commit_before>import json import rexviewer as r import naali import urllib2 from componenthandler import DynamiccomponentHandler class JavascriptHandler(DynamiccomponentHandler): GUINAME = "Javascript Handler" def __init__(self): DynamiccomponentHandler.__init__(self) self.jsloaded = False ...
31f887979d2129bec80311e94b91cf0f77772f26
zou/app/utils/fs.py
zou/app/utils/fs.py
import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shutil.rmtree(path)
import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shutil.rmtree(path) ...
Add a new copy file util function
Add a new copy file util function
Python
agpl-3.0
cgwire/zou
import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shutil.rmtree(path) ...
import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shutil.rmtree(path) ...
<commit_before>import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shuti...
import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shutil.rmtree(path) ...
import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shutil.rmtree(path) ...
<commit_before>import os import shutil import errno def mkdir_p(path): try: os.makedirs(path) except OSError as exception: if exception.errno == errno.EEXIST and os.path.isdir(path): pass else: raise def rm_rf(path): if os.path.exists(path): shuti...
463fa89c143cd4493ea3704f177c5aba0ebb2af7
idiokit/xmpp/_resolve.py
idiokit/xmpp/_resolve.py
from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port_and_count(port): count = 0 while True: try: family, ip = yield idiokit.next() except StopIteration: idiokit.stop(count) yield idiokit.se...
from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port(port): while True: family, ip = yield idiokit.next() yield idiokit.send(family, ip, port) def _resolve_host(host, port): return dns.host_lookup(host) | _add_port(port) ...
Fix SRV logic. RFC 6120 states that the fallback logic shouldn't be applied when the entity (client in this case) receives an answer to the SRV query but fails to establish a connection using the answer data.
idiokit.xmpp: Fix SRV logic. RFC 6120 states that the fallback logic shouldn't be applied when the entity (client in this case) receives an answer to the SRV query but fails to establish a connection using the answer data.
Python
mit
abusesa/idiokit
from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port_and_count(port): count = 0 while True: try: family, ip = yield idiokit.next() except StopIteration: idiokit.stop(count) yield idiokit.se...
from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port(port): while True: family, ip = yield idiokit.next() yield idiokit.send(family, ip, port) def _resolve_host(host, port): return dns.host_lookup(host) | _add_port(port) ...
<commit_before>from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port_and_count(port): count = 0 while True: try: family, ip = yield idiokit.next() except StopIteration: idiokit.stop(count) y...
from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port(port): while True: family, ip = yield idiokit.next() yield idiokit.send(family, ip, port) def _resolve_host(host, port): return dns.host_lookup(host) | _add_port(port) ...
from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port_and_count(port): count = 0 while True: try: family, ip = yield idiokit.next() except StopIteration: idiokit.stop(count) yield idiokit.se...
<commit_before>from __future__ import absolute_import from .. import idiokit, dns DEFAULT_XMPP_PORT = 5222 @idiokit.stream def _add_port_and_count(port): count = 0 while True: try: family, ip = yield idiokit.next() except StopIteration: idiokit.stop(count) y...
b955c4bed4024681f41076977605111abe4577e4
skan/io.py
skan/io.py
import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters ---------- filenam...
import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters ---------- filenam...
Update deprecated excel kwarg in pandas
Update deprecated excel kwarg in pandas
Python
bsd-3-clause
jni/skan
import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters ---------- filenam...
import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters ---------- filenam...
<commit_before>import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters -------...
import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters ---------- filenam...
import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters ---------- filenam...
<commit_before>import pandas as pd def _params_dict_to_dataframe(d): s = pd.Series(d) s.index.name = 'parameters' f = pd.DataFrame({'values': s}) return f def write_excel(filename, **kwargs): """Write data tables to an Excel file, using kwarg names as sheet names. Parameters -------...
7e71e21734abb2b12e309ea37910c90f7b837651
go/base/tests/test_decorators.py
go/base/tests/test_decorators.py
"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class CatchableDummyEr...
"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class CatchableDumm...
Move Django-specific pieces into the django_imports block.
Move Django-specific pieces into the django_imports block.
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class CatchableDummyEr...
"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class CatchableDumm...
<commit_before>"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class C...
"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class CatchableDumm...
"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class CatchableDummyEr...
<commit_before>"""Test for go.base.decorators.""" from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase from go.base.decorators import render_exception from django.template.response import TemplateResponse class C...
a50aeb81a588f8297f194d793cb8f8cf0e15a411
lambda/list_member.py
lambda/list_member.py
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
Convert list member addresses to non-unicode strings when possible.
Convert list member addresses to non-unicode strings when possible.
Python
mit
ilg/LambdaMLM
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
<commit_before>from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', ...
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', 'reports', ...
<commit_before>from __future__ import print_function from enum import IntEnum import yaml MemberFlag = IntEnum('MemberFlag', [ 'digest', 'digest2', 'modPost', 'preapprove', 'noPost', 'diagnostic', 'moderator', 'myopic', 'superadmin', 'admin', 'protected', 'ccErrors', ...
bd59db76bb81218d04224e44773eae9d3d9dfc21
rplugin/python3/denite/source/toc.py
rplugin/python3/denite/source/toc.py
# -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or n['frontmatter'] or n['backmatter']: return '' ...
# -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or not type(n) is dict or n['frontmatter'] or n['backmatter']: ...
Fix Denite support for vim8.
Fix Denite support for vim8.
Python
mit
lervag/vimtex,Aster89/vimtex,Aster89/vimtex,kmarius/vimtex,lervag/vimtex,kmarius/vimtex
# -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or n['frontmatter'] or n['backmatter']: return '' ...
# -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or not type(n) is dict or n['frontmatter'] or n['backmatter']: ...
<commit_before># -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or n['frontmatter'] or n['backmatter']: ...
# -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or not type(n) is dict or n['frontmatter'] or n['backmatter']: ...
# -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or n['frontmatter'] or n['backmatter']: return '' ...
<commit_before># -*- coding: utf-8 -*- from .base import Base class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = 'vimtex_toc' self.kind = 'file' @staticmethod def format_number(n): if not n or n['frontmatter'] or n['backmatter']: ...
f4406d21546922363cd67f53d5697bc324306f2b
orders/views.py
orders/views.py
from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(request): orders = Order.objects.filter(valid_until__gt=timezone.now()) ...
from django.db.models import Sum from django.db.models.query import QuerySet from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(req...
Implement actual filtering (not) executed Orders
Implement actual filtering (not) executed Orders
Python
agpl-3.0
m4tx/egielda,m4tx/egielda,m4tx/egielda
from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(request): orders = Order.objects.filter(valid_until__gt=timezone.now()) ...
from django.db.models import Sum from django.db.models.query import QuerySet from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(req...
<commit_before>from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(request): orders = Order.objects.filter(valid_until__gt=timez...
from django.db.models import Sum from django.db.models.query import QuerySet from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(req...
from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(request): orders = Order.objects.filter(valid_until__gt=timezone.now()) ...
<commit_before>from django.http import HttpResponse from django.shortcuts import render from django.utils import timezone from orders.models import Order def order_details(request, order_pk): return HttpResponse("Hello, world!") def not_executed(request): orders = Order.objects.filter(valid_until__gt=timez...
1443d24ad1548497b76eb9d90b5f79627cf81b0c
whoarder/whoarder.py
whoarder/whoarder.py
#!/usr/bin/python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: import sys ...
#!/usr/bin/env python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: import ...
Replace hashbang with /usr/bin/env python3 for better portability
Replace hashbang with /usr/bin/env python3 for better portability
Python
mit
ronjouch/whoarder,rejuvyesh/whoarder,rejuvyesh/whoarder,ronjouch/whoarder
#!/usr/bin/python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: import sys ...
#!/usr/bin/env python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: import ...
<commit_before>#!/usr/bin/python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: ...
#!/usr/bin/env python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: import ...
#!/usr/bin/python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: import sys ...
<commit_before>#!/usr/bin/python3 import argparse if __name__ == '__main__': # Boilerplate to allow running as script directly. Avoids error below: # SystemError: Parent module '' not loaded, cannot perform relative import # See http://stackoverflow.com/questions/2943847/ if __package__ is None: ...
a4d2782ad902bde5229def1b3de35107a3918800
opps/article/views.py
opps/article/views.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): return 'channel/{0}....
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): return 'channel/{0}....
Fix queryset on entry home page (/) on list page
Fix queryset on entry home page (/) on list page
Python
mit
YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,opps/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): return 'channel/{0}....
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): return 'channel/{0}....
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): retur...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): return 'channel/{0}....
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): return 'channel/{0}....
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from opps.article.models import Post class OppsList(ListView): context_object_name = "context" @property def template_name(self): retur...
fc92c557232a3202e53c5d998183d91d5ed82809
python/setup.py
python/setup.py
# -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", "attrs >= 20.1.0", "cattrs >= 1.0.0", "python-dateutil;python_version<'3.7'", "typing-extensions;python_version<'3.8'...
# -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", # Python 3.6 "attrs >= 18.2.0;python_version<'3.7'", "cattrs < 1.1.0;python_version<'3.7'", "python-dateutil;python_v...
Split attrs, cattrs versions for py36, py37
Split attrs, cattrs versions for py36, py37
Python
mit
looker-open-source/sdk-codegen,looker-open-source/sdk-codegen,looker-open-source/sdk-codegen,looker-open-source/sdk-codegen,looker-open-source/sdk-codegen,looker-open-source/sdk-codegen,looker-open-source/sdk-codegen,looker-open-source/sdk-codegen,looker-open-source/sdk-codegen
# -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", "attrs >= 20.1.0", "cattrs >= 1.0.0", "python-dateutil;python_version<'3.7'", "typing-extensions;python_version<'3.8'...
# -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", # Python 3.6 "attrs >= 18.2.0;python_version<'3.7'", "cattrs < 1.1.0;python_version<'3.7'", "python-dateutil;python_v...
<commit_before># -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", "attrs >= 20.1.0", "cattrs >= 1.0.0", "python-dateutil;python_version<'3.7'", "typing-extensions;pytho...
# -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", # Python 3.6 "attrs >= 18.2.0;python_version<'3.7'", "cattrs < 1.1.0;python_version<'3.7'", "python-dateutil;python_v...
# -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", "attrs >= 20.1.0", "cattrs >= 1.0.0", "python-dateutil;python_version<'3.7'", "typing-extensions;python_version<'3.8'...
<commit_before># -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages # noqa: H301 NAME = "looker_sdk" VERSION = "0.1.3b20" REQUIRES = [ "requests >= 2.22", "attrs >= 20.1.0", "cattrs >= 1.0.0", "python-dateutil;python_version<'3.7'", "typing-extensions;pytho...
888f6b07174943ba7f3b9d187348ceeebecc4a42
utils/00-cinspect.py
utils/00-cinspect.py
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. import inspect from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat ...
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat import cast_unic...
Update the IPython startup script for master.
Update the IPython startup script for master.
Python
bsd-3-clause
punchagan/cinspect,punchagan/cinspect
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. import inspect from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat ...
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat import cast_unic...
<commit_before>""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. import inspect from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.u...
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat import cast_unic...
""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. import inspect from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.utils.py3compat ...
<commit_before>""" A startup script for IPython to patch it to 'inspect' using cinspect. """ # Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to # use cinspect for the code inspection. import inspect from cinspect import getsource, getfile import IPython.core.oinspect as OI from IPython.u...
dc461956408ffa35e2391fccf4231d60144985f7
yunity/groups/api.py
yunity/groups/api.py
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from rest_framework.response import Response from yunity.groups.serializers import GroupSerializer from yuni...
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, BasePermission from rest_framework.response import Response from yunity.groups.serializers import GroupSeri...
Fix permissions for groups endpoint
Fix permissions for groups endpoint
Python
agpl-3.0
yunity/yunity-core,yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/foodsaving-backend
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from rest_framework.response import Response from yunity.groups.serializers import GroupSerializer from yuni...
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, BasePermission from rest_framework.response import Response from yunity.groups.serializers import GroupSeri...
<commit_before>from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from rest_framework.response import Response from yunity.groups.serializers import GroupSeria...
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, BasePermission from rest_framework.response import Response from yunity.groups.serializers import GroupSeri...
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from rest_framework.response import Response from yunity.groups.serializers import GroupSerializer from yuni...
<commit_before>from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from rest_framework.response import Response from yunity.groups.serializers import GroupSeria...
0f7ebec0442da08b12cd88f2558146d5c5a551ad
K2fov/tests/test_plot.py
K2fov/tests/test_plot.py
"""Tests K2fov.plot""" from .. import plot def test_basics(): """Make sure this runs without exception.""" try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass
"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """
Simplify plot test for now
Simplify plot test for now
Python
mit
KeplerGO/K2fov,mrtommyb/K2fov
"""Tests K2fov.plot""" from .. import plot def test_basics(): """Make sure this runs without exception.""" try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass Simplify plot test for now
"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """
<commit_before>"""Tests K2fov.plot""" from .. import plot def test_basics(): """Make sure this runs without exception.""" try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass <commit_msg>Simplify plot test...
"""Tests K2fov.plot""" from .. import plot """ def test_basics(): # Make sure this runs without exception. try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass """
"""Tests K2fov.plot""" from .. import plot def test_basics(): """Make sure this runs without exception.""" try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass Simplify plot test for now"""Tests K2fov.plot...
<commit_before>"""Tests K2fov.plot""" from .. import plot def test_basics(): """Make sure this runs without exception.""" try: import matplotlib plot.create_context_plot(180, 0) plot.create_context_plot_zoomed(180, 0) except ImportError: pass <commit_msg>Simplify plot test...
5187cd61c8063091304b8ee8e086c7474bbda71c
angus/client/version.py
angus/client/version.py
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
Prepare first rc for 0.0.15
Prepare first rc for 0.0.15
Python
apache-2.0
angus-ai/angus-sdk-python
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
<commit_before># -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Vers...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
<commit_before># -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Vers...
3427b2583c38ed7ec5239c36faa82536f3f95a3b
automata/pda/stack.py
automata/pda/stack.py
#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack, **kwargs): """Initialize the new PDA stack.""" if isinstance(stack, PDAStack): self._init_from_stack_obj(stack) else: ...
#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack): """Initialize the new PDA stack.""" self.stack = list(stack) def top(self): """Return the symbol at the top of the stack.""" ...
Remove copy constructor for PDAStack
Remove copy constructor for PDAStack The copy() method is already sufficient.
Python
mit
caleb531/automata
#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack, **kwargs): """Initialize the new PDA stack.""" if isinstance(stack, PDAStack): self._init_from_stack_obj(stack) else: ...
#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack): """Initialize the new PDA stack.""" self.stack = list(stack) def top(self): """Return the symbol at the top of the stack.""" ...
<commit_before>#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack, **kwargs): """Initialize the new PDA stack.""" if isinstance(stack, PDAStack): self._init_from_stack_obj(stack) ...
#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack): """Initialize the new PDA stack.""" self.stack = list(stack) def top(self): """Return the symbol at the top of the stack.""" ...
#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack, **kwargs): """Initialize the new PDA stack.""" if isinstance(stack, PDAStack): self._init_from_stack_obj(stack) else: ...
<commit_before>#!/usr/bin/env python3 """Classes and methods for working with PDA stacks.""" class PDAStack(object): """A PDA stack.""" def __init__(self, stack, **kwargs): """Initialize the new PDA stack.""" if isinstance(stack, PDAStack): self._init_from_stack_obj(stack) ...
3990e3aa64cff288def07ee36e24026cc15282c0
taiga/projects/issues/serializers.py
taiga/projects/issues/serializers.py
# -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) comment = serializers.SerializerMethodField("get_comment") ...
# -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) is_closed = serializers.Field(source="is_closed") class Me...
Remove unnecessary field from IssueSerializer
Remove unnecessary field from IssueSerializer
Python
agpl-3.0
forging2012/taiga-back,EvgeneOskin/taiga-back,xdevelsistemas/taiga-back-community,seanchen/taiga-back,bdang2012/taiga-back-casting,Rademade/taiga-back,crr0004/taiga-back,dayatz/taiga-back,rajiteh/taiga-back,dycodedev/taiga-back,crr0004/taiga-back,obimod/taiga-back,Zaneh-/bearded-tribble-back,seanchen/taiga-back,gauravj...
# -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) comment = serializers.SerializerMethodField("get_comment") ...
# -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) is_closed = serializers.Field(source="is_closed") class Me...
<commit_before># -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) comment = serializers.SerializerMethodField("get...
# -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) is_closed = serializers.Field(source="is_closed") class Me...
# -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) comment = serializers.SerializerMethodField("get_comment") ...
<commit_before># -*- coding: utf-8 -*- from rest_framework import serializers from taiga.base.serializers import PickleField, NeighborsSerializerMixin from . import models class IssueSerializer(serializers.ModelSerializer): tags = PickleField(required=False) comment = serializers.SerializerMethodField("get...
85e853a63d7fed79b931b337bb9e6678077cf8d5
tests/integration/ssh/test_grains.py
tests/integration/ssh/test_grains.py
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class SSHGrainsTest(...
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class SSHGrainsTest(...
Add darwin value for ssh grain items tests on MacOSX
Add darwin value for ssh grain items tests on MacOSX
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class SSHGrainsTest(...
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class SSHGrainsTest(...
<commit_before># -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class...
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class SSHGrainsTest(...
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class SSHGrainsTest(...
<commit_before># -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class...
79bbc95abd2c1b41bcbd19d9ce1ffa330bd76b7a
source/views.py
source/views.py
from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem__('movie_title'...
from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem__('movie_title'...
Join threads or else the number of running threads increments by 5 at each request and will never stop until main process is killed
Join threads or else the number of running threads increments by 5 at each request and will never stop until main process is killed
Python
mit
jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu
from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem__('movie_title'...
from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem__('movie_title'...
<commit_before>from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem_...
from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem__('movie_title'...
from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem__('movie_title'...
<commit_before>from multiprocessing.pool import ThreadPool from django.shortcuts import render from .forms import SearchForm from source import view_models def index(request): if request.method == 'GET': form = SearchForm(request.GET) if form.is_valid(): title = request.GET.__getitem_...
9d29e4f41c076950d28f602773a3c4672a9191b1
pyluos/io/__init__.py
pyluos/io/__init__.py
import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: data = se...
import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: data = se...
Remove retries limit in read ftm.
Remove retries limit in read ftm.
Python
mit
pollen/pyrobus
import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: data = se...
import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: data = se...
<commit_before>import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: ...
import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: data = se...
import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: data = se...
<commit_before>import json import logging class IOHandler(object): @classmethod def is_host_compatible(cls, host): return False def __init__(self, host): raise NotImplementedError def is_ready(self): raise NotImplementedError def read(self, trials=5): try: ...
26a6da62dc81720ea13645589719dcbae6dadacc
pynexus/api_client.py
pynexus/api_client.py
import requests class ApiClient: def __init__(self, host, username, password): self.host = host self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.host+'/nexus/service/local/repositories', headers={'Accept': 'application/json...
import requests class ApiClient: def __init__(self, host, username, password): self.uri = host + '/nexus/service/local/' self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.uri + 'all_repositories', headers={'Accept': 'applica...
Refactor url attribute to uri
Refactor url attribute to uri It's better to construct the uri in the class constructor, instead of constructing it in every single REST method
Python
apache-2.0
rcarrillocruz/pynexus
import requests class ApiClient: def __init__(self, host, username, password): self.host = host self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.host+'/nexus/service/local/repositories', headers={'Accept': 'application/json...
import requests class ApiClient: def __init__(self, host, username, password): self.uri = host + '/nexus/service/local/' self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.uri + 'all_repositories', headers={'Accept': 'applica...
<commit_before>import requests class ApiClient: def __init__(self, host, username, password): self.host = host self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.host+'/nexus/service/local/repositories', headers={'Accept': 'a...
import requests class ApiClient: def __init__(self, host, username, password): self.uri = host + '/nexus/service/local/' self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.uri + 'all_repositories', headers={'Accept': 'applica...
import requests class ApiClient: def __init__(self, host, username, password): self.host = host self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.host+'/nexus/service/local/repositories', headers={'Accept': 'application/json...
<commit_before>import requests class ApiClient: def __init__(self, host, username, password): self.host = host self.username = username self.password = password def get_all_repositories(self): r = requests.get(self.host+'/nexus/service/local/repositories', headers={'Accept': 'a...
68f4d883eb9dd59b3a4560f53657d80cf572104e
pfasst/__init__.py
pfasst/__init__.py
from pfasst import PFASST __all__ = []
try: from pfasst import PFASST except: print 'WARNING: Unable to import PFASST.' __all__ = []
Add warning when unable to import PFASST.
PFASST: Add warning when unable to import PFASST.
Python
bsd-2-clause
memmett/PyPFASST,memmett/PyPFASST
from pfasst import PFASST __all__ = [] PFASST: Add warning when unable to import PFASST.
try: from pfasst import PFASST except: print 'WARNING: Unable to import PFASST.' __all__ = []
<commit_before> from pfasst import PFASST __all__ = [] <commit_msg>PFASST: Add warning when unable to import PFASST.<commit_after>
try: from pfasst import PFASST except: print 'WARNING: Unable to import PFASST.' __all__ = []
from pfasst import PFASST __all__ = [] PFASST: Add warning when unable to import PFASST. try: from pfasst import PFASST except: print 'WARNING: Unable to import PFASST.' __all__ = []
<commit_before> from pfasst import PFASST __all__ = [] <commit_msg>PFASST: Add warning when unable to import PFASST.<commit_after> try: from pfasst import PFASST except: print 'WARNING: Unable to import PFASST.' __all__ = []
2cb385ab85257562547759c1d192993c258ebdff
wger/utils/tests/test_capitalizer.py
wger/utils/tests/test_capitalizer.py
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
# -*- coding: utf-8 *-* # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
Add coding for python 2.7 compatibility
Add coding for python 2.7 compatibility
Python
agpl-3.0
wger-project/wger,petervanderdoes/wger,wger-project/wger,kjagoo/wger_stark,rolandgeider/wger,petervanderdoes/wger,rolandgeider/wger,kjagoo/wger_stark,wger-project/wger,wger-project/wger,kjagoo/wger_stark,kjagoo/wger_stark,petervanderdoes/wger,petervanderdoes/wger,rolandgeider/wger,rolandgeider/wger
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
# -*- coding: utf-8 *-* # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
<commit_before># This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
# -*- coding: utf-8 *-* # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
<commit_before># This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
93926a9986ab4ba7704cd564d0052b6e60ff38cb
casepro/pods/base.py
casepro/pods/base.py
import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for the specific inst...
import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for the specific inst...
Add the class-level vars we need for pod angular components to PodPlugin
Add the class-level vars we need for pod angular components to PodPlugin
Python
bsd-3-clause
rapidpro/casepro,praekelt/casepro,xkmato/casepro,rapidpro/casepro,praekelt/casepro,xkmato/casepro,praekelt/casepro,rapidpro/casepro
import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for the specific inst...
import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for the specific inst...
<commit_before>import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for th...
import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for the specific inst...
import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for the specific inst...
<commit_before>import json from confmodel import fields, Config as ConfmodelConfig from django.apps import AppConfig class PodConfig(ConfmodelConfig): ''' This is the config that all pods should use as the base for their own config. ''' index = fields.ConfigInt( "A unique identifier for th...
aceeac7e9dd2735add937bc7141cfdb29b6201c7
pywatson/watson.py
pywatson/watson.py
from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson: """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password def ask_questio...
from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson(object): """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password def ask...
Use __dict__ instead of to_dict()
Use __dict__ instead of to_dict()
Python
mit
sherlocke/pywatson
from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson: """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password def ask_questio...
from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson(object): """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password def ask...
<commit_before>from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson: """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password ...
from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson(object): """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password def ask...
from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson: """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password def ask_questio...
<commit_before>from pywatson.answer.answer import Answer from pywatson.question.question import Question import requests class Watson: """The Watson API adapter class""" def __init__(self, url, username, password): self.url = url self.username = username self.password = password ...
d7c9bcbf25a6b45a462216f426608474aa66ceb0
mysite/missions/models.py
mysite/missions/models.py
from django.db import models class MissionStep(models.Model): pass class MissionStepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('MissionStep') class Meta: unique_together = ('person', 'step')
from django.db import models class Step(models.Model): pass class StepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('Step') class Meta: unique_together = ('person', 'step')
Remove the redundant "Mission" prefix from the mission model names.
Remove the redundant "Mission" prefix from the mission model names.
Python
agpl-3.0
heeraj123/oh-mainline,vipul-sharma20/oh-mainline,sudheesh001/oh-mainline,willingc/oh-mainline,jledbetter/openhatch,jledbetter/openhatch,moijes12/oh-mainline,openhatch/oh-mainline,mzdaniel/oh-mainline,openhatch/oh-mainline,jledbetter/openhatch,waseem18/oh-mainline,waseem18/oh-mainline,SnappleCap/oh-mainline,Changaco/oh-...
from django.db import models class MissionStep(models.Model): pass class MissionStepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('MissionStep') class Meta: unique_together = ('person', 'step') Remove the redundant "Mission" prefix from the mi...
from django.db import models class Step(models.Model): pass class StepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('Step') class Meta: unique_together = ('person', 'step')
<commit_before>from django.db import models class MissionStep(models.Model): pass class MissionStepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('MissionStep') class Meta: unique_together = ('person', 'step') <commit_msg>Remove the redundant "...
from django.db import models class Step(models.Model): pass class StepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('Step') class Meta: unique_together = ('person', 'step')
from django.db import models class MissionStep(models.Model): pass class MissionStepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('MissionStep') class Meta: unique_together = ('person', 'step') Remove the redundant "Mission" prefix from the mi...
<commit_before>from django.db import models class MissionStep(models.Model): pass class MissionStepCompletion(models.Model): person = models.ForeignKey('profile.Person') step = models.ForeignKey('MissionStep') class Meta: unique_together = ('person', 'step') <commit_msg>Remove the redundant "...
a2e3f0590d5bd25993be5291c058c722896aa773
tests/test_utils.py
tests/test_utils.py
import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) self.assertEqual(sorted(list(set(rargmax(...
import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) np.random.seed(1) self.assertEqua...
Fix broken utils test with seed
Fix broken utils test with seed
Python
apache-2.0
HazyResearch/metal,HazyResearch/metal
import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) self.assertEqual(sorted(list(set(rargmax(...
import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) np.random.seed(1) self.assertEqua...
<commit_before>import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) self.assertEqual(sorted(li...
import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) np.random.seed(1) self.assertEqua...
import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) self.assertEqual(sorted(list(set(rargmax(...
<commit_before>import sys import unittest import numpy as np import torch sys.path.append("../metal") from metal.utils import ( rargmax, hard_to_soft, recursive_merge_dicts ) class UtilsTest(unittest.TestCase): def test_rargmax(self): x = np.array([2, 1, 2]) self.assertEqual(sorted(li...
df5e6bdd03ad666afdd9b61745eec95afc08e9cb
tests/test_views.py
tests/test_views.py
""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.notify_recipient')...
""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.notify_recipient')...
Fix last code quality issues
Fix last code quality issues
Python
mit
DobaTech/github-review-slack-notifier
""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.notify_recipient')...
""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.notify_recipient')...
<commit_before>""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.not...
""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.notify_recipient')...
""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.notify_recipient')...
<commit_before>""" Tests for the main server file. """ from unittest import TestCase from unittest.mock import patch from app import views class ViewsTestCase(TestCase): """ Our main server testcase. """ def test_ping(self): self.assertEqual(views.ping(None, None), 'pong') @patch('app.views.not...
23d50e82212eb02a3ba467ae323736e4f03f7293
tof_server/views.py
tof_server/views.py
"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'client-versions' :...
"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'client-versions' :...
Insert new player data into db
Insert new player data into db
Python
mit
P1X-in/Tanks-of-Freedom-Server
"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'client-versions' :...
"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'client-versions' :...
<commit_before>"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'cli...
"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'client-versions' :...
"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'client-versions' :...
<commit_before>"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'cli...
39091c3390d121d48097d64526f40d0a09702673
src/zeit/today/tests.py
src/zeit/today/tests.py
import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) TodayLayer = zeit.cms.testing.ZCMLLayer('ftesting.zcml', product_config=( product_config + ...
import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) CONFIG_LAYER = zeit.cms.testing.ProductConfigLayer(product_config, bases=( zeit.cms.testing.CO...
Update to new testlayer API
ZON-5241: Update to new testlayer API
Python
bsd-3-clause
ZeitOnline/zeit.today
import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) TodayLayer = zeit.cms.testing.ZCMLLayer('ftesting.zcml', product_config=( product_config + ...
import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) CONFIG_LAYER = zeit.cms.testing.ProductConfigLayer(product_config, bases=( zeit.cms.testing.CO...
<commit_before>import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) TodayLayer = zeit.cms.testing.ZCMLLayer('ftesting.zcml', product_config=( produ...
import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) CONFIG_LAYER = zeit.cms.testing.ProductConfigLayer(product_config, bases=( zeit.cms.testing.CO...
import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) TodayLayer = zeit.cms.testing.ZCMLLayer('ftesting.zcml', product_config=( product_config + ...
<commit_before>import pkg_resources import zeit.cms.testing product_config = """\ <product-config zeit.today> today-xml-url file://{base}/today.xml </product-config> """.format(base=pkg_resources.resource_filename(__name__, '.')) TodayLayer = zeit.cms.testing.ZCMLLayer('ftesting.zcml', product_config=( produ...
81f7b2bdd0e916a001b954ce9bac24ebe4600150
roboime/options.py
roboime/options.py
# -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Position Log with Noise filename. Use None to disable. position_log_noise_filename = "math/pos_log_noise.txt" #position_log_filename =...
# -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Command and Update Log filename. Use None to disable. cmdupd_filename = "math/commands.txt" #cmdupd_filename = None #Gaussian noise a...
Add Q (generic) and R (3 values) to get more precise Kalman results
Add Q (generic) and R (3 values) to get more precise Kalman results
Python
agpl-3.0
roboime/pyroboime
# -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Position Log with Noise filename. Use None to disable. position_log_noise_filename = "math/pos_log_noise.txt" #position_log_filename =...
# -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Command and Update Log filename. Use None to disable. cmdupd_filename = "math/commands.txt" #cmdupd_filename = None #Gaussian noise a...
<commit_before># -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Position Log with Noise filename. Use None to disable. position_log_noise_filename = "math/pos_log_noise.txt" #position...
# -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Command and Update Log filename. Use None to disable. cmdupd_filename = "math/commands.txt" #cmdupd_filename = None #Gaussian noise a...
# -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Position Log with Noise filename. Use None to disable. position_log_noise_filename = "math/pos_log_noise.txt" #position_log_filename =...
<commit_before># -*- coding: utf-8 -*- """ General options during execution """ #Position Log filename. Use None to disable. position_log_filename = "math/pos_log.txt" #position_log_filename = None #Position Log with Noise filename. Use None to disable. position_log_noise_filename = "math/pos_log_noise.txt" #position...
d6ce218b0da869f6b4319751c1fe59ef02fba6b6
kremlin/imgutils.py
kremlin/imgutils.py
""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # Kremlin Mag...
""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # Kremlin Mag...
Use better string concatenation in mkthumb()
Use better string concatenation in mkthumb()
Python
bsd-2-clause
glasnost/kremlin,glasnost/kremlin,glasnost/kremlin
""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # Kremlin Mag...
""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # Kremlin Mag...
<commit_before>""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # Kremlin Mag...
""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # Kremlin Mag...
<commit_before>""" # # #### ##### # # ##### # # # # # # # # # ## ## # # # ## # # ### #### #### # # # # # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # ...
aa196b79102959a9fc5e8837c068307791b76d32
lib/matrix_parser.py
lib/matrix_parser.py
#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli argument m...
#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib, re # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli argument ...
Fix with latexising the matrix of an operator
Fix with latexising the matrix of an operator
Python
mit
hrickards/shors_circuits,hrickards/shors_circuits,hrickards/shors_circuits
#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli argument m...
#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib, re # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli argument ...
<commit_before>#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli...
#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib, re # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli argument ...
#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli argument m...
<commit_before>#!/usr/bin/python # Import code for parsing a matrix into a sympy object from quantum_simulation import parse_matrix from sympy import latex import json, sys, pipes, urllib # If the file's being run, rather than loaded as a library if __name__ == "__main__": # Load the matrix from json passed as cli...
09f65ff2a21cd00355193bcdee22a2289ead2d24
tests/test_arguments.py
tests/test_arguments.py
from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'args': (), 'kwarg...
from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'args': (), 'kwarg...
Add test for unexpected unicode kwargs.
Add test for unexpected unicode kwargs.
Python
bsd-2-clause
GrahamDumpleton/wrapt,GrahamDumpleton/wrapt
from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'args': (), 'kwarg...
from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'args': (), 'kwarg...
<commit_before>from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'ar...
from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'args': (), 'kwarg...
from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'args': (), 'kwarg...
<commit_before>from __future__ import print_function import unittest import wrapt class TestArguments(unittest.TestCase): def test_getcallargs(self): def function(a, b=2, c=3, d=4, e=5, *args, **kwargs): pass expected = {'a': 10, 'c': 3, 'b': 20, 'e': 5, 'd': 40, 'ar...
397eb3ee376acec005a8d7b5a4c2b2e0193a938d
tests/test_bookmarks.py
tests/test_bookmarks.py
import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): bookmarks.database...
import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): bookmarks.database...
Add param for confirm field on register test func
Add param for confirm field on register test func
Python
apache-2.0
byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks
import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): bookmarks.database...
import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): bookmarks.database...
<commit_before>import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): boo...
import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): bookmarks.database...
import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): bookmarks.database...
<commit_before>import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): self.app = bookmarks.app.test_client() # with bookmarks.app.app_context(): bookmarks.database.init_db() def tearDown(self): # with bookmarks.app.app_context(): boo...
95fbbe9bac94e171424cb8ee23a675a70607fb62
tests/test_constants.py
tests/test_constants.py
from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import Enum, BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value) self...
from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES, Enum class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value) self...
Fix import order picked up by isort
Fix import order picked up by isort
Python
mit
springload/draftjs_exporter,springload/draftjs_exporter,springload/draftjs_exporter
from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import Enum, BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value) self...
from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES, Enum class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value) self...
<commit_before>from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import Enum, BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value...
from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES, Enum class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value) self...
from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import Enum, BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value) self...
<commit_before>from __future__ import absolute_import, unicode_literals import unittest from draftjs_exporter.constants import Enum, BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES class EnumConstants(unittest.TestCase): def test_enum_returns_the_key_if_valid(self): foo_value = 'foo' e = Enum(foo_value...
9519b619c9a2c30ea2a5bf5559675c1d926ec5a4
clouder_template_bind/__openerp__.py
clouder_template_bind/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
Add shinken in bind dependancy
Add shinken in bind dependancy
Python
agpl-3.0
YannickB/odoo-hosting
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licens...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2013 Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licens...
c2fb81dceddd4fd2ea5416565bbd4c7eb4e39bd0
common/helpers/malicious_requests.py
common/helpers/malicious_requests.py
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.http import HttpResponseBadRequest class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. ...
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed, SuspiciousOperation class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. if settings.MALICIOUS_URL_...
Use exception rather than Bad Request view
MaliciousRequestsMiddleware: Use exception rather than Bad Request view
Python
mit
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.http import HttpResponseBadRequest class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. ...
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed, SuspiciousOperation class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. if settings.MALICIOUS_URL_...
<commit_before>import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.http import HttpResponseBadRequest class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initializ...
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed, SuspiciousOperation class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. if settings.MALICIOUS_URL_...
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.http import HttpResponseBadRequest class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initialization. ...
<commit_before>import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from django.http import HttpResponseBadRequest class MaliciousRequestsMiddleware: def __init__(self, get_response): self.get_response = get_response # One-time configuration and initializ...
aa6a74abc382bb6be86fa4a91132a9be51f365a5
tests/test_data_checksums.py
tests/test_data_checksums.py
""" test data_checksums""" from nose.tools import assert_equal def test_data_checksums(): from pyne.data import data_checksums assert_equal(len(data_checksums), 6) assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')
""" test data_checksums and hashing functions""" import os from nose.tools import assert_equal, assert_true import pyne # These tests require nuc_data if not os.path.isfile(pyne.nuc_data): raise RuntimeError("Tests require nuc_data.h5. Please run nuc_data_make.") def test_data_checksums(): from pyne.data i...
Add test of internal hashes and guarded pyne.nuc_data use
Add test of internal hashes and guarded pyne.nuc_data use
Python
bsd-3-clause
pyne/simplesim
""" test data_checksums""" from nose.tools import assert_equal def test_data_checksums(): from pyne.data import data_checksums assert_equal(len(data_checksums), 6) assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')Add test of internal hashes and guarded pyne.nuc_data us...
""" test data_checksums and hashing functions""" import os from nose.tools import assert_equal, assert_true import pyne # These tests require nuc_data if not os.path.isfile(pyne.nuc_data): raise RuntimeError("Tests require nuc_data.h5. Please run nuc_data_make.") def test_data_checksums(): from pyne.data i...
<commit_before>""" test data_checksums""" from nose.tools import assert_equal def test_data_checksums(): from pyne.data import data_checksums assert_equal(len(data_checksums), 6) assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')<commit_msg>Add test of internal hashes a...
""" test data_checksums and hashing functions""" import os from nose.tools import assert_equal, assert_true import pyne # These tests require nuc_data if not os.path.isfile(pyne.nuc_data): raise RuntimeError("Tests require nuc_data.h5. Please run nuc_data_make.") def test_data_checksums(): from pyne.data i...
""" test data_checksums""" from nose.tools import assert_equal def test_data_checksums(): from pyne.data import data_checksums assert_equal(len(data_checksums), 6) assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')Add test of internal hashes and guarded pyne.nuc_data us...
<commit_before>""" test data_checksums""" from nose.tools import assert_equal def test_data_checksums(): from pyne.data import data_checksums assert_equal(len(data_checksums), 6) assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be')<commit_msg>Add test of internal hashes a...
01641071c177e7b41f935a1683738f059e333d0b
tests/test_group.py
tests/test_group.py
import unittest import requests import requests_mock import settings from util import register_uris from pycanvas import Canvas from pycanvas.course import Course, CourseNickname, Page class TestGroup(unittest.TestCase): """ Tests Group functionality """ @classmethod def setUpClass(self): ...
Set up test group file
Set up test group file
Python
mit
ucfopen/canvasapi,ucfopen/canvasapi,ucfopen/canvasapi
Set up test group file
import unittest import requests import requests_mock import settings from util import register_uris from pycanvas import Canvas from pycanvas.course import Course, CourseNickname, Page class TestGroup(unittest.TestCase): """ Tests Group functionality """ @classmethod def setUpClass(self): ...
<commit_before><commit_msg>Set up test group file<commit_after>
import unittest import requests import requests_mock import settings from util import register_uris from pycanvas import Canvas from pycanvas.course import Course, CourseNickname, Page class TestGroup(unittest.TestCase): """ Tests Group functionality """ @classmethod def setUpClass(self): ...
Set up test group fileimport unittest import requests import requests_mock import settings from util import register_uris from pycanvas import Canvas from pycanvas.course import Course, CourseNickname, Page class TestGroup(unittest.TestCase): """ Tests Group functionality """ @classmethod def se...
<commit_before><commit_msg>Set up test group file<commit_after>import unittest import requests import requests_mock import settings from util import register_uris from pycanvas import Canvas from pycanvas.course import Course, CourseNickname, Page class TestGroup(unittest.TestCase): """ Tests Group function...
698732f1276f92a94143b0531906caf37e885c28
trello_notifications.py
trello_notifications.py
try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'action': self.show_...
try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'action': self.show_...
Store connection and missing self
Store connection and missing self
Python
mit
NicoSantangelo/sublime-text-trello
try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'action': self.show_...
try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'action': self.show_...
<commit_before>try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'acti...
try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'action': self.show_...
try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'action': self.show_...
<commit_before>try: from trello import TrelloCommand from output import Output except ImportError: from .trello import TrelloCommand from .output import Output class TrelloNotificationsCommand(TrelloCommand): def work(self, connection): self.options = [ { 'name': "Unread", 'acti...
66c1b353a7fce078fc9c4209e453906b098a22e8
tests/common.py
tests/common.py
from pprint import pprint, pformat import datetime import os import itertools from sgmock import Fixture from sgmock import TestCase if 'USE_SHOTGUN' in os.environ: from shotgun_api3 import ShotgunError, Fault import shotgun_api3_registry def Shotgun(): return shotgun_api3_registry.connect('sgsess...
from pprint import pprint, pformat import datetime import itertools import os from sgmock import Fixture from sgmock import TestCase _shotgun_server = os.environ.get('SHOTGUN', 'mock') if _shotgun_server == 'mock': from sgmock import Shotgun, ShotgunError, Fault else: from shotgun_api3 import ShotgunError, Fa...
Change the way we test the real Shotgun server
Change the way we test the real Shotgun server
Python
bsd-3-clause
westernx/sgfs,westernx/sgfs
from pprint import pprint, pformat import datetime import os import itertools from sgmock import Fixture from sgmock import TestCase if 'USE_SHOTGUN' in os.environ: from shotgun_api3 import ShotgunError, Fault import shotgun_api3_registry def Shotgun(): return shotgun_api3_registry.connect('sgsess...
from pprint import pprint, pformat import datetime import itertools import os from sgmock import Fixture from sgmock import TestCase _shotgun_server = os.environ.get('SHOTGUN', 'mock') if _shotgun_server == 'mock': from sgmock import Shotgun, ShotgunError, Fault else: from shotgun_api3 import ShotgunError, Fa...
<commit_before>from pprint import pprint, pformat import datetime import os import itertools from sgmock import Fixture from sgmock import TestCase if 'USE_SHOTGUN' in os.environ: from shotgun_api3 import ShotgunError, Fault import shotgun_api3_registry def Shotgun(): return shotgun_api3_registry....
from pprint import pprint, pformat import datetime import itertools import os from sgmock import Fixture from sgmock import TestCase _shotgun_server = os.environ.get('SHOTGUN', 'mock') if _shotgun_server == 'mock': from sgmock import Shotgun, ShotgunError, Fault else: from shotgun_api3 import ShotgunError, Fa...
from pprint import pprint, pformat import datetime import os import itertools from sgmock import Fixture from sgmock import TestCase if 'USE_SHOTGUN' in os.environ: from shotgun_api3 import ShotgunError, Fault import shotgun_api3_registry def Shotgun(): return shotgun_api3_registry.connect('sgsess...
<commit_before>from pprint import pprint, pformat import datetime import os import itertools from sgmock import Fixture from sgmock import TestCase if 'USE_SHOTGUN' in os.environ: from shotgun_api3 import ShotgunError, Fault import shotgun_api3_registry def Shotgun(): return shotgun_api3_registry....
9796e60975474006940af723a6cb8b16bc632ae0
tz_app/context_processors.py
tz_app/context_processors.py
from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', pytz.utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, 'timezone...
from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', (pytz or timezone).utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, ...
Fix a bug when pytz isn't installed.
Fix a bug when pytz isn't installed.
Python
bsd-3-clause
aaugustin/django-tz-demo
from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', pytz.utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, 'timezone...
from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', (pytz or timezone).utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, ...
<commit_before>from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', pytz.utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, ...
from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', (pytz or timezone).utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, ...
from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', pytz.utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, 'timezone...
<commit_before>from django.conf import settings from django.utils import timezone try: import pytz except ImportError: pytz = None def timezones(request): alt_timezone = request.session.get('alt_timezone', pytz.utc) return { 'pytz': pytz, 'default_timezone_name': settings.TIME_ZONE, ...
1ce7f82fd76bca735c3e164cb6a67c9a8656af3b
trade_client.py
trade_client.py
import json import socket from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) try: sock.sendall(m...
import json import socket from crypto import retrieve_key from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) ...
Use public key as id.
Use public key as id.
Python
mit
Tribler/decentral-market
import json import socket from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) try: sock.sendall(m...
import json import socket from crypto import retrieve_key from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) ...
<commit_before>import json import socket from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) try: ...
import json import socket from crypto import retrieve_key from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) ...
import json import socket from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) try: sock.sendall(m...
<commit_before>import json import socket from orderbook import create_confirm def send_msg(ip, port, message): '''Sends a raw string to the given ip and port. Closes the socket and returns the response.''' sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((ip, port)) try: ...
e875856b544446dc9e0ac0368b1661e6a7af6c6d
tsparser/imu.py
tsparser/imu.py
from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): values = [int(x) for x in values] if data_id == '$GYRO': ...
from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): if data_id == '$GYRO': self.gyro = [int(x) for x in v...
Fix ValueError in IMUParser with non-ints in input
Fix ValueError in IMUParser with non-ints in input
Python
mit
m4tx/techswarm-receiver
from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): values = [int(x) for x in values] if data_id == '$GYRO': ...
from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): if data_id == '$GYRO': self.gyro = [int(x) for x in v...
<commit_before>from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): values = [int(x) for x in values] if data_...
from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): if data_id == '$GYRO': self.gyro = [int(x) for x in v...
from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): values = [int(x) for x in values] if data_id == '$GYRO': ...
<commit_before>from tsparser.parser import BaseParser class IMUParser(BaseParser): def __init__(self): self.gyro = None self.accel = None self.magnet = None self.pressure = None def parse(self, line, data_id, *values): values = [int(x) for x in values] if data_...
c8b86afc53af25c845c8303111a6e7b17d8c26b4
ciscripts/check/psqcppconan/check.py
ciscripts/check/psqcppconan/check.py
# /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=None): """Run ...
# /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=None): """Run ...
Allow the use of .exe
psqcppconan: Allow the use of .exe
Python
mit
polysquare/polysquare-ci-scripts,polysquare/polysquare-ci-scripts
# /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=None): """Run ...
# /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=None): """Run ...
<commit_before># /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=Non...
# /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=None): """Run ...
# /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=None): """Run ...
<commit_before># /ciscripts/check/psqcppconan/check.py # # Run tests and static analysis checks on a polysquare conan c++ project. # # See /LICENCE.md for Copyright information """Run tests and static analysis checks on a polysquare conan c++ project.""" import argparse import os def run(cont, util, shell, argv=Non...
e3cb7ad226e3c26cbfa6f9f322ebdb4fde7e7d60
coop_cms/apps/coop_bootstrap/templatetags/coop_bs.py
coop_cms/apps/coop_bootstrap/templatetags/coop_bs.py
# -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode register = template.Library() # Just for c...
# -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode, extract_kwargs register = template.Library...
Fix "navigation_bootstrap" templatetag : arguments were ignored
Fix "navigation_bootstrap" templatetag : arguments were ignored
Python
bsd-3-clause
ljean/coop_cms,ljean/coop_cms,ljean/coop_cms
# -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode register = template.Library() # Just for c...
# -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode, extract_kwargs register = template.Library...
<commit_before># -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode register = template.Library(...
# -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode, extract_kwargs register = template.Library...
# -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode register = template.Library() # Just for c...
<commit_before># -*- coding: utf-8 -*- """ Some tools for templates """ from __future__ import unicode_literals from django import template from coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox from coop_cms.templatetags.coop_navigation import NavigationAsNestedUlNode register = template.Library(...
8a4b576d6df4ef1f174c8698ff9a86dbf2f5bd4a
workshops/models.py
workshops/models.py
from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name='workshops') ...
from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name='workshops') ...
Check price exists before using it
Check price exists before using it
Python
bsd-3-clause
WebCampZg/conference-web,WebCampZg/conference-web,WebCampZg/conference-web
from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name='workshops') ...
from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name='workshops') ...
<commit_before>from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name...
from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name='workshops') ...
from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name='workshops') ...
<commit_before>from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', PROTECT, related_name='workshops') applicant = models.ForeignKey('cfp.Applicant', related_name...
ea3660bcc1a9f7be619def8e26dd7b0ab4a873cf
estmator_project/est_client/forms.py
estmator_project/est_client/forms.py
from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', 'desk', ...
from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', 'desk', ...
Make fields required on new client and company
Make fields required on new client and company
Python
mit
Estmator/EstmatorApp,Estmator/EstmatorApp,Estmator/EstmatorApp
from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', 'desk', ...
from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', 'desk', ...
<commit_before>from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', ...
from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', 'desk', ...
from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', 'desk', ...
<commit_before>from django.forms import ModelForm, Select, TextInput from .models import Client, Company class ClientCreateForm(ModelForm): class Meta: model = Client fields = [ 'company', 'first_name', 'last_name', 'title', 'cell', ...