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
e912f360ff66f2247223386e2b3600e1631a5a50
django_oauthlib/testrunner.py
django_oauthlib/testrunner.py
import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=('django.contrib.auth', 'django.contrib.contenttypes', 'django_oauthlib',) ) def run_te...
import logging import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=( 'django.contrib.auth', 'django.contrib.contenttypes', ...
Add session and logging to test setup.
Add session and logging to test setup.
Python
bsd-3-clause
ib-lundgren/django-oauthlib
import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=('django.contrib.auth', 'django.contrib.contenttypes', 'django_oauthlib',) ) def run_te...
import logging import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=( 'django.contrib.auth', 'django.contrib.contenttypes', ...
<commit_before>import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=('django.contrib.auth', 'django.contrib.contenttypes', 'django_oauthlib',)...
import logging import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=( 'django.contrib.auth', 'django.contrib.contenttypes', ...
import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=('django.contrib.auth', 'django.contrib.contenttypes', 'django_oauthlib',) ) def run_te...
<commit_before>import sys from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, ROOT_URLCONF='django_oauthlib.urls', INSTALLED_APPS=('django.contrib.auth', 'django.contrib.contenttypes', 'django_oauthlib',)...
c272e73c0d3112425e0ba25c58448f7c1d492d11
api/src/SearchApi.py
api/src/SearchApi.py
from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPER_KEY = devKeyF...
from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPER_KEY = devKeyF...
Update search api filter out unwanted information
Update search api filter out unwanted information
Python
mit
jghibiki/mopey,jghibiki/mopey,jghibiki/mopey,jghibiki/mopey,jghibiki/mopey
from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPER_KEY = devKeyF...
from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPER_KEY = devKeyF...
<commit_before>from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPE...
from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPER_KEY = devKeyF...
from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPER_KEY = devKeyF...
<commit_before>from apiclient.discovery import build import json # Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps # tab of # https://cloud.google.com/console # Please ensure that you have enabled the YouTube Data API for your project. devKeyFile = open("search-api.key", "rb") DEVELOPE...
557c2ab8d6a0416219e3323427bd5e7bd735554f
nitroml/analytics/materialized_artifact.py
nitroml/analytics/materialized_artifact.py
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Fix case typo in 'to_dataframe' abstract method return type.
Fix case typo in 'to_dataframe' abstract method return type. Also updates abstract property to abstract method. PiperOrigin-RevId: 339248589
Python
apache-2.0
google/nitroml
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
caefc30377f45ecdb955fec86e7de681a5cb6522
clean_txt_files.py
clean_txt_files.py
""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: content = f.re...
""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: content = f.re...
Add break line on clean txt files
Add break line on clean txt files
Python
mit
SetaSouto/license-plate-detection
""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: content = f.re...
""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: content = f.re...
<commit_before>""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: ...
""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: content = f.re...
""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: content = f.re...
<commit_before>""" Script to clean the txt generated files and kept only the 37 class: LICENSE-PLATE and set the number 0 to the class. """ import os dataset_dir = "data/dataset/" for filename in list(filter(lambda x: x[-3:] == "txt", os.listdir(dataset_dir))): with open(dataset_dir + filename, 'r') as f: ...
444bba442e581226b650af929c85ccc885c60297
microcosm/tracing.py
microcosm/tracing.py
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", sample_param=typed(int, 10), sampling_...
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed from microcosm.config.types import boolean SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", ...
Disable jaeger logging by default
Disable jaeger logging by default
Python
apache-2.0
globality-corp/microcosm,globality-corp/microcosm
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", sample_param=typed(int, 10), sampling_...
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed from microcosm.config.types import boolean SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", ...
<commit_before>from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", sample_param=typed(int, 10)...
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed from microcosm.config.types import boolean SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", ...
from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", sample_param=typed(int, 10), sampling_...
<commit_before>from jaeger_client.config import ( DEFAULT_REPORTING_HOST, DEFAULT_REPORTING_PORT, DEFAULT_SAMPLING_PORT, Config, ) from microcosm.api import binding, defaults, typed SPAN_NAME = "span_name" @binding("tracer") @defaults( sample_type="ratelimiting", sample_param=typed(int, 10)...
864555f431a5dc0560e93ef9055e6cc49c499835
tests/test_basic_create.py
tests/test_basic_create.py
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) self.assertIsNot(spec, proj) self.assertEqual(len(proj),...
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) print proj self.assertIsNot(spec, proj) self.ass...
Adjust test for returned name
Adjust test for returned name
Python
bsd-3-clause
westernx/sgmock
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) self.assertIsNot(spec, proj) self.assertEqual(len(proj),...
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) print proj self.assertIsNot(spec, proj) self.ass...
<commit_before>from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) self.assertIsNot(spec, proj) self.assertE...
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) print proj self.assertIsNot(spec, proj) self.ass...
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) self.assertIsNot(spec, proj) self.assertEqual(len(proj),...
<commit_before>from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) self.assertIsNot(spec, proj) self.assertE...
1b80972fe97bebbb20d9e6073b41d286f253c1ef
documents/views/utils.py
documents/views/utils.py
import mimetypes import os from django.http import HttpResponse mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') mimetypes.add_type('text/x-sbsform-g2','.bk') def re...
import mimetypes import os from django.http import HttpResponse from django.core.servers.basehttp import FileWrapper mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') m...
Use FileWrapper to send files to browser in chunks of 8KB
Use FileWrapper to send files to browser in chunks of 8KB Maybe this will fix a problem on the test server when it tries to send a huge file.
Python
agpl-3.0
sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer
import mimetypes import os from django.http import HttpResponse mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') mimetypes.add_type('text/x-sbsform-g2','.bk') def re...
import mimetypes import os from django.http import HttpResponse from django.core.servers.basehttp import FileWrapper mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') m...
<commit_before>import mimetypes import os from django.http import HttpResponse mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') mimetypes.add_type('text/x-sbsform-g2'...
import mimetypes import os from django.http import HttpResponse from django.core.servers.basehttp import FileWrapper mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') m...
import mimetypes import os from django.http import HttpResponse mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') mimetypes.add_type('text/x-sbsform-g2','.bk') def re...
<commit_before>import mimetypes import os from django.http import HttpResponse mimetypes.init() mimetypes.add_type('application/epub+zip','.epub') mimetypes.add_type('text/x-brl','.brl') mimetypes.add_type('text/x-sbsform-g0','.bv') mimetypes.add_type('text/x-sbsform-g1','.bv') mimetypes.add_type('text/x-sbsform-g2'...
a12e3f0de9e8c10c279d795744f87b7e716bd34c
markitup_filebrowser/fields.py
markitup_filebrowser/fields.py
from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) from django.con...
from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) from django.con...
Allow south to handle MarkupFilebrowserFiled
Allow south to handle MarkupFilebrowserFiled
Python
bsd-3-clause
Iv/django-markiup-filebrowser,Iv/django-markiup-filebrowser
from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) from django.con...
from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) from django.con...
<commit_before>from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) ...
from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) from django.con...
from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) from django.con...
<commit_before>from markitup.fields import MarkupField import widgets class MarkupFilebrowserFiled(MarkupField): def formfield(self, **kwargs): defaults = {'widget': widgets.MarkitUpFilebrowserWiget} defaults.update(kwargs) return super(MarkupFilebrowserFiled, self).formfield(**defaults) ...
2ace9ce514d7299a8f3e8dca134a6e4eb3284937
parser2.py
parser2.py
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r self.summ...
from pprint import pprint class Hand: def __init__(self, string): segments = "seats preflop flop turn river".split() self.seats = None self.preflop = None self.flop = None self.turn = None self.river = None self.summary = None ## step 2: split each ha...
Move parsing loop into the class itself.
Move parsing loop into the class itself.
Python
mit
zimolzak/Ignition-poker-parser
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r self.summ...
from pprint import pprint class Hand: def __init__(self, string): segments = "seats preflop flop turn river".split() self.seats = None self.preflop = None self.flop = None self.turn = None self.river = None self.summary = None ## step 2: split each ha...
<commit_before>from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r ...
from pprint import pprint class Hand: def __init__(self, string): segments = "seats preflop flop turn river".split() self.seats = None self.preflop = None self.flop = None self.turn = None self.river = None self.summary = None ## step 2: split each ha...
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r self.summ...
<commit_before>from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r ...
eb5dc3ef7e7904549f50a4255477ed50d3ee53ab
twinsies/clock.py
twinsies/clock.py
from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch_size=10000): ...
from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch_size=5000): ...
Reduce fetch size to 5000. Don't run job on startup.
Reduce fetch size to 5000. Don't run job on startup.
Python
mit
kkwteh/twinyewest
from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch_size=10000): ...
from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch_size=5000): ...
<commit_before>from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch...
from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch_size=5000): ...
from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch_size=10000): ...
<commit_before>from apscheduler.schedulers.blocking import BlockingScheduler from twinsies.twitter import (random_trend_query, fetch_tweets, dig_for_twins, update_status) from memory_profiler import profile sched = BlockingScheduler() @sched.scheduled_job('interval', minutes=16) @profile def twinsy_finder(fetch...
796e734f67ea3c4afcb6c17204108d9b2c3d7120
website/forms.py
website/forms.py
from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCreateForm(forms....
from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCreateForm(forms....
Validate email id, while editing user profile
Validate email id, while editing user profile
Python
agpl-3.0
CoderBounty/coderbounty,CoderBounty/coderbounty,atuljain/coderbounty,atuljain/coderbounty,atuljain/coderbounty,CoderBounty/coderbounty,atuljain/coderbounty,CoderBounty/coderbounty
from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCreateForm(forms....
from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCreateForm(forms....
<commit_before>from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCr...
from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCreateForm(forms....
from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCreateForm(forms....
<commit_before>from django import forms from .models import Issue,Bounty,UserProfile from django.contrib.auth.models import User class IssueCreateForm(forms.ModelForm): issueUrl = forms.CharField(label="issueUrl") class Meta: model = Issue fields = ('title','language','content') class BountyCr...
7b9a04cb8655fad955829936c2b43b9ca37b3fe8
ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/db.py
ckanext/ckanext-apicatalog_routes/ckanext/apicatalog_routes/db.py
import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unicode(uuid.uuid4(...
import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unicode(uuid.uuid4(...
Add state column to user create api
Add state column to user create api
Python
mit
vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog
import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unicode(uuid.uuid4(...
import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unicode(uuid.uuid4(...
<commit_before>import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unic...
import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unicode(uuid.uuid4(...
import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unicode(uuid.uuid4(...
<commit_before>import uuid from ckan import model from ckan.lib import dictization from ckan.plugins import toolkit from sqlalchemy import Column, types from sqlalchemy.ext.declarative import declarative_base import logging log = logging.getLogger(__name__) Base = declarative_base() def make_uuid(): return unic...
98b0eb3d492cb816db7ffa7ad062dde36a1feadf
tests/unit/test_gettext.py
tests/unit/test_gettext.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
Use testtools as test base class.
Use testtools as test base class. On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtoo...
Python
apache-2.0
varunarya10/oslo.i18n,openstack/oslo.i18n
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://w...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/l...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://w...
c65306f78f1eb97714fd2086d20ff781faf78c3a
problems/starterpackages/SteinerStarter.py
problems/starterpackages/SteinerStarter.py
import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 def getProblem(filename): pts = [] with open(filename, 'r') as input: for line in input: l = line.split(' ') ...
import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 # Gets a problem from a file as an list of points. def getProblem(filename): pts = [] with open(filename, 'r') as ...
Make py starterpackage more like java/c++ one
Make py starterpackage more like java/c++ one
Python
mit
HMProgrammingClub/NYCSL,HMProgrammingClub/NYCSL,HMProgrammingClub/NYCSL,HMProgrammingClub/NYCSL,HMProgrammingClub/NYCSL,HMProgrammingClub/NYCSL,HMProgrammingClub/NYCSL
import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 def getProblem(filename): pts = [] with open(filename, 'r') as input: for line in input: l = line.split(' ') ...
import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 # Gets a problem from a file as an list of points. def getProblem(filename): pts = [] with open(filename, 'r') as ...
<commit_before>import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 def getProblem(filename): pts = [] with open(filename, 'r') as input: for line in input: l = l...
import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 # Gets a problem from a file as an list of points. def getProblem(filename): pts = [] with open(filename, 'r') as ...
import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 def getProblem(filename): pts = [] with open(filename, 'r') as input: for line in input: l = line.split(' ') ...
<commit_before>import math import sys # A helper class for working with points. class Point: def __init__(self, x, y): self.x = x self.y = y class Edge: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 def getProblem(filename): pts = [] with open(filename, 'r') as input: for line in input: l = l...
865b9d8307f35203d7242e9c431ec2f6cb65c42e
whyis/manager.py
whyis/manager.py
# -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = import_config_mo...
# -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = import_config_mo...
Revert "Made commands consistent on use of underscores. Re-enabled 'interpret' command that had been misplaced."
Revert "Made commands consistent on use of underscores. Re-enabled 'interpret' command that had been misplaced." This reverts commit 7827598d1060442570685e94633093c550ce7ff2.
Python
apache-2.0
tetherless-world/graphene,tetherless-world/graphene,tetherless-world/satoru,tetherless-world/satoru,tetherless-world/satoru,tetherless-world/graphene,tetherless-world/satoru,tetherless-world/graphene
# -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = import_config_mo...
# -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = import_config_mo...
<commit_before># -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = i...
# -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = import_config_mo...
# -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = import_config_mo...
<commit_before># -*- coding:utf-8 -*- import flask_script as script from whyis import commands from whyis.app_factory import app_factory from whyis.config_utils import import_config_module class Manager(script.Manager): def __init__(self): script.Manager.__init__(self, app_factory) config = i...
3f635db216c292c0eec720d28ecfbec3e23f1ca5
ynr/s3_storage.py
ynr/s3_storage.py
from storages.backends.s3boto3 import S3Boto3Storage from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class StaticStorage(PipelineMixin, ManifestFilesMixin, S3Boto3Storage): """ Store static files on S3 at STATICFILE...
import os from storages.backends.s3boto3 import S3Boto3Storage, SpooledTemporaryFile from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class PatchedS3Boto3Storage(S3Boto3Storage): def _save_content(self, obj, content, pa...
Patch S3Boto3Storage to prevent closed file error when collectin static
Patch S3Boto3Storage to prevent closed file error when collectin static This is copied from the aggregator API and prevents a bug where the storage closes the files too early, raising a boto exception.
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
from storages.backends.s3boto3 import S3Boto3Storage from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class StaticStorage(PipelineMixin, ManifestFilesMixin, S3Boto3Storage): """ Store static files on S3 at STATICFILE...
import os from storages.backends.s3boto3 import S3Boto3Storage, SpooledTemporaryFile from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class PatchedS3Boto3Storage(S3Boto3Storage): def _save_content(self, obj, content, pa...
<commit_before>from storages.backends.s3boto3 import S3Boto3Storage from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class StaticStorage(PipelineMixin, ManifestFilesMixin, S3Boto3Storage): """ Store static files on S...
import os from storages.backends.s3boto3 import S3Boto3Storage, SpooledTemporaryFile from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class PatchedS3Boto3Storage(S3Boto3Storage): def _save_content(self, obj, content, pa...
from storages.backends.s3boto3 import S3Boto3Storage from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class StaticStorage(PipelineMixin, ManifestFilesMixin, S3Boto3Storage): """ Store static files on S3 at STATICFILE...
<commit_before>from storages.backends.s3boto3 import S3Boto3Storage from django.contrib.staticfiles.storage import ManifestFilesMixin from pipeline.storage import PipelineMixin from django.conf import settings class StaticStorage(PipelineMixin, ManifestFilesMixin, S3Boto3Storage): """ Store static files on S...
7b939076fba1bb11d0ded504bcf10da457b3d092
scripts/add_identifiers_to_existing_preprints.py
scripts/add_identifiers_to_existing_preprints.py
import logging import time from website.app import init_app from website.identifiers.utils import get_top_level_domain, request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService prepr...
import logging import time from website.app import init_app from website.identifiers.utils import request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService preprints_without_identifie...
Remove check for domain in DOI
Remove check for domain in DOI
Python
apache-2.0
mattclark/osf.io,crcresearch/osf.io,aaxelb/osf.io,saradbowman/osf.io,adlius/osf.io,mattclark/osf.io,laurenrevere/osf.io,Johnetordoff/osf.io,brianjgeiger/osf.io,leb2dg/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,sloria/osf.io,mfraezz/osf.io,chrisseto/osf.io,pattisdr/osf.io,sloria/osf.io,adlius/osf.io,felliott/osf.i...
import logging import time from website.app import init_app from website.identifiers.utils import get_top_level_domain, request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService prepr...
import logging import time from website.app import init_app from website.identifiers.utils import request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService preprints_without_identifie...
<commit_before>import logging import time from website.app import init_app from website.identifiers.utils import get_top_level_domain, request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintSer...
import logging import time from website.app import init_app from website.identifiers.utils import request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService preprints_without_identifie...
import logging import time from website.app import init_app from website.identifiers.utils import get_top_level_domain, request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService prepr...
<commit_before>import logging import time from website.app import init_app from website.identifiers.utils import get_top_level_domain, request_identifiers_from_ezid logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintSer...
ade3a316166d3c4c362becd7880e60bd9387b259
courriers/management/commands/mailjet_sync_unsubscribed.py
courriers/management/commands/mailjet_sync_unsubscribed.py
from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='connection', ...
from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='connection', ...
Select only unsubscribed contacts from mailjet on sync script
Select only unsubscribed contacts from mailjet on sync script
Python
mit
ulule/django-courriers,ulule/django-courriers
from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='connection', ...
from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='connection', ...
<commit_before>from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='conne...
from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='connection', ...
from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='connection', ...
<commit_before>from django.core.management.base import BaseCommand from django.db import DEFAULT_DB_ALIAS from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--connection', action='store', dest='conne...
be40174929193085ccd38683e64944fb4aabb26b
serial_reader.py
serial_reader.py
#!/usr/bin/env python from argparse import ArgumentParser import sys import serial def run(device, baud): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if line: sys.stdout.write(line) if __name__ == '__main__': parser =...
#!/usr/bin/env python from argparse import ArgumentParser import sys import serial from datetime import datetime def run(device, baud, prefix=None): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if not line: continue ...
Add option to timestamp each line from serial
Add option to timestamp each line from serial
Python
unlicense
recursify/serial-debug-tool
#!/usr/bin/env python from argparse import ArgumentParser import sys import serial def run(device, baud): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if line: sys.stdout.write(line) if __name__ == '__main__': parser =...
#!/usr/bin/env python from argparse import ArgumentParser import sys import serial from datetime import datetime def run(device, baud, prefix=None): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if not line: continue ...
<commit_before>#!/usr/bin/env python from argparse import ArgumentParser import sys import serial def run(device, baud): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if line: sys.stdout.write(line) if __name__ == '__main__...
#!/usr/bin/env python from argparse import ArgumentParser import sys import serial from datetime import datetime def run(device, baud, prefix=None): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if not line: continue ...
#!/usr/bin/env python from argparse import ArgumentParser import sys import serial def run(device, baud): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if line: sys.stdout.write(line) if __name__ == '__main__': parser =...
<commit_before>#!/usr/bin/env python from argparse import ArgumentParser import sys import serial def run(device, baud): with serial.Serial(device, baud, timeout=0.1) as ser: while True: line = ser.readline() if line: sys.stdout.write(line) if __name__ == '__main__...
f035ea7fb453d09b37f5187c4f61e855b048cbd5
aslo/web/__init__.py
aslo/web/__init__.py
from flask import Blueprint, g web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefault('lang_code', ...
from flask import Blueprint, g, session web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefault('lan...
Use sessions to Tie it a with language. Also helps us to retrieve session code later " "
Use sessions to Tie it a with language. Also helps us to retrieve session code later " "
Python
mit
jatindhankhar/aslo-v3,jatindhankhar/aslo-v3,jatindhankhar/aslo-v3,jatindhankhar/aslo-v3
from flask import Blueprint, g web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefault('lang_code', ...
from flask import Blueprint, g, session web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefault('lan...
<commit_before>from flask import Blueprint, g web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefaul...
from flask import Blueprint, g, session web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefault('lan...
from flask import Blueprint, g web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefault('lang_code', ...
<commit_before>from flask import Blueprint, g web = Blueprint('web', __name__, template_folder='templates', static_folder='static', static_url_path='/web/static', url_prefix='/<lang_code>') @web.url_defaults def add_language_code(endpoint, values): values.setdefaul...
5d332259e16758bc43201073db91409390be9134
UM/Operations/GroupedOperation.py
UM/Operations/GroupedOperation.py
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond to only one in...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond to only one in...
Remove removeOperation from grouped operation
Remove removeOperation from grouped operation This function is never used and actually should never be used. The operation may not be modified after it is used, so removing an operation from the list makes no sense.
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond to only one in...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond to only one in...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond to only one in...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond to only one in...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation ## An operation that groups several other operations together. # # The intent of this operation is to hide an underlying chain of operations # from the user if they correspond...
ef75ec5d27fcbcee1b451b5e22828a1129cfd209
opps/boxes/models.py
opps/boxes/models.py
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
Add default (7) on limit field queryset model boxes
Add default (7) on limit field queryset model boxes
Python
mit
YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,YACOWS/opps,williamroot/opps,williamroot/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps,opps/opps,jeanmask/opps,jeanmask/opps,opps/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1}".format( ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- #from django.conf import settings #from django.utils.importlib import import_module from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models import Publishable, BaseBox try: OPPS_APPS = tuple([(u"{0}.{1...
38d7092f07884cb2530f95a5dc24ba177bfbe699
ncclient/operations/third_party/nexus/rpc.py
ncclient/operations/third_party/nexus/rpc.py
from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmd): parent_node = etree.Element(qualify('exec-command', NXOS_1_0)) child_node = etree.SubElement(parent_node, qualify('cmd', NXOS_1_0)) child_node.text = c...
from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmds): node = etree.Element(qualify('exec-command', NXOS_1_0)) for cmd in cmds: etree.SubElement(node, qualify('cmd', NXOS_1_0)).text = cmd ret...
Allow specifying multiple cmd elements
Allow specifying multiple cmd elements
Python
apache-2.0
nwautomator/ncclient,joysboy/ncclient,aitorhh/ncclient,ncclient/ncclient,vnitinv/ncclient,cmoberg/ncclient,earies/ncclient,einarnn/ncclient,leopoul/ncclient,kroustou/ncclient,lightlu/ncclient,nnakamot/ncclient,OpenClovis/ncclient,GIC-de/ncclient
from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmd): parent_node = etree.Element(qualify('exec-command', NXOS_1_0)) child_node = etree.SubElement(parent_node, qualify('cmd', NXOS_1_0)) child_node.text = c...
from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmds): node = etree.Element(qualify('exec-command', NXOS_1_0)) for cmd in cmds: etree.SubElement(node, qualify('cmd', NXOS_1_0)).text = cmd ret...
<commit_before>from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmd): parent_node = etree.Element(qualify('exec-command', NXOS_1_0)) child_node = etree.SubElement(parent_node, qualify('cmd', NXOS_1_0)) chil...
from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmds): node = etree.Element(qualify('exec-command', NXOS_1_0)) for cmd in cmds: etree.SubElement(node, qualify('cmd', NXOS_1_0)).text = cmd ret...
from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmd): parent_node = etree.Element(qualify('exec-command', NXOS_1_0)) child_node = etree.SubElement(parent_node, qualify('cmd', NXOS_1_0)) child_node.text = c...
<commit_before>from lxml import etree from ncclient.xml_ import * from ncclient.operations.rpc import RPC class ExecCommand(RPC): def request(self, cmd): parent_node = etree.Element(qualify('exec-command', NXOS_1_0)) child_node = etree.SubElement(parent_node, qualify('cmd', NXOS_1_0)) chil...
0a152c792e2ebf20056780b5a20765175d73108b
ipv6map/geodata/admin.py
ipv6map/geodata/admin.py
from django.contrib import admin from . import models class BaseReadOnlyAdmin(admin.ModelAdmin): list_display_links = None def has_change_permission(self, request, obj=None): return False if obj else True @admin.register(models.Version) class VersionAdmin(BaseReadOnlyAdmin): list_display = ['p...
from django.contrib import admin from . import models @admin.register(models.Version) class VersionAdmin(admin.ModelAdmin): fieldsets = [ (None, { 'fields': ['publish_date', 'location_count'], }), ("Status", { 'fields': ['is_active'], }), ] list_dis...
Allow toggling active/inactive in VersionAdmin
Allow toggling active/inactive in VersionAdmin
Python
unlicense
rlmuraya/ipv6map,rlmuraya/ipv6map,rlmuraya/ipv6map,rlmuraya/ipv6map
from django.contrib import admin from . import models class BaseReadOnlyAdmin(admin.ModelAdmin): list_display_links = None def has_change_permission(self, request, obj=None): return False if obj else True @admin.register(models.Version) class VersionAdmin(BaseReadOnlyAdmin): list_display = ['p...
from django.contrib import admin from . import models @admin.register(models.Version) class VersionAdmin(admin.ModelAdmin): fieldsets = [ (None, { 'fields': ['publish_date', 'location_count'], }), ("Status", { 'fields': ['is_active'], }), ] list_dis...
<commit_before>from django.contrib import admin from . import models class BaseReadOnlyAdmin(admin.ModelAdmin): list_display_links = None def has_change_permission(self, request, obj=None): return False if obj else True @admin.register(models.Version) class VersionAdmin(BaseReadOnlyAdmin): lis...
from django.contrib import admin from . import models @admin.register(models.Version) class VersionAdmin(admin.ModelAdmin): fieldsets = [ (None, { 'fields': ['publish_date', 'location_count'], }), ("Status", { 'fields': ['is_active'], }), ] list_dis...
from django.contrib import admin from . import models class BaseReadOnlyAdmin(admin.ModelAdmin): list_display_links = None def has_change_permission(self, request, obj=None): return False if obj else True @admin.register(models.Version) class VersionAdmin(BaseReadOnlyAdmin): list_display = ['p...
<commit_before>from django.contrib import admin from . import models class BaseReadOnlyAdmin(admin.ModelAdmin): list_display_links = None def has_change_permission(self, request, obj=None): return False if obj else True @admin.register(models.Version) class VersionAdmin(BaseReadOnlyAdmin): lis...
e486b4d2fe9fb788a027a354aa921dcaa9917946
tests/integrations/conftest.py
tests/integrations/conftest.py
import pytest from tests.utils import FakeBugsnagServer import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server bugsnag.configure(app_type=None) server.shutdown()
import pytest from tests.utils import FakeBugsnagServer import bugsnag.legacy as global_setup import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server # Reset shared client config global_...
Reset configuration fixture after each test
tests: Reset configuration fixture after each test
Python
mit
bugsnag/bugsnag-python,bugsnag/bugsnag-python
import pytest from tests.utils import FakeBugsnagServer import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server bugsnag.configure(app_type=None) server.shutdown() tests: Reset configurat...
import pytest from tests.utils import FakeBugsnagServer import bugsnag.legacy as global_setup import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server # Reset shared client config global_...
<commit_before>import pytest from tests.utils import FakeBugsnagServer import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server bugsnag.configure(app_type=None) server.shutdown() <commit_...
import pytest from tests.utils import FakeBugsnagServer import bugsnag.legacy as global_setup import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server # Reset shared client config global_...
import pytest from tests.utils import FakeBugsnagServer import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server bugsnag.configure(app_type=None) server.shutdown() tests: Reset configurat...
<commit_before>import pytest from tests.utils import FakeBugsnagServer import bugsnag @pytest.fixture def bugsnag_server(): server = FakeBugsnagServer() bugsnag.configure(endpoint=server.url, api_key='3874876376238728937') yield server bugsnag.configure(app_type=None) server.shutdown() <commit_...
7bea8f5cb6f958225ce61a9f7ce439e9a80036ea
tests/unit/utils/cache_test.py
tests/unit/utils/cache_test.py
# -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils import cache im...
# -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils import cache im...
Change python asserts to unittest asserts
Change python asserts to unittest asserts
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils import cache im...
# -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils import cache im...
<commit_before># -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils i...
# -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils import cache im...
# -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils import cache im...
<commit_before># -*- coding: utf-8 -*- ''' tests.unit.utils.cache_test ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt cache objects ''' # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs from salt.utils i...
091a08a8fe30c3cc00c6b85552e47a1b15b807b8
preferences/views.py
preferences/views.py
from django.shortcuts import render # Create your views here. from registration.views import RegistrationView from registration.forms import RegistrationFormUniqueEmail class EmailRegistrationView(RegistrationView): form_class = RegistrationFormUniqueEmail
from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): form_class ...
Add userprefs and email reg view
Add userprefs and email reg view
Python
mit
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
from django.shortcuts import render # Create your views here. from registration.views import RegistrationView from registration.forms import RegistrationFormUniqueEmail class EmailRegistrationView(RegistrationView): form_class = RegistrationFormUniqueEmailAdd userprefs and email reg view
from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): form_class ...
<commit_before>from django.shortcuts import render # Create your views here. from registration.views import RegistrationView from registration.forms import RegistrationFormUniqueEmail class EmailRegistrationView(RegistrationView): form_class = RegistrationFormUniqueEmail<commit_msg>Add userprefs and email reg v...
from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): form_class ...
from django.shortcuts import render # Create your views here. from registration.views import RegistrationView from registration.forms import RegistrationFormUniqueEmail class EmailRegistrationView(RegistrationView): form_class = RegistrationFormUniqueEmailAdd userprefs and email reg viewfrom django.shortcuts im...
<commit_before>from django.shortcuts import render # Create your views here. from registration.views import RegistrationView from registration.forms import RegistrationFormUniqueEmail class EmailRegistrationView(RegistrationView): form_class = RegistrationFormUniqueEmail<commit_msg>Add userprefs and email reg v...
5b877d2c42a44fb4ebd1c72f89a595ac5c095e07
wsgi/bufsm/mainapp/urls.py
wsgi/bufsm/mainapp/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.getLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), url(r'^test$', views.testLinha), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.testLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), ]
Test in the original URL
Test in the original URL
Python
mit
bufsm/bufsm,bufsm/bufsm,bufsm/bufsm,bufsm/bufsm,bufsm/bufsm
from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.getLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), url(r'^test$', views.testLinha), ] Test in the original URL
from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.testLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), ]
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.getLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), url(r'^test$', views.testLinha), ] <commit_msg>Test in the original URL<commi...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.testLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.getLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), url(r'^test$', views.testLinha), ] Test in the original URLfrom django.conf.urls import url ...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^linha/(?P<idLinha>[0-9]+)$', views.getLinha), url(r'^linha/(?P<idLinha>[0-9]+)/(?P<token>.+)/(?P<lat>.+)/(?P<lng>.+)$', views.writeLinha), url(r'^test$', views.testLinha), ] <commit_msg>Test in the original URL<commi...
fc7ad7d55622aa9edb77b9f7822260110a772805
db.py
db.py
from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os secrets = getAllSecrets(region="eu-west-1") for key, val in secrets.items(): os.environ[key] = val application = create_app() manager = Manag...
from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as en...
Bring DB script into line with other prod scripts
Bring DB script into line with other prod scripts
Python
mit
alphagov/notifications-api,alphagov/notifications-api
from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os secrets = getAllSecrets(region="eu-west-1") for key, val in secrets.items(): os.environ[key] = val application = create_app() manager = Manag...
from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as en...
<commit_before>from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os secrets = getAllSecrets(region="eu-west-1") for key, val in secrets.items(): os.environ[key] = val application = create_app() ...
from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as en...
from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os secrets = getAllSecrets(region="eu-west-1") for key, val in secrets.items(): os.environ[key] = val application = create_app() manager = Manag...
<commit_before>from flask.ext.script import Manager, Server from flask_migrate import Migrate, MigrateCommand from app import create_app, db from credstash import getAllSecrets import os secrets = getAllSecrets(region="eu-west-1") for key, val in secrets.items(): os.environ[key] = val application = create_app() ...
cf7ed25377cb708d8d344bce406bd63fc4d22982
tests/query_test/test_udfs.py
tests/query_test/test_udfs.py
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimensions(cls): ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimensions(cls): ...
Fix UDF test, take two
Fix UDF test, take two Change-Id: I817389d94dab665199d2c1b7365e8ce0d1495c41 Reviewed-on: http://gerrit.ent.cloudera.com:8080/504 Reviewed-by: Skye Wanderman-Milne <[email protected]> Tested-by: Skye Wanderman-Milne <[email protected]>
Python
apache-2.0
michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimensions(cls): ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimensions(cls): ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimens...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimensions(cls): ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimensions(cls): ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. from tests.common.test_vector import * from tests.common.impala_test_suite import * class TestUdfs(ImpalaTestSuite): @classmethod def get_workload(cls): return 'functional-query' @classmethod def add_test_dimens...
f0dc039976831ece319cb3c4992af54ac3c4c62d
virtool/pathoscope/subtract.py
virtool/pathoscope/subtract.py
from virtool.pathoscope import sam def run(isolate_sam, host_sam): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam) # This list will contain the read_ids for all reads that had better mapping qualities against the host # genome skipped = list()...
from virtool.pathoscope import sam def run(isolate_sam, host_sam, snap=False): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam, snap=snap) # This list will contain the read_ids for all reads that had better mapping qualities against the host # geno...
Add parameters for dealing with SNAP output to Pathoscope sam module
Add parameters for dealing with SNAP output to Pathoscope sam module
Python
mit
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
from virtool.pathoscope import sam def run(isolate_sam, host_sam): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam) # This list will contain the read_ids for all reads that had better mapping qualities against the host # genome skipped = list()...
from virtool.pathoscope import sam def run(isolate_sam, host_sam, snap=False): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam, snap=snap) # This list will contain the read_ids for all reads that had better mapping qualities against the host # geno...
<commit_before>from virtool.pathoscope import sam def run(isolate_sam, host_sam): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam) # This list will contain the read_ids for all reads that had better mapping qualities against the host # genome s...
from virtool.pathoscope import sam def run(isolate_sam, host_sam, snap=False): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam, snap=snap) # This list will contain the read_ids for all reads that had better mapping qualities against the host # geno...
from virtool.pathoscope import sam def run(isolate_sam, host_sam): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam) # This list will contain the read_ids for all reads that had better mapping qualities against the host # genome skipped = list()...
<commit_before>from virtool.pathoscope import sam def run(isolate_sam, host_sam): # Get a mapping score for every read mapped to the host genome host_scores = sam.all_scores(host_sam) # This list will contain the read_ids for all reads that had better mapping qualities against the host # genome s...
2f67880e777c9efa5192f5c34ce5fc7d71fc0f08
partner_communication_switzerland/wizards/end_contract_wizard.py
partner_communication_switzerland/wizards/end_contract_wizard.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py...
FIX end contract depart letter generation
FIX end contract depart letter generation
Python
agpl-3.0
eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,ecino/compassion-switzerland,ecino/compassion-switzerland,ecino/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file __manifest__.py...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[email protected]> # # The licence is in the file ...
cb2f768f01cc3d40fe95574d0702470d480888c2
DTError.py
DTError.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn -- typically a fu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys import os _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn -- typi...
Allow passing None for function, and use the executable name in that case. Save error list anonymously
Allow passing None for function, and use the executable name in that case. Save error list anonymously
Python
bsd-3-clause
amaxwell/datatank_py
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn -- typically a fu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys import os _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn -- typi...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn --...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys import os _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn -- typi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn -- typically a fu...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. __all__ = ["DTErrorMessage", "DTSaveError"] import sys _errors = [] def DTErrorMessage(fcn, msg): """Accumulate a message and echo to standard error. Arguments: fcn --...
9e2728e7589deebce39ed6bca385f36c6c90f718
tca/chat/models.py
tca/chat/models.py
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=True) last_na...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=True) last_na...
Add a timestamp field to the Message model
Add a timestamp field to the Message model The timestamp is automatically assigned at the moment of creation of the message. It is represented as a Month-based ISO8601 date-time format when sending the Message resource representation in JSON. Closes #1
Python
bsd-3-clause
mlalic/TumCampusAppBackend,mlalic/TumCampusAppBackend
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=True) last_na...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=True) last_na...
<commit_before>from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=Tr...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=True) last_na...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=True) last_na...
<commit_before>from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Member(models.Model): lrz_id = models.CharField(max_length=7, unique=True) first_name = models.CharField(max_length=30, blank=Tr...
5caa758b5638e0244da6818aa27092ad41801cc1
kazoo/tests/test_interrupt.py
kazoo/tests/test_interrupt.py
import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what all signals our c...
import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what all signals our c...
Add a sanity check per @bbangert
Add a sanity check per @bbangert
Python
apache-2.0
AlexanderplUs/kazoo,bsanders/kazoo,tempbottle/kazoo,rockerbox/kazoo,python-zk/kazoo,AlexanderplUs/kazoo,pombredanne/kazoo,Asana/kazoo,kormat/kazoo,harlowja/kazoo,rockerbox/kazoo,rgs1/kazoo,jacksontj/kazoo,max0d41/kazoo,bsanders/kazoo,rgs1/kazoo,tempbottle/kazoo,pombredanne/kazoo,harlowja/kazoo,max0d41/kazoo,kormat/kazo...
import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what all signals our c...
import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what all signals our c...
<commit_before>import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what al...
import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what all signals our c...
import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what all signals our c...
<commit_before>import os from nose import SkipTest from sys import platform from kazoo.testing import KazooTestCase class KazooInterruptTests(KazooTestCase): def test_interrupted_systemcall(self): ''' Make sure interrupted system calls don't break the world, since we can't control what al...
62c59e1efdd0a5c04bb3854dfb3f98ed5c237c21
skyfield/tests/test_almanac.py
skyfield/tests/test_almanac.py
from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') p = almanac.fraction_illuminated(e, 'moon', t0).round(2) asse...
from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') f = almanac.fraction_illuminated(e, 'moon', t0[-1]).round(2) ...
Add test for single-value fraction_illuminated()
Add test for single-value fraction_illuminated()
Python
mit
skyfielders/python-skyfield,skyfielders/python-skyfield
from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') p = almanac.fraction_illuminated(e, 'moon', t0).round(2) asse...
from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') f = almanac.fraction_illuminated(e, 'moon', t0[-1]).round(2) ...
<commit_before>from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') p = almanac.fraction_illuminated(e, 'moon', t0).ro...
from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') f = almanac.fraction_illuminated(e, 'moon', t0[-1]).round(2) ...
from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') p = almanac.fraction_illuminated(e, 'moon', t0).round(2) asse...
<commit_before>from skyfield import api, almanac # http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05 def test_fraction_illuminated(): ts = api.load.timescale() t0 = ts.utc(2018, 9, range(9, 19), 5) e = api.load('de421.bsp') p = almanac.fraction_illuminated(e, 'moon', t0).ro...
2cf9060db40e746eb49665b3eac83c72fd81d461
apigpio/utils.py
apigpio/utils.py
import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argument (in millis...
import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argument (in millis...
Fix callback erroneously filtered out
Fix callback erroneously filtered out The tick from pigpio wraps aroud after xFFFFFFFF, approximately 1h13. When it wraps the delay was not computed correctly, causing all following calls to be filtered out.
Python
mit
PierreRust/apigpio
import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argument (in millis...
import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argument (in millis...
<commit_before>import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argu...
import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argument (in millis...
import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argument (in millis...
<commit_before>import functools def Debounce(threshold=100): """ Simple debouncing decorator for apigpio callbacks. Example: `@Debouncer() def my_cb(gpio, level, tick) print('gpio cb: {} {} {}'.format(gpio, level, tick)) ` The threshold can be given to the decorator as an argu...
8a09e49cbcb9a874619b0e06601c2d69d5dad738
keystoneclient/__init__.py
keystoneclient/__init__.py
# Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
Fix --version to output version
Fix --version to output version Change-Id: I7d8dc83ac7c2ad7519633d136c1c32ce8537dce8 Fixes: bug 1182675
Python
apache-2.0
alexpilotti/python-keystoneclient,alexpilotti/python-keystoneclient,jamielennox/python-keystoneclient,ntt-sic/python-keystoneclient,klmitch/python-keystoneclient,metacloud/python-keystoneclient,sdpp/python-keystoneclient,ging/python-keystoneclient,sdpp/python-keystoneclient,ging/python-keystoneclient,darren-wang/ksc,Me...
# Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
<commit_before># Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
# Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
<commit_before># Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
c0640b6521d49e07681b0c43c2015c150dff32df
adhocracy/tests/model/test_user.py
adhocracy/tests/model/test_user.py
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make_user() delegate = tt_make_user()...
from adhocracy.model import Delegation from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make...
Update "can delegate via forward on user" test. Still fails because of permissions
Update "can delegate via forward on user" test. Still fails because of permissions
Python
agpl-3.0
phihag/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,phihag/adhocracy,SysTheron/adhocracy,alkadis/vcv,SysTheron/adhocracy,SysTheron/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,alkadis/vcv,phihag/adhocracy,phihag/adhocracy,phihag/adhocracy,liqd/adhocracy,DanielNeugebauer...
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make_user() delegate = tt_make_user()...
from adhocracy.model import Delegation from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make...
<commit_before>from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make_user() delegate =...
from adhocracy.model import Delegation from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make...
from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make_user() delegate = tt_make_user()...
<commit_before>from adhocracy.tests import TestController from adhocracy.tests.testtools import tt_make_proposal, tt_make_user class TestUserController(TestController): def test_can_delegate_via_forward_on_user(self): proposal = tt_make_proposal(voting=True) me = tt_make_user() delegate =...
0d2cb6f2091c01c9e57fd9b3c9d723b3e3d7080c
nova/objects/__init__.py
nova/objects/__init__.py
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
Add security_group_rule to objects registry
Add security_group_rule to objects registry This adds the security_group_rule module to the objects registry, which allows a service to make sure that all of its objects are registered before any could be received over RPC. We don't really have a test for any of these because of the nature of how they're imported. Re...
Python
apache-2.0
Metaswitch/calico-nova,barnsnake351/nova,MountainWei/nova,cloudbase/nova-virtualbox,hanlind/nova,maelnor/nova,jianghuaw/nova,zhimin711/nova,blueboxgroup/nova,TwinkleChawla/nova,dawnpower/nova,bgxavier/nova,thomasem/nova,j-carpentier/nova,tianweizhang/nova,openstack/nova,bigswitch/nova,openstack/nova,yosshy/nova,berrang...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
<commit_before># Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
<commit_before># Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
638c1d92d82cfa5d8e9a3c5bfacee630282cc0a4
bot/multithreading/worker/pool/name_generator.py
bot/multithreading/worker/pool/name_generator.py
class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): name = self....
class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): name = self....
Remove "temp" from temporal workers, as they may have max_seconds_idle to None, not being temp at all
Remove "temp" from temporal workers, as they may have max_seconds_idle to None, not being temp at all
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): name = self....
class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): name = self....
<commit_before>class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): ...
class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): name = self....
class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): name = self....
<commit_before>class WorkerPoolNameGenerator: def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int): self.base_name = base_name self.max_workers = max_workers self.max_seconds_idle = max_seconds_idle def get_name(self, number: int, is_temporal: bool = False): ...
35f9c78274876c6eb1e487071c7957c9b8460f68
pecan/compat/__init__.py
pecan/compat/__init__.py
import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa from urllib2 i...
import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa from urllib2 i...
Simplify our argspec compatability shim.
Simplify our argspec compatability shim.
Python
bsd-3-clause
pecan/pecan,ryanpetrello/pecan,pecan/pecan,ryanpetrello/pecan
import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa from urllib2 i...
import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa from urllib2 i...
<commit_before>import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa ...
import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa from urllib2 i...
import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa from urllib2 i...
<commit_before>import inspect import six if six.PY3: import urllib.parse as urlparse from urllib.parse import quote, unquote_plus from urllib.request import urlopen, URLError from html import escape izip = zip else: import urlparse # noqa from urllib import quote, unquote_plus # noqa ...
6432d92533953c2873b315945254e5260a109106
cs251tk/student/markdownify/check_submit_date.py
cs251tk/student/markdownify/check_submit_date.py
import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec and re...
import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec and re...
Modify way to find earliest date
Modify way to find earliest date
Python
mit
StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit
import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec and re...
import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec and re...
<commit_before>import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec ...
import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec and re...
import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec and re...
<commit_before>import os from dateutil.parser import parse from ...common import run, chdir def check_dates(spec_id, username, spec, basedir): """ Port of the CheckDates program from C++ Finds the first submission date for an assignment by comparing first commits for all files in the spec ...
1b3f253070739aea28ef5c8729dd641eddcb9323
src/artgraph/plugins/plugin.py
src/artgraph/plugins/plugin.py
import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") cursor = db.cursor() cursor.execute(""" SELECT old_text FROM text INNER...
import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") clean_title = title.replace(" ", "_") cursor = db.cursor() cursor.execute(""" ...
Clean titles before querying the DB
Clean titles before querying the DB
Python
mit
dMaggot/ArtistGraph
import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") cursor = db.cursor() cursor.execute(""" SELECT old_text FROM text INNER...
import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") clean_title = title.replace(" ", "_") cursor = db.cursor() cursor.execute(""" ...
<commit_before>import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") cursor = db.cursor() cursor.execute(""" SELECT old_text FROM tex...
import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") clean_title = title.replace(" ", "_") cursor = db.cursor() cursor.execute(""" ...
import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") cursor = db.cursor() cursor.execute(""" SELECT old_text FROM text INNER...
<commit_before>import MySQLdb import mwparserfromhell class Plugin(): def get_wikicode(self, title): # TODO Make this a conf db = MySQLdb.connect(host="localhost", user="root", passwd="", db="BigData") cursor = db.cursor() cursor.execute(""" SELECT old_text FROM tex...
f58940027a0e152ba68917a4b85dd1dfed1095a9
appname/server.py
appname/server.py
from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) assets.register('cs...
from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) assets.register('cs...
Add data: and unsafe-local for base64 fonts and inline js
Add data: and unsafe-local for base64 fonts and inline js
Python
mit
LandRegistry-Attic/flask-examples,LandRegistry-Attic/flask-examples,LandRegistry-Attic/flask-examples,LandRegistry-Attic/flask-examples
from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) assets.register('cs...
from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) assets.register('cs...
<commit_before>from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) asse...
from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) assets.register('cs...
from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) assets.register('cs...
<commit_before>from flask import render_template from appname import app, db from models import Foo from flask.ext.assets import Environment, Bundle # Static assets assets = Environment(app) css_main = Bundle( 'stylesheets/main.scss', filters='scss', output='build/main.css', depends="**/*.scss" ) asse...
32f06a7d3fc14600792a07bf00fab60af4ac395a
src/dashboard/src/contrib/utils.py
src/dashboard/src/contrib/utils.py
def get_directory_name(job): """ Expected format: %sharedPath%watchedDirectories/workFlowDecisions/createDip/ImagesSIP-69826e50-87a2-4370-b7bd-406fc8aad94f/ """ import re directory = job.directory uuid = job.sipuuid try: return re.search(r'^.*/(?P<directory>.*)-[\w]{8}(-[\w...
from django.shortcuts import render_to_response from django.template.context import RequestContext def render(request, template, context={}): return render_to_response(template, context, context_instance=RequestContext(request)) def get_directory_name(job): """ Expected format: %sharedPath%watched...
Add wrapper for render_to_resposne to include tmpl context processors easily
Add wrapper for render_to_resposne to include tmpl context processors easily Autoconverted from SVN (revision:2231)
Python
agpl-3.0
artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history,artefactual/archivematica-history
def get_directory_name(job): """ Expected format: %sharedPath%watchedDirectories/workFlowDecisions/createDip/ImagesSIP-69826e50-87a2-4370-b7bd-406fc8aad94f/ """ import re directory = job.directory uuid = job.sipuuid try: return re.search(r'^.*/(?P<directory>.*)-[\w]{8}(-[\w...
from django.shortcuts import render_to_response from django.template.context import RequestContext def render(request, template, context={}): return render_to_response(template, context, context_instance=RequestContext(request)) def get_directory_name(job): """ Expected format: %sharedPath%watched...
<commit_before>def get_directory_name(job): """ Expected format: %sharedPath%watchedDirectories/workFlowDecisions/createDip/ImagesSIP-69826e50-87a2-4370-b7bd-406fc8aad94f/ """ import re directory = job.directory uuid = job.sipuuid try: return re.search(r'^.*/(?P<directory>....
from django.shortcuts import render_to_response from django.template.context import RequestContext def render(request, template, context={}): return render_to_response(template, context, context_instance=RequestContext(request)) def get_directory_name(job): """ Expected format: %sharedPath%watched...
def get_directory_name(job): """ Expected format: %sharedPath%watchedDirectories/workFlowDecisions/createDip/ImagesSIP-69826e50-87a2-4370-b7bd-406fc8aad94f/ """ import re directory = job.directory uuid = job.sipuuid try: return re.search(r'^.*/(?P<directory>.*)-[\w]{8}(-[\w...
<commit_before>def get_directory_name(job): """ Expected format: %sharedPath%watchedDirectories/workFlowDecisions/createDip/ImagesSIP-69826e50-87a2-4370-b7bd-406fc8aad94f/ """ import re directory = job.directory uuid = job.sipuuid try: return re.search(r'^.*/(?P<directory>....
d15c830111987388bec89c2549a16b809d656a83
jarn/mkrelease/scp.py
jarn/mkrelease/scp.py
from process import Process from exit import err_exit class SCP(object): """Secure copy abstraction.""" def __init__(self, process=None): self.process = process or Process() def has_host(self, location): colon = location.find(':') slash = location.find('/') return colon >...
from tempfile import NamedTemporaryFile from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quiet:...
Add run_sftp and remove URL manipulation methods from SCP.
Add run_sftp and remove URL manipulation methods from SCP.
Python
bsd-2-clause
Jarn/jarn.mkrelease
from process import Process from exit import err_exit class SCP(object): """Secure copy abstraction.""" def __init__(self, process=None): self.process = process or Process() def has_host(self, location): colon = location.find(':') slash = location.find('/') return colon >...
from tempfile import NamedTemporaryFile from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quiet:...
<commit_before>from process import Process from exit import err_exit class SCP(object): """Secure copy abstraction.""" def __init__(self, process=None): self.process = process or Process() def has_host(self, location): colon = location.find(':') slash = location.find('/') ...
from tempfile import NamedTemporaryFile from process import Process from exit import err_exit class SCP(object): """Secure copy and FTP abstraction.""" def __init__(self, process=None): self.process = process or Process() def run_scp(self, distfile, location): if not self.process.quiet:...
from process import Process from exit import err_exit class SCP(object): """Secure copy abstraction.""" def __init__(self, process=None): self.process = process or Process() def has_host(self, location): colon = location.find(':') slash = location.find('/') return colon >...
<commit_before>from process import Process from exit import err_exit class SCP(object): """Secure copy abstraction.""" def __init__(self, process=None): self.process = process or Process() def has_host(self, location): colon = location.find(':') slash = location.find('/') ...
c2d7f4c6ae9042d1cc7f11fa82d7133e9b506ad7
src/main/scripts/data_exports/export_json.py
src/main/scripts/data_exports/export_json.py
from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(format="%(asctime...
from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(format="%(asctime...
Fix UTF-8 encoding for json exports
Fix UTF-8 encoding for json exports
Python
apache-2.0
dainst/gazetteer,dainst/gazetteer,dainst/gazetteer,dainst/gazetteer,dainst/gazetteer,dainst/gazetteer
from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(format="%(asctime...
from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(format="%(asctime...
<commit_before>from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(fo...
from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(format="%(asctime...
from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(format="%(asctime...
<commit_before>from lib.harvester import Harvester from lib.cli_helper import is_writable_directory import argparse import logging import json logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") logging.basicConfig(fo...
2f3139b2dfa2662daa7e57b221836ff2923c5fc9
actstream/admin.py
actstream/admin.py
from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestamp' list_dis...
from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestamp' list_dis...
Add 'public' field to ActionAdmin list display
Add 'public' field to ActionAdmin list display
Python
mit
druss16/danslist,Shanto/django-activity-stream,jimlyndon/django-activity-stream,intelivix/django-activity-stream,pombredanne/django-activity-stream,github-account-because-they-want-it/django-activity-stream,thelabnyc/django-activity-stream,github-account-because-they-want-it/django-activity-stream,pknowles/django-activ...
from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestamp' list_dis...
from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestamp' list_dis...
<commit_before>from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestam...
from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestamp' list_dis...
from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestamp' list_dis...
<commit_before>from django.contrib import admin from actstream import models # Use django-generic-admin widgets if available try: from genericadmin.admin import GenericAdminModelAdmin as ModelAdmin except ImportError: ModelAdmin = admin.ModelAdmin class ActionAdmin(ModelAdmin): date_hierarchy = 'timestam...
7741968b9d48afc7ac135742774ae911e2611c83
tests/test_util.py
tests/test_util.py
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
Cover case when seq is oneven
Cover case when seq is oneven
Python
mit
CodersOfTheNight/verata
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
<commit_before>from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class Te...
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class TestGrouper(objec...
<commit_before>from grazer.util import time_convert, grouper class TestTimeConvert(object): def test_seconds(self): assert time_convert("10s") == 10 def test_minutes(self): assert time_convert("2m") == 120 def test_hours(self): assert time_convert("3h") == 3 * 60 * 60 class Te...
ef060a18216d652df6efa866b6433102262831d8
tests/test_util.py
tests/test_util.py
# CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of temp files and t...
# CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of temp files and t...
Remove close_called test (no longer supported in python 3)
Remove close_called test (no longer supported in python 3)
Python
bsd-3-clause
justinsalamon/scaper
# CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of temp files and t...
# CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of temp files and t...
<commit_before># CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of t...
# CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of temp files and t...
# CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of temp files and t...
<commit_before># CREATED: 10/15/16 7:52 PM by Justin Salamon <[email protected]> ''' Tests for functions in util.py ''' from scaper.util import _close_temp_files from scaper.util import _set_temp_logging_level import tempfile import os import logging def test_close_temp_files(): ''' Create a bunch of t...
aa6df5b1ca4801cdaa85f7546c292be4f34e0107
test/pyrostest/test_system.py
test/pyrostest/test_system.py
import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def launches_node(self): pass class FailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('this_isnt_a_proj...
import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def test_noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def test_launches_node(self): pass class TestFailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('th...
Rename tests so that they run.
Rename tests so that they run.
Python
mit
gtagency/pyrostest,gtagency/pyrostest
import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def launches_node(self): pass class FailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('this_isnt_a_proj...
import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def test_noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def test_launches_node(self): pass class TestFailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('th...
<commit_before>import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def launches_node(self): pass class FailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('t...
import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def test_noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def test_launches_node(self): pass class TestFailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('th...
import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def launches_node(self): pass class FailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('this_isnt_a_proj...
<commit_before>import pytest import pyrostest class TestSpinUp(pyrostest.RosTest): def noop(self): pass @pyrostest.launch_node('pyrostest', 'add_one.py') def launches_node(self): pass class FailureCases(pyrostest.RosTest): @pytest.mark.xfail(strict=True) @pyrostest.launch_node('t...
162700c488275b057964f16659f3846c930a0c4f
registration/__init__.py
registration/__init__.py
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ``django.cor...
Add utility function for retrieving the active registration backend.
Add utility function for retrieving the active registration backend.
Python
bsd-3-clause
aptivate/django-registration,rafaduran/django-pluggable-registration,QPmedia/django-registration,QPmedia/django-registration,siddharthsarda/django-registration,maraujop/django-registration,CoatedMoose/django-registration,CoatedMoose/django-registration,newvem/django-registration,christang/django-registration-1.5,thedod...
Add utility function for retrieving the active registration backend.
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ``django.cor...
<commit_before><commit_msg>Add utility function for retrieving the active registration backend.<commit_after>
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ``django.cor...
Add utility function for retrieving the active registration backend.from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determ...
<commit_before><commit_msg>Add utility function for retrieving the active registration backend.<commit_after>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration ba...
ac7477803739d303df8374f916748173da32cb07
test_elasticsearch/test_server/__init__.py
test_elasticsearch/test_server/__init__.py
from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(): global client if client is not None: return client # try and locate manual override in the local environment try: from test_elasticsearch.local import get_clie...
from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(**kwargs): global client if client is not None and not kwargs: return client # try and locate manual override in the local environment try: from test_elasticsearc...
Allow test client to be created with kwargs
Allow test client to be created with kwargs
Python
apache-2.0
brunobell/elasticsearch-py,elastic/elasticsearch-py,brunobell/elasticsearch-py,elastic/elasticsearch-py
from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(): global client if client is not None: return client # try and locate manual override in the local environment try: from test_elasticsearch.local import get_clie...
from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(**kwargs): global client if client is not None and not kwargs: return client # try and locate manual override in the local environment try: from test_elasticsearc...
<commit_before>from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(): global client if client is not None: return client # try and locate manual override in the local environment try: from test_elasticsearch.local ...
from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(**kwargs): global client if client is not None and not kwargs: return client # try and locate manual override in the local environment try: from test_elasticsearc...
from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(): global client if client is not None: return client # try and locate manual override in the local environment try: from test_elasticsearch.local import get_clie...
<commit_before>from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(): global client if client is not None: return client # try and locate manual override in the local environment try: from test_elasticsearch.local ...
6d5edb8a5eacfb2dc83a2eef5732562024995942
api/serializers.py
api/serializers.py
from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): if 'is_school' in data and data['is_school']: error_dict = {} i...
from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): error_dict = {} if 'is_school' in data and data['is_school']: if 's...
Fix bug with registering non-school teams
Fix bug with registering non-school teams
Python
bsd-3-clause
stefantsov/blackbox3,stefantsov/blackbox3,stefantsov/blackbox3
from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): if 'is_school' in data and data['is_school']: error_dict = {} i...
from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): error_dict = {} if 'is_school' in data and data['is_school']: if 's...
<commit_before>from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): if 'is_school' in data and data['is_school']: error_dict = {...
from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): error_dict = {} if 'is_school' in data and data['is_school']: if 's...
from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): if 'is_school' in data and data['is_school']: error_dict = {} i...
<commit_before>from django.utils.translation import ugettext as _ from rest_framework.serializers import ModelSerializer, ValidationError from reg.models import Team class TeamSerializer(ModelSerializer): def validate(self, data): if 'is_school' in data and data['is_school']: error_dict = {...
91049834c3f30dcb838ac45167e93aa1bc92a913
fluent_faq/pagetypes/faqpage/page_type_plugins.py
fluent_faq/pagetypes/faqpage/page_type_plugins.py
from fluent_pages.admin import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin = HtmlPageAdmi...
from fluent_pages.adminui import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin = HtmlPageAd...
Prepare Django 1.7 compatibility, use new fluent_pages.adminui module
Prepare Django 1.7 compatibility, use new fluent_pages.adminui module
Python
apache-2.0
edoburu/django-fluent-faq,edoburu/django-fluent-faq
from fluent_pages.admin import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin = HtmlPageAdmi...
from fluent_pages.adminui import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin = HtmlPageAd...
<commit_before>from fluent_pages.admin import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin...
from fluent_pages.adminui import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin = HtmlPageAd...
from fluent_pages.admin import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin = HtmlPageAdmi...
<commit_before>from fluent_pages.admin import HtmlPageAdmin from fluent_pages.extensions import page_type_pool, PageTypePlugin from .models import FaqPage @page_type_pool.register class FaqPagePlugin(PageTypePlugin): """ Plugin binding the FaqPage model as pagetype. """ model = FaqPage model_admin...
b3d0f710de7982877fb2c30c46c75de86262caf4
grako/rendering.py
grako/rendering.py
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
Allow render to take a template different from the default one.
Allow render to take a template different from the default one.
Python
bsd-2-clause
swayf/grako,swayf/grako
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return ...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return item.render(**f...
<commit_before># -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import itertools from .util import trim def render(item, **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, Renderer): return ...
1690959502e2951920e52a0832e6571144bab6a8
_lib/wordpress_faq_processor.py
_lib/wordpress_faq_processor.py
import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.loads(resp.conte...
import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.loads(resp.conte...
Change faq processor to bulk index
Change faq processor to bulk index
Python
cc0-1.0
kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh
import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.loads(resp.conte...
import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.loads(resp.conte...
<commit_before>import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.l...
import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.loads(resp.conte...
import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.loads(resp.conte...
<commit_before>import sys import json import os.path import requests def posts_at_url(url): current_page = 1 max_page = sys.maxint while current_page <= max_page: url = os.path.expandvars(url) resp = requests.get(url, params={'page': current_page, 'count': '-1'}) results = json.l...
c4e497f24818169e8c59c07246582223c8214e45
bitfield/forms.py
bitfield/forms.py
from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(value, BitHandler...
from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(value, BitHandler...
Allow values of BitFormField's to be integers (for legacy compatibility in some apps)
Allow values of BitFormField's to be integers (for legacy compatibility in some apps)
Python
apache-2.0
moggers87/django-bitfield,joshowen/django-bitfield,Elec/django-bitfield,budlight/django-bitfield,disqus/django-bitfield
from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(value, BitHandler...
from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(value, BitHandler...
<commit_before>from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(va...
from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(value, BitHandler...
from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(value, BitHandler...
<commit_before>from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError from django.utils.encoding import force_unicode from .types import BitHandler class BitFieldCheckboxSelectMultiple(CheckboxSelectMultiple): def render(self, name, value, attrs=None, choices=()): if isinstance(va...
19da6c14a5063d3d0361b9b887fd0e4ed8d7a83d
nflpool/data/seasoninfo.py
nflpool/data/seasoninfo.py
from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = sqlalchemy.Colu...
from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = sqlalchemy.Colu...
Update SeasonInfo database table info
Update SeasonInfo database table info Add columns for the first game star time, home and away teams for the first NFL game played of the season
Python
mit
prcutler/nflpool,prcutler/nflpool
from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = sqlalchemy.Colu...
from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = sqlalchemy.Colu...
<commit_before>from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = ...
from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = sqlalchemy.Colu...
from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = sqlalchemy.Colu...
<commit_before>from nflpool.data.modelbase import SqlAlchemyBase import sqlalchemy class SeasonInfo(SqlAlchemyBase): __tablename__ = 'SeasonInfo' id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True) current_season = sqlalchemy.Column(sqlalchemy.Integer) season_start_date = ...
0428522c8df724ce49a32686676b2c5345abfda9
sdklib/util/timetizer.py
sdklib/util/timetizer.py
import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(): t = datetime.date.today() return t.strftime("%d/%m/%Y") def tomorrow_strf...
import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(format="%d/%m/%Y"): t = datetime.date.today() return t.strftime(format) def ...
Add format parameter to strf functions
Add format parameter to strf functions
Python
bsd-2-clause
ivanprjcts/sdklib,ivanprjcts/sdklib
import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(): t = datetime.date.today() return t.strftime("%d/%m/%Y") def tomorrow_strf...
import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(format="%d/%m/%Y"): t = datetime.date.today() return t.strftime(format) def ...
<commit_before>import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(): t = datetime.date.today() return t.strftime("%d/%m/%Y") de...
import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(format="%d/%m/%Y"): t = datetime.date.today() return t.strftime(format) def ...
import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(): t = datetime.date.today() return t.strftime("%d/%m/%Y") def tomorrow_strf...
<commit_before>import time import datetime def get_current_utc(time_format="%Y-%m-%d %H:%M:%S"): """ @return a string representation of the current time in UTC. """ return time.strftime(time_format, time.gmtime()) def today_strf(): t = datetime.date.today() return t.strftime("%d/%m/%Y") de...
22751313f6e221c009aeb0673e531894d1645c41
examples/settings.py
examples/settings.py
import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1280, 720), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examples", "vsyn...
import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1920, 1080), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examples", "vsy...
Use 1080p as default window size
Use 1080p as default window size
Python
isc
Contraz/demosys-py
import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1280, 720), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examples", "vsyn...
import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1920, 1080), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examples", "vsy...
<commit_before>import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1280, 720), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examp...
import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1920, 1080), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examples", "vsy...
import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1280, 720), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examples", "vsyn...
<commit_before>import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) SCREENSHOT_PATH = None OPENGL = { "version": (3, 3), } WINDOW = { "class": "demosys.context.pyqt.Window", "size": (1280, 720), "aspect_ratio": 16 / 9, "fullscreen": False, "resizable": False, "title": "Examp...
c04872d00a26e9bf0f48eeacb360b37ce0fba01e
semantic_release/pypi.py
semantic_release/pypi.py
"""PyPI """ from invoke import run from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi with twine. :param dis...
"""PyPI """ from invoke import run from twine import settings from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi ...
Use new interface for twine
fix: Use new interface for twine
Python
mit
relekang/python-semantic-release,relekang/python-semantic-release
"""PyPI """ from invoke import run from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi with twine. :param dis...
"""PyPI """ from invoke import run from twine import settings from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi ...
<commit_before>"""PyPI """ from invoke import run from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi with twine. ...
"""PyPI """ from invoke import run from twine import settings from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi ...
"""PyPI """ from invoke import run from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi with twine. :param dis...
<commit_before>"""PyPI """ from invoke import run from twine.commands import upload as twine_upload def upload_to_pypi( dists: str = 'sdist bdist_wheel', username: str = None, password: str = None, skip_existing: bool = False ): """Creates the wheel and uploads to pypi with twine. ...
fd0dad58403f34338b85edd83641e65a68779705
casslist/views.py
casslist/views.py
from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' total_plays = models.Sound.objects.all().aggregate(Sum('play_count'))['play_count__sum'] ...
from django.db import OperationalError from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' try: total_plays = models.Sound.objects.all()...
Fix error when making first migrations in a new project
[casslist] Fix error when making first migrations in a new project
Python
mit
joshuaprince/Cassoundra,joshuaprince/Cassoundra,joshuaprince/Cassoundra
from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' total_plays = models.Sound.objects.all().aggregate(Sum('play_count'))['play_count__sum'] ...
from django.db import OperationalError from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' try: total_plays = models.Sound.objects.all()...
<commit_before>from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' total_plays = models.Sound.objects.all().aggregate(Sum('play_count'))['play_c...
from django.db import OperationalError from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' try: total_plays = models.Sound.objects.all()...
from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' total_plays = models.Sound.objects.all().aggregate(Sum('play_count'))['play_count__sum'] ...
<commit_before>from django.views import generic from django.db.models import Sum from cassupload import models class CassListView(generic.ListView): template_name = 'casslist/index.html' context_object_name = 'cass_sound_list' total_plays = models.Sound.objects.all().aggregate(Sum('play_count'))['play_c...
2f4b57b2b7c5b391af615a204ad85dd04cc780d3
chatroom/views.py
chatroom/views.py
from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("msg")) + "\n\r") open("/tmp/data", "ab").write(request.GET['ms...
from django.shortcuts import render, redirect from django.http import HttpResponse from django.http import HttpResponseRedirect from login.views import isLogin from login import auth def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("m...
Load profiles on the order page
Load profiles on the order page
Python
mit
sonicyang/chiphub,sonicyang/chiphub,sonicyang/chiphub
from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("msg")) + "\n\r") open("/tmp/data", "ab").write(request.GET['ms...
from django.shortcuts import render, redirect from django.http import HttpResponse from django.http import HttpResponseRedirect from login.views import isLogin from login import auth def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("m...
<commit_before>from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("msg")) + "\n\r") open("/tmp/data", "ab").write(...
from django.shortcuts import render, redirect from django.http import HttpResponse from django.http import HttpResponseRedirect from login.views import isLogin from login import auth def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("m...
from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("msg")) + "\n\r") open("/tmp/data", "ab").write(request.GET['ms...
<commit_before>from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect def index(request): return render(request, 'index.html') def append(request): # open("data", "a").write(str(request.args.get("msg")) + "\n\r") open("/tmp/data", "ab").write(...
070b02c17e423e446562828af3ef69d06667472b
server/users/schema/queries.py
server/users/schema/queries.py
from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info): try: ...
from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info): users ...
Add better exception to viewer resolver
Add better exception to viewer resolver
Python
mit
ncrmro/reango,ncrmro/reango,ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/ango
from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info): try: ...
from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info): users ...
<commit_before>from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info):...
from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info): users ...
from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info): try: ...
<commit_before>from django.contrib.auth import get_user_model from graphene import AbstractType, Field, String from users.jwt_util import get_token_user_id from .definitions import Viewer class UserQueries(AbstractType): viewer = Field(Viewer) @staticmethod def resolve_viewer(self, args, context, info):...
e696fa2d398eb331cd5e25b2085b9d5c1e892aa1
server/lib/python/cartodb_services/test/test_mapboxtrueisoline.py
server/lib/python/cartodb_services/test/test_mapboxtrueisoline.py
import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCase): def se...
import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCase): def se...
Add test to validate time ranges
Add test to validate time ranges
Python
bsd-3-clause
CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/dataservices-api
import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCase): def se...
import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCase): def se...
<commit_before>import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCas...
import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCase): def se...
import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCase): def se...
<commit_before>import unittest from mock import Mock from cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE from cartodb_services.tools import Coordinate from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) class MapboxTrueIsolinesTestCase(unittest.TestCas...
5f9d8b30313200d9baa55ea468ad5b94481ba871
bianca/orm/repository.py
bianca/orm/repository.py
""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository table """ ...
""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository table """ ...
Make repo serializable via as_dict
Make repo serializable via as_dict
Python
mit
bumper-app/bumper-bianca,bumper-app/bumper-bianca
""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository table """ ...
""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository table """ ...
<commit_before>""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository ...
""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository table """ ...
""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository table """ ...
<commit_before>""" file: repository.py author: Ben Grawi <[email protected]> date: October 2013 description: Holds the repository abstraction class and ORM """ import uuid from db import * from datetime import datetime class Repository(Base): """ Commit(): description: The SQLAlchemy ORM for the repository ...
465977c2228620877b196e46ca883c743aeed856
cf_predict/test/conftest.py
cf_predict/test/conftest.py
"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.getplugin('terminal') base = te...
"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from mockredis import MockRedis from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.get...
Use MockRedis instead of dict to mock redis in unit tests
Use MockRedis instead of dict to mock redis in unit tests
Python
mit
ronert/cf-predict,ronert/cf-predict
"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.getplugin('terminal') base = te...
"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from mockredis import MockRedis from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.get...
<commit_before>"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.getplugin('terminal'...
"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from mockredis import MockRedis from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.get...
"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.getplugin('terminal') base = te...
<commit_before>"""Unit tests configuration file.""" import pickle import numpy as np import pytest from sklearn import linear_model, tree, svm from cf_predict import create_app def pytest_configure(config): """Disable verbose output when running tests.""" terminal = config.pluginmanager.getplugin('terminal'...
1c7af58f9fabb5edfc559660d742825d3fbdefb0
chaoswg/forms.py
chaoswg/forms.py
from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = PasswordField(u'...
from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = PasswordField(u'...
Add some defaults for form input
Add some defaults for form input
Python
agpl-3.0
Obihoernchen/ChaosWG-Manager,Obihoernchen/ChaosWG-Manager,Obihoernchen/ChaosWG-Manager
from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = PasswordField(u'...
from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = PasswordField(u'...
<commit_before>from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = P...
from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = PasswordField(u'...
from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = PasswordField(u'...
<commit_before>from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField from wtforms.validators import InputRequired, NumberRange, Optional class LoginForm(FlaskForm): name = StringField(u'Username', validators=[InputRequired()]) password = P...
33e1e41e867e996baccddb9a892ec05bbd4f93f9
polls/views.py
polls/views.py
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_404(Poll, pk=pol...
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_404(Poll, pk=pol...
Fix vote view to work with sharded Choice
Fix vote view to work with sharded Choice
Python
apache-2.0
disqus/sharding-example,komuW/sharding-example,komuW/sharding-example
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_404(Poll, pk=pol...
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_404(Poll, pk=pol...
<commit_before>from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_4...
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_404(Poll, pk=pol...
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_404(Poll, pk=pol...
<commit_before>from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def vote(request, poll_id): p = get_object_or_4...
2b3df42f77c7277369631c1b31266a41526bf90c
src/rotest/management/migrations/0002_auto_20150224_1427.py
src/rotest/management/migrations/0002_auto_20150224_1427.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") localhost, _ = auth_models.User.objects.get_or_create(...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models ADMIN_USERNAME = "rotest" ADMIN_PASSWORD = "rotest" def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") l...
Revert the superuser creation in a migration
Revert the superuser creation in a migration
Python
mit
gregoil/rotest
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") localhost, _ = auth_models.User.objects.get_or_create(...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models ADMIN_USERNAME = "rotest" ADMIN_PASSWORD = "rotest" def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") l...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") localhost, _ = auth_models.User.objects...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models ADMIN_USERNAME = "rotest" ADMIN_PASSWORD = "rotest" def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") l...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") localhost, _ = auth_models.User.objects.get_or_create(...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.contrib.auth import models as auth_models def create_users(apps, schema_editor): qa_group, _ = auth_models.Group.objects.get_or_create(name="QA") localhost, _ = auth_models.User.objects...
c7ec4e6be21718ed7b9b94aed2815150d8e4b95f
cheroot/test/test_compat.py
cheroot/test/test_compat.py
"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Python 2') de...
"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Python 2') de...
Revert ntob check to imperative style
Revert ntob check to imperative style As context manager isn't available under Python 2.6
Python
bsd-3-clause
cherrypy/cheroot
"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Python 2') de...
"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Python 2') de...
<commit_before>"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Py...
"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Python 2') de...
"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Python 2') de...
<commit_before>"""Test Python 2/3 compatibility module.""" from __future__ import unicode_literals import unittest import pytest import six from cheroot import _compat as compat class StringTester(unittest.TestCase): """Tests for string conversion.""" @pytest.mark.skipif(six.PY3, reason='Only useful on Py...
fab9c33ed2e4e8c7c43ecf548dbc49c7b8cfd752
observatory/manage.py
observatory/manage.py
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import os.path import sys if __name__ == "__main__": #Include parent directory in the path by default path = os.path.abspath('../') if path not in sys.path: sys.path.append(path) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "observatory.settings") from...
Add parent directory in path by default
Add parent directory in path by default
Python
isc
rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory,rcos/Observatory
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Add parent directory in path by default
#!/usr/bin/env python import os import os.path import sys if __name__ == "__main__": #Include parent directory in the path by default path = os.path.abspath('../') if path not in sys.path: sys.path.append(path) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "observatory.settings") from...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Add parent directory in path by default<commit_aft...
#!/usr/bin/env python import os import os.path import sys if __name__ == "__main__": #Include parent directory in the path by default path = os.path.abspath('../') if path not in sys.path: sys.path.append(path) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "observatory.settings") from...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Add parent directory in path by default#!/usr/bin/env python import os impor...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Add parent directory in path by default<commit_aft...
67fcadfa8fd3e6c4161ca4756cc65f0db1386c06
usercustomize.py
usercustomize.py
""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framework builds, and...
""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framework builds, and...
Add OS X GTK to Python path.
Add OS X GTK to Python path.
Python
mit
fossilet/dotfiles,fossilet/dotfiles,fossilet/dotfiles
""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framework builds, and...
""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framework builds, and...
<commit_before>""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framew...
""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framework builds, and...
""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framework builds, and...
<commit_before>""" Customize Python Interpreter. Link your user customizing file to this file. For more info see: https://docs.python.org/3/library/site.html "Default value is ~/.local/lib/pythonX.Y/site-packages for UNIX and non-framework Mac OS X builds, ~/Library/Python/X.Y/lib/python/site-packages for Mac framew...
4567bf8044ece7b4ef5ccc9cf81a7dac7bcab017
takeyourmeds/groups/models.py
takeyourmeds/groups/models.py
import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """ name = mo...
import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """ name = mo...
Correct unicode for access tokens
Correct unicode for access tokens Signed-off-by: Chris Lamb <[email protected]>
Python
mit
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """ name = mo...
import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """ name = mo...
<commit_before>import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """...
import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """ name = mo...
import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """ name = mo...
<commit_before>import datetime import functools from django.db import models from django.utils.crypto import get_random_string from .managers import GroupManager class Group(models.Model): """ Instances must be created using ``Group.objects.create_group`` to ensure Stripe is configured correctly. """...
61ea8ac67279cb46800237546384cf2e85180d1b
test/order/TestOrderFile.py
test/order/TestOrderFile.py
""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" def test_order_file(self): """Test debug symbols follow the correct order by the ord...
""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_wit...
Test order file with both dsym and dwarf combination.
Test order file with both dsym and dwarf combination. git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@113884 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb
""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" def test_order_file(self): """Test debug symbols follow the correct order by the ord...
""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_wit...
<commit_before>""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" def test_order_file(self): """Test debug symbols follow the correct o...
""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_wit...
""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" def test_order_file(self): """Test debug symbols follow the correct order by the ord...
<commit_before>""" Test that debug symbols have the correct order as specified by the order file. """ import os, time import re import unittest2 import lldb from lldbtest import * class OrderFileTestCase(TestBase): mydir = "order" def test_order_file(self): """Test debug symbols follow the correct o...
e22794f07c6d1027e16617ac6874289794080967
account_payment_include_draft_move/wizard/payment_order_create.py
account_payment_include_draft_move/wizard/payment_order_create.py
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
Replace partial domain by (1,'=',1)
[IMP] Replace partial domain by (1,'=',1)
Python
agpl-3.0
sergio-incaser/bank-payment,sergio-incaser/bank-payment,sergiocorato/bank-payment,damdam-s/bank-payment,rlizana/bank-payment,CompassionCH/bank-payment,incaser/bank-payment,sergiocorato/bank-payment,Antiun/bank-payment,sergio-teruel/bank-payment,rlizana/bank-payment,ndtran/bank-payment,David-Amaro/bank-payment,sergio-te...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
<commit_before># -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
# -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
<commit_before># -*- coding: utf-8 -*- # ############################################################################## # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
1fd2299b2a0c993bd463ab88c0a7544ade2c945b
test_kasp/disk/test_disk.py
test_kasp/disk/test_disk.py
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Remove init mrthod from disk test
Remove init mrthod from disk test Removed init method from test class for disk test
Python
apache-2.0
vrovachev/kaspersky-framework
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
<commit_before># Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
4ce6792829174e7df4614e5caeddf5b280d59822
comics/comics/darklegacy.py
comics/comics/darklegacy.py
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Crawler(CrawlerBase...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Crawler(CrawlerBase...
Change history capability for "Dark Legacy"
Change history capability for "Dark Legacy"
Python
agpl-3.0
datagutten/comics,jodal/comics,datagutten/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Crawler(CrawlerBase...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Crawler(CrawlerBase...
<commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Craw...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Crawler(CrawlerBase...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Crawler(CrawlerBase...
<commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Dark Legacy" language = "en" url = "http://www.darklegacycomics.com/" start_date = "2006-01-01" rights = "Arad Kedar" class Craw...
d927ada17522edfb91489e8558bbc88ff741a3c5
bokeh/models/widgets/markups.py
bokeh/models/widgets/markups.py
""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget class Paragraph(Widget): """ A block (paragraph) of text. """ text = String(help=""" The contents of ...
""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget @abstract class Markup(Widget): """ Base class for HTML markup widget models. """ class Paragraph(Markup): """...
Introduce Markup abstract base class
Introduce Markup abstract base class
Python
bsd-3-clause
aiguofer/bokeh,jakirkham/bokeh,ChinaQuants/bokeh,percyfal/bokeh,bokeh/bokeh,philippjfr/bokeh,philippjfr/bokeh,stonebig/bokeh,percyfal/bokeh,muku42/bokeh,DuCorey/bokeh,muku42/bokeh,ericmjl/bokeh,azjps/bokeh,muku42/bokeh,percyfal/bokeh,philippjfr/bokeh,msarahan/bokeh,deeplook/bokeh,Karel-van-de-Plassche/bokeh,htygithub/b...
""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget class Paragraph(Widget): """ A block (paragraph) of text. """ text = String(help=""" The contents of ...
""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget @abstract class Markup(Widget): """ Base class for HTML markup widget models. """ class Paragraph(Markup): """...
<commit_before>""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget class Paragraph(Widget): """ A block (paragraph) of text. """ text = String(help=""" T...
""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget @abstract class Markup(Widget): """ Base class for HTML markup widget models. """ class Paragraph(Markup): """...
""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget class Paragraph(Widget): """ A block (paragraph) of text. """ text = String(help=""" The contents of ...
<commit_before>""" Various kinds of markup (static content) widgets. """ from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget class Paragraph(Widget): """ A block (paragraph) of text. """ text = String(help=""" T...
2cb73ac018287ab77b380c31166ec4fc6fd99f5e
performanceplatform/collector/gcloud/__init__.py
performanceplatform/collector/gcloud/__init__.py
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser import ( ge...
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser import ( ge...
Make the G-Cloud collector empty the data set
Make the G-Cloud collector empty the data set https://www.pivotaltracker.com/story/show/72073020 [Delivers #72073020]
Python
mit
alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser import ( ge...
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser import ( ge...
<commit_before>from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser ...
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser import ( ge...
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser import ( ge...
<commit_before>from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from dshelpers import download_url from performanceplatform.collector.gcloud.core import ( nuke_local_database, save_raw_data, aggregate_and_save, push_aggregates) from performanceplatform.collector.gcloud.sales_parser ...
bd0ccca9e629b6a9c48147984b8d68cf80fe470c
test/single_system/bmc_test.py
test/single_system/bmc_test.py
import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_items.iteritems():...
import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_items.iteritems():...
Add a test for bmc info working eleven times in a row
Add a test for bmc info working eleven times in a row This is specifically to check for SW-732, where results stop after 10 bmc info requests.
Python
bsd-3-clause
Cynerva/pyipmi,emaadmanzoor/pyipmi
import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_items.iteritems():...
import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_items.iteritems():...
<commit_before>import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_ite...
import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_items.iteritems():...
import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_items.iteritems():...
<commit_before>import sys, unittest from singlesystemtest import SingleSystemTest class TestBmcInfo(SingleSystemTest): def test_bmc_info(self): """BMC info provides expected results""" info = self.bmc.info() check_items = self.get_checks()['BMCInfo'] for item,expected in check_ite...
7346103a36d69d1f27bc064843afa8c18d201d2b
go/apps/bulk_message/definition.py
go/apps/bulk_message/definition.py
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' needs_confirmation = True needs_group = True needs_running = True de...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' action_display_verb = 'Send message' needs_confirmation = True needs_grou...
Change send bulk message display verb to 'Send message'.
Change send bulk message display verb to 'Send message'.
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' needs_confirmation = True needs_group = True needs_running = True de...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' action_display_verb = 'Send message' needs_confirmation = True needs_grou...
<commit_before>from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' needs_confirmation = True needs_group = True needs_running...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' action_display_verb = 'Send message' needs_confirmation = True needs_grou...
from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' needs_confirmation = True needs_group = True needs_running = True de...
<commit_before>from go.vumitools.conversation.definition import ( ConversationDefinitionBase, ConversationAction) class BulkSendAction(ConversationAction): action_name = 'bulk_send' action_display_name = 'Write and send bulk message' needs_confirmation = True needs_group = True needs_running...
fc18f86964e170c48632c614c86a0d26c9fbdd41
tests/test_load_module_from_file_location.py
tests/test_load_module_from_file_location.py
from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).parent / "static/app...
from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).parent / "static" / ...
Resolve broken test in appveyor
Resolve broken test in appveyor
Python
mit
channelcat/sanic,channelcat/sanic,ashleysommer/sanic,channelcat/sanic,ashleysommer/sanic,ashleysommer/sanic,channelcat/sanic
from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).parent / "static/app...
from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).parent / "static" / ...
<commit_before>from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).paren...
from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).parent / "static" / ...
from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).parent / "static/app...
<commit_before>from pathlib import Path from types import ModuleType import pytest from sanic.exceptions import LoadFileException from sanic.utils import load_module_from_file_location @pytest.fixture def loaded_module_from_file_location(): return load_module_from_file_location( str(Path(__file__).paren...
bdcaaf4ab999c51a6633b7e72971d7594de0b66b
bin/clean_unused_headers.py
bin/clean_unused_headers.py
#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic'...
#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic'...
Add python script to find unused linux-headers packages
Add python script to find unused linux-headers packages
Python
apache-2.0
elleryq/oh-my-home,elleryq/oh-my-home,elleryq/oh-my-home
#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic'...
#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic'...
<commit_before>#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-...
#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic'...
#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic'...
<commit_before>#!/usr/bin/env python from __future__ import print_function import sys import os import re from subprocess import check_output IMAGE_PATTERN = re.compile( 'linux-image-(?P<version>[0-9\.]+)-(?P<rev>[0-9]{2})-generic') HEADER_PATTERN = re.compile( 'linux-headers-(?P<version>[0-9\.]+)-(?P<rev>[0-...
5392626ef746cf52043494e7d1360fd373bdfe93
cort/core/util.py
cort/core/util.py
""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: tokens (list(str)...
""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: tokens (list(str)...
Read java path from environment variable if set
Read java path from environment variable if set
Python
mit
smartschat/cort,smartschat/cort,smartschat/cort,smartschat/cort,smartschat/cort
""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: tokens (list(str)...
""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: tokens (list(str)...
<commit_before>""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: to...
""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: tokens (list(str)...
""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: tokens (list(str)...
<commit_before>""" Utility functions. """ __author__ = 'smartschat' def clean_via_pos(tokens, pos): """ Clean a list of tokens according to their part-of-speech tags. In particular, retain only tokens which do not have the part-of-speech tag DT (determiner) or POS (possessive 's'). Args: to...
16d949e6ffe9a2bc76e8f76de57b6936f6d92226
core/tasks.py
core/tasks.py
import logging class BaseTask(object): def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger """ self.logger ...
import logging class BaseTask(object): task_options = {} def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger "...
Add task_options attribute to BaseTask
Add task_options attribute to BaseTask
Python
bsd-3-clause
SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI,cdcarter/CumulusCI,e02d96ec16/CumulusCI,Joble/CumulusCI,e02d96ec16/CumulusCI
import logging class BaseTask(object): def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger """ self.logger ...
import logging class BaseTask(object): task_options = {} def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger "...
<commit_before>import logging class BaseTask(object): def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger """ ...
import logging class BaseTask(object): task_options = {} def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger "...
import logging class BaseTask(object): def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger """ self.logger ...
<commit_before>import logging class BaseTask(object): def __init__(self, project_config, task_config): self.project_config = project_config self.task_config = task_config self._init_logger() self._init_task() def _init_logger(self): """ Initializes self.logger """ ...
67daf4140c17ce28b0ab45ddd2366968082de739
two_factor/auth_backends.py
two_factor/auth_backends.py
from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted else None cla...
from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted else None cla...
Update last_used_at after successful computer verification
Update last_used_at after successful computer verification
Python
mit
mathspace/django-two-factor-auth,percipient/django-two-factor-auth,percipient/django-two-factor-auth,moreati/django-two-factor-auth,Bouke/django-two-factor-auth,moreati/django-two-factor-auth,mathspace/django-two-factor-auth,koleror/django-two-factor-auth,koleror/django-two-factor-auth,Bouke/django-two-factor-auth,fusi...
from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted else None cla...
from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted else None cla...
<commit_before>from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted ...
from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted else None cla...
from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted else None cla...
<commit_before>from django.contrib.auth.backends import ModelBackend from django.utils.timezone import now from oath import accept_totp class TokenBackend(ModelBackend): def authenticate(self, user, token): accepted, drift = accept_totp(key=user.token.seed, response=token) return user if accepted ...
86d844680015d60043a404f0b021463027b89e43
pre_commit_hooks/check_merge_conflict.py
pre_commit_hooks/check_merge_conflict.py
from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('filenames', nargs=...
from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('filenames', nargs=...
Fix off by one error in line number enumeration
Fix off by one error in line number enumeration
Python
mit
dupuy/pre-commit-hooks,jordant/pre-commit-hooks,jordant/pre-commit-hooks,pre-commit/pre-commit-hooks,Coverfox/pre-commit-hooks,bgschiller/pre-commit-hooks,chriskuehl/pre-commit-hooks,Harwood/pre-commit-hooks,arahayrabedian/pre-commit-hooks
from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('filenames', nargs=...
from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('filenames', nargs=...
<commit_before>from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('fil...
from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('filenames', nargs=...
from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('filenames', nargs=...
<commit_before>from __future__ import print_function import argparse import sys CONFLICT_PATTERNS = [ '<<<<<<< ', '=======', '>>>>>>> ' ] WARNING_MSG = 'Merge conflict string "{0}" found in {1}:{2}' def detect_merge_conflict(argv=None): parser = argparse.ArgumentParser() parser.add_argument('fil...
e80cc896396b217a3e3a4f01294b50061faf68cd
cyder/cydhcp/range/forms.py
cyder/cydhcp/range/forms.py
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model = Range ...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model = Range ...
Put name first in range form
Put name first in range form
Python
bsd-3-clause
zeeman/cyder,zeeman/cyder,akeym/cyder,akeym/cyder,akeym/cyder,OSU-Net/cyder,OSU-Net/cyder,murrown/cyder,zeeman/cyder,OSU-Net/cyder,OSU-Net/cyder,murrown/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,murrown/cyder,murrown/cyder,drkitty/cyder,drkitty/cyder,drkitty/cyder
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model = Range ...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model = Range ...
<commit_before>from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model =...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model = Range ...
from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model = Range ...
<commit_before>from django import forms from cyder.base.eav.forms import get_eav_form from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.range.models import Range, RangeAV from cyder.cydns.forms import ViewChoiceForm class RangeForm(ViewChoiceForm, UsabilityFormMixin): class Meta: model =...
f9aa61893ea0b7e98dc4e5b25cbf63c2fffde672
libs/googleapis.py
libs/googleapis.py
import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] }).json() ...
import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] }).json() ...
Add url logging in google shortener
Add url logging in google shortener
Python
mit
sevazhidkov/leonard
import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] }).json() ...
import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] }).json() ...
<commit_before>import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] ...
import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] }).json() ...
import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] }).json() ...
<commit_before>import os import time import json import requests def get_timezone(lat, long): response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={ 'location': '{},{}'.format(lat, long), 'timestamp': int(time.time()), 'key': os.environ['GOOGLE_API_TOKEN'] ...
abb55757564cd957840ab584765239f924233295
pinax_theme_bootstrap/management/commands/copy_from_theme.py
pinax_theme_bootstrap/management/commands/copy_from_theme.py
import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shutil.copytree(sr...
import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shutil.copytree(sr...
Fix print for python 3
Fix print for python 3 Fix print statement in copy_from_theme management command.
Python
mit
foraliving/foraliving,foraliving/foraliving,foraliving/foraliving
import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shutil.copytree(sr...
import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shutil.copytree(sr...
<commit_before>import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shu...
import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shutil.copytree(sr...
import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shutil.copytree(sr...
<commit_before>import errno import glob import os import shutil from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand def copy(src, dest): if not os.path.exists(os.path.dirname(dest)): os.makedirs(os.path.dirname(dest)) try: shu...
bcb4d817551d584965f252b7cb0df34bd19cc972
utils/lit/lit/LitFormats.py
utils/lit/lit/LitFormats.py
from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest
from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest
Test commit (removed extra blank line)
Test commit (removed extra blank line) git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98988 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Driver...
from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest Test commit (removed extra blank line) git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98988 91177308-0d34-0410-b5e6-96231b3b80d8
from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest
<commit_before>from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest <commit_msg>Test commit (removed extra blank line) git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98988 91177308-0d34-0410-b5e6-96231b3b80d8<commit_after>
from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest
from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest Test commit (removed extra blank line) git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98988 91177308-0d34-0410-b5e6-96231b3b80d8from TestFormats import GoogleTest, ShTest, TclTest from TestFormats ...
<commit_before>from TestFormats import GoogleTest, ShTest, TclTest from TestFormats import SyntaxCheckTest, OneCommandPerFileTest <commit_msg>Test commit (removed extra blank line) git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98988 91177308-0d34-0410-b5e6-96231b3b80d8<commit_after>from TestFormats import Goog...
93282e663a03c2a62fcf9731db3d152b3d2c32c7
test_publisher.py
test_publisher.py
import publisher def from_html_file(): source_file = "~/Projects/markdown-publisher/source_test.md" print publisher.get_html_from_file(source_file) def from_html(): test_source = "# Test heading\n\n- test item 1\n- test item 2" print publisher.get_html(test_source) def from_html_to_pdf(): test_ht...
import publisher test_pdf_filename = "test/test.pdf" test_css_filename = "test/test.css" test_md_filename = "test/test.md" test_html_filename = "test/test.html" test_md = "# Test heading\n\n- test item 1\n- test item 2" def from_html_file(): print publisher.md_to_html(publisher.from_file(test_md_filename)) def ...
Add MD+CSS processing test to test module.
Add MD+CSS processing test to test module.
Python
mit
cpgillem/markdown_publisher,cpgillem/markdown_publisher
import publisher def from_html_file(): source_file = "~/Projects/markdown-publisher/source_test.md" print publisher.get_html_from_file(source_file) def from_html(): test_source = "# Test heading\n\n- test item 1\n- test item 2" print publisher.get_html(test_source) def from_html_to_pdf(): test_ht...
import publisher test_pdf_filename = "test/test.pdf" test_css_filename = "test/test.css" test_md_filename = "test/test.md" test_html_filename = "test/test.html" test_md = "# Test heading\n\n- test item 1\n- test item 2" def from_html_file(): print publisher.md_to_html(publisher.from_file(test_md_filename)) def ...
<commit_before>import publisher def from_html_file(): source_file = "~/Projects/markdown-publisher/source_test.md" print publisher.get_html_from_file(source_file) def from_html(): test_source = "# Test heading\n\n- test item 1\n- test item 2" print publisher.get_html(test_source) def from_html_to_pdf...
import publisher test_pdf_filename = "test/test.pdf" test_css_filename = "test/test.css" test_md_filename = "test/test.md" test_html_filename = "test/test.html" test_md = "# Test heading\n\n- test item 1\n- test item 2" def from_html_file(): print publisher.md_to_html(publisher.from_file(test_md_filename)) def ...
import publisher def from_html_file(): source_file = "~/Projects/markdown-publisher/source_test.md" print publisher.get_html_from_file(source_file) def from_html(): test_source = "# Test heading\n\n- test item 1\n- test item 2" print publisher.get_html(test_source) def from_html_to_pdf(): test_ht...
<commit_before>import publisher def from_html_file(): source_file = "~/Projects/markdown-publisher/source_test.md" print publisher.get_html_from_file(source_file) def from_html(): test_source = "# Test heading\n\n- test item 1\n- test item 2" print publisher.get_html(test_source) def from_html_to_pdf...
95eb8e4b21b1531801fd69b13e4414c6dfb65563
esios/__init__.py
esios/__init__.py
try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from service import Esios
try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from .service import Esios
Make relative imports py2/py3 compat
Make relative imports py2/py3 compat
Python
mit
gisce/esios
try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from service import Esios Make relative imports py2/py3 compat
try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from .service import Esios
<commit_before>try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from service import Esios <commit_msg>Make relative imports py2/py3 compat<commit_after>
try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from .service import Esios
try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from service import Esios Make relative imports py2/py3 compattry: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: ...
<commit_before>try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from service import Esios <commit_msg>Make relative imports py2/py3 compat<commit_after>try: VERSION = __import__('pkg_resources') \ .get_distribution(_...
1b6c49c6d74dcd31c8a0e51f82932866bc99adc2
setup_rouge.py
setup_rouge.py
#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): home = os.environ['HOME'] src_rouge_root = "./files2rouge/RELEASE-1.5.5/" default_root = os.path...
#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): if 'HOME' not in os.environ: home = os.environ['HOMEPATH'] else: home = os.environ['HO...
Fix bug: KeyError: 'HOME' in Windows.
Fix bug: KeyError: 'HOME' in Windows.
Python
mit
pltrdy/files2rouge,pltrdy/files2rouge
#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): home = os.environ['HOME'] src_rouge_root = "./files2rouge/RELEASE-1.5.5/" default_root = os.path...
#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): if 'HOME' not in os.environ: home = os.environ['HOMEPATH'] else: home = os.environ['HO...
<commit_before>#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): home = os.environ['HOME'] src_rouge_root = "./files2rouge/RELEASE-1.5.5/" default...
#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): if 'HOME' not in os.environ: home = os.environ['HOMEPATH'] else: home = os.environ['HO...
#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): home = os.environ['HOME'] src_rouge_root = "./files2rouge/RELEASE-1.5.5/" default_root = os.path...
<commit_before>#!/usr/bin/env python """ Utility to copy ROUGE script. It has to be run before `setup.py` """ import os import shutil from files2rouge import settings from six.moves import input def copy_rouge(): home = os.environ['HOME'] src_rouge_root = "./files2rouge/RELEASE-1.5.5/" default...
77b0ac8e4230663e0c0394366185ad32fb8ff6ba
configurator/__init__.py
configurator/__init__.py
"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir...
"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir...
Fix _get_version for tagged releases
Fix _get_version for tagged releases
Python
apache-2.0
yasserglez/configurator,yasserglez/configurator
"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir...
"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir...
<commit_before>"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg...
"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir...
"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg_dir, os.pardir...
<commit_before>"""Adaptive configuration dialogs. Attributes: __version__: The current version string. """ import os import subprocess def _get_version(version=None): # overwritten by setup.py if version is None: pkg_dir = os.path.dirname(__file__) src_dir = os.path.abspath(os.path.join(pkg...
5a03cd340e5dc8a796c7d430128f0e22be17333e
qiime/sdk/__init__.py
qiime/sdk/__init__.py
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------------------------------------...
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------------------------------------...
Add helper URLs to qiime.sdk
ENH: Add helper URLs to qiime.sdk Adds citation url, help page, and conda channel URLs to qiime.sdk
Python
bsd-3-clause
biocore/qiime2,thermokarst/qiime2,ebolyen/qiime2,jakereps/qiime2,qiime2/qiime2,qiime2/qiime2,nervous-laughter/qiime2,biocore/qiime2,thermokarst/qiime2,jairideout/qiime2,jakereps/qiime2
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------------------------------------...
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------------------------------------...
<commit_before># ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------...
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------------------------------------...
# ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # -----------------------------------------------...
<commit_before># ---------------------------------------------------------------------------- # Copyright (c) 2016--, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------...
b4814d2f86a3b86ca4c7c02bee0c255275308b9a
tests/conftest.py
tests/conftest.py
import os from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def pytest_collection(session): # Perform pairwise testing. # TODO(kataoka):...
import os import subprocess import sys from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def _is_pip_installed(): try: import pip #...
Print installed packages in pytest
Print installed packages in pytest
Python
mit
pfnet/chainer,hvy/chainer,chainer/chainer,chainer/chainer,hvy/chainer,hvy/chainer,hvy/chainer,chainer/chainer,chainer/chainer
import os from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def pytest_collection(session): # Perform pairwise testing. # TODO(kataoka):...
import os import subprocess import sys from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def _is_pip_installed(): try: import pip #...
<commit_before>import os from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def pytest_collection(session): # Perform pairwise testing. #...
import os import subprocess import sys from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def _is_pip_installed(): try: import pip #...
import os from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def pytest_collection(session): # Perform pairwise testing. # TODO(kataoka):...
<commit_before>import os from chainer import testing from chainer.testing import parameterized _pairwise_parameterize = ( os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never')) assert _pairwise_parameterize in ('never', 'always') def pytest_collection(session): # Perform pairwise testing. #...